Błąd jaki mi wyrzuca to Division by zero - dzielenie przez zero czy coś w tym stylu.
błędy w linijkach: 32, 40, 62
<?php class LabChartsLine extends LabCharts { private $min; private $max; public function __construct () { $this->_type = 'lc'; $this->_colors = 'FAAC02'; $this->_size = '300x150'; } protected function dataToString ($data) { $str = 't:'; foreach ($data as $value) { if ($this->max != $this->min) { $str .= $newValue . ','; } else { $str .= $newValue . ','; } } } public function setAxis ($rangeY, $labelsX) { if ($this->max != $this->min) { } else { } $strLabels = '0:'; $strPosition = '0'; for ($a = $this->getFirstOfRange($rangeY); $a <= $this->max; $a += $rangeY) { $strLabels .= '|' . $a; } for ($a = $this->getFirstGrid($rangeY); $a <= 100; $a += $newRange) { $strPosition .= ',' . $a; } $this->_axis = 'y,x'; $this->_axisRange = $strLabels . '|1:|' . $labelsX; $this->_axisPosition = $strPosition; } public function setGrids ($rangeY) { if ($this->max != $this->min) { } else { } $this->_grids = $newRangeX . ',' . $newRangeY . ',3,3,0,' . $this->getFirstGrid($rangeY); } private function getFirstGrid($rangeY) { if ($this->max != $this->min) { return round((1 - ($this->max - $this->getFirstOfRange($rangeY)) / ($this->max - $this->min)) * 100, 3); } else { } } private function getFirstOfRange($rangeY){ for ($pierwszyPodzielny = $this->min; $pierwszyPodzielny <= $this->max; $pierwszyPodzielny++){ break; } return $pierwszyPodzielny; } } ?>
mógłby ktoś mi podpowiedzieć jak temu zaradzić ? jeżeli wszystkie wartości są takie same to na wykresie powinna się pojawić pozioma linia i tyle.
Dzięki z góry!