A discussion forum for the Eastwood Chart Servlet.


Postby atamar » Wed Oct 15, 2008 8:44 am

I noticed the following points trying to get mini-sized pie plots with eastwood 1.1.0:

* Parsing alpha colors doesn't work in ChartEngine
* Setting the background color doesn't actually work

The first item is a result of ChartEngine.parseColor() and .parseColors() using Color.decode(), which unfortunately doesn't do transparency. I rewrote parseColor() to support anything like "0xaarrggbb", "#aarrggbb", "#argb", "0xrgb", and color fiel names known to the Java class Color. This gets me past stage 1. (Code available on request - it's an ugly quick hack, and you can probably do better yourself. Also, Google Charts API actually seems to use RRGGBBAA.)

The second item would seem to require adding the background paint not to the chart, but to its plot:
Color c = parseColor(spec);
chart.getPlot().setBackgroundPaint( c );

Adding this to the ChartEngine.processFillSpec() "bg" portion gives me transparent background. Yay.

Would the developers like me to submit a patch for this?

Now, to figure out how to disable drop shadows in pie charts...

Posts: 2
Joined: Wed Oct 15, 2008 8:34 am

Re: chf=bg,s,aarrggbb

Postby anchavesb » Fri Dec 03, 2010 9:52 pm

Hi atamar, did you manage to solve the shadows on the pie?


Posts: 1
Joined: Fri Dec 03, 2010 9:15 pm

Re: chf=bg,s,aarrggbb

Postby Angela_Carol » Tue Oct 25, 2011 3:14 am

Would the developers like me to submit a patch for this?
Posts: 1
Joined: Thu Oct 20, 2011 10:13 am

Re: chf=bg,s,aarrggbb

Postby sara736 » Thu Dec 04, 2014 1:50 pm

The patch looks fine - thanks for adding it! There's some itemLabelPosition code in your new createBarChart() method in the ChartEngine class...does this get used?
Posts: 1
Joined: Thu Dec 04, 2014 1:48 pm

Return to Eastwood Chart Servlet

Who is online

Users browsing this forum: No registered users and 1 guest