summaryrefslogtreecommitdiffstats
path: root/src/axis
diff options
context:
space:
mode:
authorKore Nordmann <github@kore-nordmann.de>2007-02-15 13:09:36 +0000
committerKore Nordmann <github@kore-nordmann.de>2007-02-15 13:09:36 +0000
commitd3c0d8a0f12ae2a9a9252adeb527843171150e99 (patch)
tree8d06c7dc0b0c510402dccf09cdc809c4c7ea7b0b /src/axis
parent9873a43cd9fa983041ae97ea56d7a50fc569102e (diff)
downloadzetacomponents-graph-d3c0d8a0f12ae2a9a9252adeb527843171150e99.zip
zetacomponents-graph-d3c0d8a0f12ae2a9a9252adeb527843171150e99.tar.gz
- Another case fixed for bug #10018.
Diffstat (limited to 'src/axis')
-rw-r--r--src/axis/date.php17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/axis/date.php b/src/axis/date.php
index ce7d6b6..bbf2bd4 100644
--- a/src/axis/date.php
+++ b/src/axis/date.php
@@ -218,6 +218,23 @@ class ezcGraphChartElementDateAxis extends ezcGraphChartElementAxis
}
}
+ if ( ( $this->properties['startDate'] !== false ) &&
+ ( $this->properties['endDate'] !== false ) )
+ {
+ // Use interval between defined borders
+ if ( ( $diff % $interval ) > 0 )
+ {
+ // Stil use predefined date format from old interval if not set
+ if ( $this->properties['dateFormat'] === false )
+ {
+ $this->properties['dateFormat'] = $this->predefinedIntervals[$interval];
+ }
+
+ $count = ceil( $diff / $interval );
+ $interval = round( $diff / $count, 0 );
+ }
+ }
+
$this->properties['interval'] = $interval;
}
OpenPOWER on IntegriCloud