I looked through the documentations, but couldn't find how to add user-defined colors to the graph elements (not to the whole graph, but to every element separately).
I'm using the bluff plugin with views. With a VBO view I pass nodeids, and from the selected nodes I create a bar-graph, but instead of giving every bar one color (or different to each) I would like to decide which bar should be in which color. Like I can define the series, I would like to define the colors as well:
$canvas->series = array(
'Data' => array(3,4,7,9,10)
);
$canvas->series_colors = array(
'Data' => array(white,white,yellow,red,red)
);
Is this possible with this version, or would it be possible in the next versions?
Comments
Comment #1
rsevero commentedImplemented with http://drupal.org/cvs?commit=452168, http://drupal.org/cvs?commit=452402, http://drupal.org/cvs?commit=452422 and http://drupal.org/cvs?commit=452582.
Comment #3
pakati commentedversion 2.6:
Thank you for your work. We are getting there :)
This solution is useful if I have more series of data, and I would like to assign to each serie a color.
Would it be possible, not only coloring series but data within each series?
My original request was about coloring each bar differently within 1 serie.
$canvas->series = array(
'Data' => array(3,4,7,9,10)
);
$canvas->series_colors = array(
'Data' => array(white,white,yellow,red,red)
);
Thank you.
Comment #4
rsevero commentedI don't know how to do it in any of the charting libraries available. If someone can point out how to do it in any of the implemented libraries it might be done.