private LineChartData generatePreviewLineChartData() {
            int numValues = 50;

            List<PointValue> values = new ArrayList<PointValue>();
            for (int i = 0; i < numValues; ++i) {
                values.add(new PointValue(i, (float) Math.random() * 100f));
            }

            Line line = new Line(values);
            line.setColor(ChartUtils.DEFAULT_DARKEN_COLOR);
            line.setHasPoints(false);// too many values so don't draw points.

            List<Line> lines = new ArrayList<Line>();
            lines.add(line);

            LineChartData data = new LineChartData(lines);
            data.setAxisXBottom(new Axis());
            data.setAxisYLeft(new Axis().setHasLines(true));

            return data;

        }
Note: Chart is within ViewPager so enable container scroll mode. *
hellocharts-samples/src/lecho/lib/hellocharts/samples/ViewPagerChartsActivity.java