Closed (fixed)
Project:
Charts and Graphs
Version:
6.x-2.2
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Reporter:
Created:
12 Oct 2010 at 11:14 UTC
Updated:
3 May 2011 at 16:41 UTC
Not sure if this issue is with how drupal uses the Bluff chart api or the Bluff chart api itself. When using the SideBar graph, the x axis values do not match to the data range in the graph, it always starts from 0 even though the smallest value in the graph is higher than this.
An example of this can be seen using the code below:
$canvas = charts_graphs_get_graph('bluff');
$canvas->title = "Bluff Chart";
$canvas->type = "SideBar"; // a chart type supported by the charting engine. See further in the doc for the list.
$canvas->y_legend = "Y Legend";
$canvas->colour = '#D54C78';
$canvas->theme = '37signals';
$canvas->series = array(
'jan' => array(88),
'feb' => array(86),
'mar' => array(80),
'apr' => array(82),
'may' => array(88),
'jun' => array(85),
'jul' => array(89),
'aug' => array(90),
'sep' => array(92),
'oct' => array(84),
'nov' => array(83),
'dec' => array(81),
);
$canvas->x_labels = array('humidity am');
$out = $canvas->get_chart();
return $out;
Using the code above creates a graph with x axis values from 0-90, but the bars are displayed from the minimum value in the data(80).
Therefore the bars do not match correctly with the x axis.
I hope this is explained clearly, but using the example code shows the problem clearly.
Comments
Comment #1
rsevero commentedIt seems to be a upstream issue.
Sent as http://github.com/jcoglan/bluff/issues#issue/9.
Comment #2
rsevero commentedFixed with Bluff update on http://drupalcode.org/project/charts_graphs.git/commit/afcfdad