I am generating a chart graph for a single series and single renderer. I need to be by bars resulting from different colors according to my given data condition I
My code for the renderer,
private XYMultipleSeriesRenderer getDemoRenderer ( ) {XYMultipleSeriesRenderer renderer = new XYMultipleSeriesRenderer (); Renderer.setBarSpacing (1.0); Renderer.setAxisTitleTextSize (12); Renderer.setChartTitleTextSize (12); Renderer.setLabelsTextSize (15); Renderer.setLegendTextSize (15); Renderer.setPointSize (5F); Renderrkset margin (new Int [] (20, 30, 15, 0}); renderer.setXLabels (0); XYSeriesRenderer r = new XYSeriesRenderer (); SQLiteDatabase DB = context KopenOrCreateDatabase ( "water Iclektrikiti Reedingdetabes. DB" MODE_WORLD_READABLE, null); cursor C = dB. Stroing ( "Piccing well, reading mode, water Iclrisiti the" blank); if (CkmoveToFirst ()) {do {string reading mode = c. gate string (c .getColumnIndex ("ReadingMode"); if (Reading Madcountain ("water")) (R. seat color (color. Grain);} and if (Reading Maddict Ukraine ( "Electricity")) {r. Rngrng (color. WHITE);}} while (c.moveToNext ());} R.setPointStyle (PointStyle.DIAMOND); r.setFillBelowLine (false); r.setFillPoints (right ); renderer.addSeriesRenderer (R); setChartSettings (renderer); return renderer;} If the above code reading Mood "water", so I often arising in green color For the second and the second, if I run the above code in white, then I have seen that all the bars are made in green color. In my database, I have to record with reading mode as "water" and "electricity". But why is this happening? Do I need to take several renders, but do I have a series?
Can someone recommend me a good solution? My head is about to break.
Any help would be appreciated !! Thanks in advance!!
check accepted the answer in the link
OR < / Code> Use a different series for each time.
Some people reported a problem about the same
No comments:
Post a Comment