i using GraphView in my app.. that graphview have Legend option.. it's fine .. but the legend will show all the draw line in my graphview.. my code..
GraphViewSeries g1 = new GraphViewSeries("", new GraphViewSeriesStyle(Color.WHITE, 1/3),new GraphViewData[] {
new GraphViewData(-5,0d),
new GraphViewData(5,0d),
});
GraphViewSeries g2 = new GraphViewSeries("", new GraphViewSeriesStyle(Color.WHITE, 1/3),new GraphViewData[] {
new GraphViewData(0,-5d),
new GraphViewData(0,5d),
});
GraphViewSeries red = new GraphViewSeries("Red", new GraphViewSeriesStyle(Color.RED, 3),new GraphViewData[] {
new GraphViewData(-4,-4d),
new GraphViewData(4,4d),
});
GraphViewSeries green = new GraphViewSeries("Green", new GraphViewSeriesStyle(Color.GREEN, 3),new GraphViewData[] {
new GraphViewData(-4,-3d),
new GraphViewData(-4,0d),
new GraphViewData(0.6,0d),
new GraphViewData(0.6,4d),
});
GraphView graphView = new LineGraphView(this.getActivity(), " ");
graphView.setShowLegend(true);
graphView.setLegendAlign(LegendAlign.BOTTOM);
graphView.setLegendWidth(250);
this code shows all the four lines to Legend..
but i want only add two particular line(red & Green) into Legend.. how it's done.. kindly tell easiest way to done this..
thanks in advance..