Consider the following code as an example:
$chart = array(
'#chart_id' => 'test_chart',
'#title' => chart_title(t('Bar Chart'), '0000ee', 15),
'#type' => CHART_TYPE_BAR_V,
'#size' => chart_size(400, 200),
'#grid_lines' => chart_grid_lines(30, 15),
'#bar_size' => chart_bar_size(15, 5),
);
$chart['#data'][] = 40;
$chart['#data'][] = 60;
$chart['#data'][] = 20;
$chart['#data_colors'][] = chart_unique_color('test_a');
$chart['#data_colors'][] = chart_unique_color('test_b');
$chart['#data_colors'][] = chart_unique_color('test_c');
I expected Three different colors, as in this example.
But the result I got was Only one color for all bars, as in this example.
Comments
Comment #1
toleillo commentedI attached one patch for this issue.
Comment #2
juhaniemi commented#1 fixes the problem, thanks for the patch!
Comment #3
13rac1 commentedBar charts support both | and , depending on how the colors should be applied. See: http://code.google.com/apis/chart/image/docs/gallery/bar_charts.html#ser...
Comment #4
accessiveapps commentedsorry guys ... having the same prob but just wanted to search in 7 dev not 6 dev ... my bad :)
Comment #5
accessiveapps commentedComment #6
Pierre.Vriens commentedComment #7
Pierre.Vriens commentedComment #8
Pierre.Vriens commentedI've slightly reformatted the issue description (didn't change the issue details), since I want to start using this issue as a sample issue of how to effectively report issues related to the Chart API, i.e.:
50% of solving a problem is to understanding the problem, right?
Anyway, thank you Juan (sorry it took 4 years ...) for such a detailed issue (I just slightly reformatted it now).
Comment #9
avpadernoI am closing this issue, as Drupal 6 is no longer supported.