Bug:"graphEvolution" can not show data "float" correctly


(cn_Dark) #1

Hello,

As the image shows, if the data is float, dataTable “graphEvolution” can not show it correctly.
[attachment=83:100.png]
How to fix it?


(vipsoft) #2

Is this a custom graph?

In core/Visualization/Chart.php, we’re truncating floats.

                $this->y->set_range( $this->minValue, (int) $this->maxValue, (int) $stepsEveryNLabel);

Change this to:

                $this->y->set_range( $this->minValue, (int) ceil( $this->maxValue), (int) $stepsEveryNLabel);

(cn_Dark) #3

[quote=vipsoft @ Aug 18 2009, 03:58 PM]Is this a custom graph?

In core/Visualization/Chart.php, we’re truncating floats.

                $this->y->set_range( $this->minValue, (int) $this->maxValue, (int) $stepsEveryNLabel);

Change this to:

                $this->y->set_range( $this->minValue, (int) ceil( $this->maxValue), (int) $stepsEveryNLabel);

[/quote]
Yes,this is a custom graph.
Thank you very much. Now my problem is solved by modifying is as you said.


(vipsoft) #4

Thanks. Will be in the 0.4.4 update.