diff options
author | Kore Nordmann <github@kore-nordmann.de> | 2006-12-13 11:10:53 +0000 |
---|---|---|
committer | Kore Nordmann <github@kore-nordmann.de> | 2006-12-13 11:10:53 +0000 |
commit | ab61c80e08eba3477e8918d3357d37f9d104fc0c (patch) | |
tree | dd71bc6c02aba37257de3001e504b2e41b990777 /src/charts/line.php | |
parent | 5c274a550bf732ff5ffaf59db0d4a5f7b86a521e (diff) | |
download | zetacomponents-graph-ab61c80e08eba3477e8918d3357d37f9d104fc0c.zip zetacomponents-graph-ab61c80e08eba3477e8918d3357d37f9d104fc0c.tar.gz |
- Fixed: Bug #9795 (Interferring bars, when bars count is higher then major
step count)
Diffstat (limited to 'src/charts/line.php')
-rw-r--r-- | src/charts/line.php | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/charts/line.php b/src/charts/line.php index f33910e..8d2c0ad 100644 --- a/src/charts/line.php +++ b/src/charts/line.php @@ -211,10 +211,16 @@ class ezcGraphLineChart extends ezcGraphChart } break; case ezcGraph::BAR: + $barCount = ( + ( count ( $data ) - 1 ) > $this->elements['xAxis']->getMajorStepCount() ? + ( $this->elements['xAxis']->getMajorStepCount() + 1 ) * ( $this->elements['xAxis']->getMinorStepCount() - 1 ) : + $this->elements['xAxis']->getMajorStepCount() + ); + $width = $this->elements['xAxis']->axisLabelRenderer->modifyChartDataPosition( $this->elements['yAxis']->axisLabelRenderer->modifyChartDataPosition( new ezcGraphCoordinate( - ( $boundings->x1 - $boundings->x0 ) / $this->elements['xAxis']->getMajorStepCount(), + ( $boundings->x1 - $boundings->x0 ) / $barCount, 0 ) ) |