Android studio showing error in graph.addSeries(series). The android studio is showing red underline in series of graph.add(series) -
public view oncreateview(layoutinflater inflater, viewgroup container, bundle savedinstancestate) {
// inflate layout fragment view rootview= inflater.inflate(r.layout.fragment_graph, container, false); graphview graph = (graphview) rootview.findviewbyid(r.id.graph); bargraphseries<datapoint> series = new bargraphseries<>(new datapoint[] { new datapoint(0, 1), new datapoint(1, 5), new datapoint(2, 3), new datapoint(3, 2), new datapoint(4, 6) }); graph.addseries(series); return rootview; }
i have tackled error. changed dependencies compile 'com.jjoe64:graphview:4.2.2' compile 'com.jjoe64:graphview:4.0.1' in build.gradle.
Comments
Post a Comment