#18 Per-point (versus per-serie) color palette

open
5
2009-03-09
2009-03-09
Koztoh
No

Hello,

I'm trying to make this kind of graph with pChart:
http://chart.apis.google.com/chart?chs=400x200&cht=bvs&chd=s:3wWLC&chl=0-5|5-10|10-15|15-30|%3E%2030&chxt=y&chxr=0,0,160&chbh=56,16&chco=008000|80C020|FFFF00|FF8000|FF0000&chm=R,FF0000,0,0.4,0.402&chg=0,62.5,1,5
(a simple bar chart, with only one serie, but each bar having a different color in order to show a growing level of "danger")

With current version of pChart (1.27), I'm able to do almost everything... except the color change between bars...
Am I missing something ?
I've tried different tricks, like using stacked bars and 5 series ([N1,0,0,0,0], [0,N2,0,0,0], etc.) instead of a single one, but the code gets overcomplicated and the result is ugly (0 values are still displayed as a colored line under or over the "stacked" bar)...
The solution (like in Google Chart API) would be to allow a per-point color setting...
Which would mean adding a way of defining each point's color in the data structure, and optionnally telling the graph to use the per-point color instead of the per-serie color palette...

Is this feature planned in a future release, or do I have to tweak the class code myself (which I can do, but it's a pitty) ?

Thanks in advance,

Toh

Discussion


Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks