Je dois intégrer un graphique dans mon application android, je suis en train de suivre ce tutoriel:Comment dessiner un graphique dans mon application?
http://www.jjoe64.com/2011/07/chart-and-graph-library-for-android.html
J'ai essayé de le mettre dans ma classe d'activité et il montre avec une tonne d'erreurs liées à GraphView
. Voici les extraits de code:
// graph with dynamically genereated horizontal and vertical labels
GraphView graphView = new GraphView(
this // context
, new GraphViewData[] {
new GraphViewData(1, 2.0d)
, new GraphViewData(2, 1.5d)
, new GraphViewData(2.5, 3.0d) // another frequency
, new GraphViewData(3, 2.5d)
, new GraphViewData(4, 1.0d)
, new GraphViewData(5, 3.0d)
} // data
, "GraphViewDemo" // heading
, null // dynamic labels
, null // dynamic labels
);
LinearLayout layout = (LinearLayout) findViewById(R.id.graph1);
layout.addView(graphView);