// init example series data
GraphViewSeries exampleSeries = new GraphViewSeries(new GraphViewData[] {
new GraphViewData(1, 2.0d)
, new GraphViewData(2, 1.5d)
, new GraphViewData(3, 2.5d)
, new GraphViewData(4, 1.0d)
});
GraphView graphView = new LineGraphView(
this // context
, "GraphViewDemo" // heading
);
graphView.addSeries(exampleSeries); // data
LinearLayout layout = (LinearLayout) findViewById(R.id.layout);
layout.addView(graphView);