From jacp1...@gmail.com on October 25, 2013 11:38:46
What steps will reproduce the problem?
- Plot a simple graph with more than 10 data points, with color_per_datum set and a list of colours more than 12 entries long. The attached file contains a graph definition that exhibits the problem.
What is the expected output? What do you see instead?
I expect to see the bars colored in the order specified in the list. However from the 12th bar they are coloured black
What version of the product are you using? On what operating system?
Bargraph.pl v 4.7 Centos 5.6
Please provide any additional information below.
This seems to be because @fillstyle is not populated beyond element 11. The relevant code is below, I think the if ($custom_colors) section should also be setting $fillstyle[$i] to 20.
} elsif ($use_colors) {
$colorcount = $num_nongrayscale if ($color_per_datum);
# colors: all solid fill
for ($i=0; $i<$colorcount; $i++) {
$fillstyle[$i]=20;
}
if ($custom_colors) {
$colorcount = $#custom_color+1 if ($color_per_datum);
for ($i=0; $i<$colorcount; $i++) {
$fillcolor[$i]=$colornm{$custom_color[$i]};
}
} else {
Attachment: colourtest.txt
Original issue: http://code.google.com/p/bargraphgen/issues/detail?id=32