Bugs!

A discussion forum for the Eastwood Chart Servlet.
Locked
nrap
Posts: 3
Joined: Tue Jan 15, 2008 3:24 pm

Bugs!

Post by nrap » Tue Jan 15, 2008 3:30 pm

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

nrap
Posts: 3
Joined: Tue Jan 15, 2008 3:24 pm

Post by nrap » Tue Jan 15, 2008 4:47 pm

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);
 }

david.gilbert
JFreeChart Project Leader
Posts: 11734
Joined: Fri Mar 14, 2003 10:29 am
antibot: No, of course not.
Contact:

Post by david.gilbert » Tue Jan 15, 2008 4:56 pm

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?
David Gilbert
JFreeChart Project Leader

:idea: Read my blog
:idea: Support JFree via the Github sponsorship program

nrap
Posts: 3
Joined: Tue Jan 15, 2008 3:24 pm

Post by nrap » Wed Jan 16, 2008 8:32 am

Look at that...
It is a good solution (and much simpler than mine!)
thanx!

Locked