pChart 2.x forum http://wiki.pchart.net/forum/ |
|
pScatterTimeline http://wiki.pchart.net/forum/viewtopic.php?f=4&t=2214 |
Page 1 of 1 |
Author: | onnerby [ Fri Oct 21, 2011 6:37 pm ] | ||
Post subject: | pScatterTimeline | ||
Hi all! I had the need for a timeline in a scatter chart in one of projects, so I made this: So instead of creating a pScatter, create a pScatterTimeline and do the same with the chart. After "drawScatterScale()" just call "drawScatterTimeline()". This of course assumes that the xAxis is using unixtime for values. Options: 'border' = Color and weight of the border surrounding the timeline cells. 'row1' = Color of the first row of the timeline 'row2' = Color of the second row of the timeline 'rowtext1' and 'rowtext2' = Color of the text. 'levels' = This is an array of the different kind of levels that exists. Each level needs
This example will only change the output format for weeks. Code: $scatterChart->drawScatterTimeline(array( 'levels' => array( 3=>array('outputFormat'=>'v.W',), // level 3 is "week" ), )); The timeline will automatically decide the interval of the timeline (minutes, hour, day, week, month or year) Update: Timeline calculated wrong date. Sorry. Version 0.1 released and also adding options.
|
Page 1 of 1 | All times are UTC |
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group http://www.phpbb.com/ |