Page 1 of 1


Posted: Wed Oct 15, 2008 8:44 am
by atamar
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...


Re: chf=bg,s,aarrggbb

Posted: Fri Dec 03, 2010 9:52 pm
by anchavesb
Hi atamar, did you manage to solve the shadows on the pie?



Re: chf=bg,s,aarrggbb

Posted: Tue Oct 25, 2011 3:14 am
by Angela_Carol
Would the developers like me to submit a patch for this?

Re: chf=bg,s,aarrggbb

Posted: Thu Dec 04, 2014 1:50 pm
by sara736
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?