Menu

#11 wrong maximumX function for Bar Chart

open
nobody
None
5
2005-01-16
2005-01-16
swisscarbon
No

the maximumX value in Bar.php is calculated using the number of
Bins

function _maximumX()
{
if ($this->_dataset) {
return $this->_dataset->count() + 1;
}
}

this does not work if you've got a dataset where the bins are spread
over a bigger distance.

IMHO the function should look something like:

function _maximumX()
{
if ($this->_dataset) {
return $this->_dataset->maximumX() +1;
}
}

the minimumX function too, could be replaced acordingly.

Discussion


Log in to post a comment.