Page 1 of 1

Bugs!

Posted: Tue Jan 15, 2008 3:30 pm
by nrap
As everything else new there are always bugs! :)

Suppose we need a pie chart with background color. If we set the background color for labels to i.e. cyan, and the background of the area to cyan as well, we shouldn't have anything in White color.

Check example here:

Code: Select all

chart.apis.google.com/chart?chf=bg,s,8ef1fd|c,s,8ef1fd&chco=b00404&chl=Local[14]|Long+Distance[122]|Vodafone[19]|Cosmote[45]|TIM[12]&chtt=Total+Calls+Count&cht=p&chs=600x300&chd=t:14,122,19,45,12
In our case, we see that everything changes into Cyan but the labels of the pie remain with white background.

Code: Select all

<local_server>/eastwood/chart?chf=bg,s,8ef1fd|c,s,8ef1fd&chco=b00404&chl=Local[14]|Long+Distance[122]|Vodafone[19]|Cosmote[45]|TIM[12]&chtt=Total+Calls+Count&cht=p&chs=600x300&chd=t:14,122,19,45,12
Still very happy with the result and the application though!!!
Keep up the good work. :D

Posted: Tue Jan 15, 2008 4:47 pm
by nrap
Messy solution ( I'm only using PieCharts for now)

At ChartServlet.java line 793 add

Code: Select all

 if (chart.getPlot() instanceof PiePlot3D) {
     	((PiePlot3D)chart.getPlot()).setLabelBackgroundPaint(c);
 }else if (chart.getPlot() instanceof PiePlot) {
        	((PiePlot)chart.getPlot()).setLabelBackgroundPaint(c);
 }

Posted: Tue Jan 15, 2008 4:56 pm
by david.gilbert
Thanks for the report. I've added this to the bug tracker:

http://sourceforge.net/tracker/index.ph ... id=1022207

I didn't look at this closely yet, but maybe setting the label background paint to null is a good solution?

Posted: Wed Jan 16, 2008 8:32 am
by nrap
Look at that...
It is a good solution (and much simpler than mine!)
thanx!