- πΊπΈUnited States bluegeek9
Thank you for your contributions to this issue. As Drupal 7 has reached its End of Life and is no longer supported, we are closing this issue. We encourage you to upgrade to a supported version of Drupal.
I am partly recreating example 4 from here
https://www.drupal.org/node/2423443#example4 β
with the values below:
$chart['male'] = array(
'#type' => 'chart_data',
'#title' => t('Male'),
'#data' => array(0, 2, 0),
'#suffix' => 'lbs',
);
$chart['xaxis'] = array(
'#type' => 'chart_xaxis',
'#labels' => array('Jan', 'Feb', 'Mar'),
);
And I get the output in the first attachment:
Notice how the Yaxis says 0, 1, 1, 2, 2 instead of 0, 1, 2.
Then I change the code to:
$chart['male'] = array(
'#type' => 'chart_data',
'#title' => t('Male'),
'#data' => array(0, 3, 0),
'#suffix' => 'lbs',
);
$chart['xaxis'] = array(
'#type' => 'chart_xaxis',
'#labels' => array('Jan', 'Feb', 'Mar'),
);
Notice that I only changed 2 to 3 in the data array, and I get a proper Yaxis, that goes from 0 to 4 in proper steps:
I've been trying to debug this for the better part of the day, but I can't seem to locate the source of it.
It looks like, when there are not enough "big" values to create many rows in the Y axis, the system adds duplicates in order to create 5 rows, or something like that.
Any ideas?
Closed: outdated
2.0
Chart API
Not all content is available!
It's likely this issue predates Contrib.social: some issue and comment data are missing.
Thank you for your contributions to this issue. As Drupal 7 has reached its End of Life and is no longer supported, we are closing this issue. We encourage you to upgrade to a supported version of Drupal.