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.setBackgroundPaint(c);
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...
Cheers,
//ata
chf=bg,s,aarrggbb
Re: chf=bg,s,aarrggbb
Hi atamar, did you manage to solve the shadows on the pie?
Thanks,
Andres
Thanks,
Andres
-
- Posts: 1
- Joined: Thu Oct 20, 2011 10:13 am
- antibot: No, of course not.
Re: chf=bg,s,aarrggbb
Would the developers like me to submit a patch for this?
Re: chf=bg,s,aarrggbb
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?