This extension is jqplot

protected/extensionsSee the following code example:
$this->widget('application.extensions.jqplot.JqplotGraphWidget', array( 'data'=>array( array(array(2006, 4),array(2008, 9),array(2009, 16)), array(array(2006, 3),array(2007, 7),array(2008, 6),), array(array(2006, 5),array(2007, 1),array(2008, 3),array(2009, 7),), array(array(2006, 2),array(2007, 5),array(2008, 4),array(2009, 9),) ), 'options'=>array( 'seriesDefaults'=>array( 'renderer'=>'js:$.jqplot.BarRenderer', 'rendererOptions'=>array('barPadding'=>10,'barMargin'=>10) ), 'legend'=>array('show'=>'true','location'=>'nw'), 'title'=>'Exponential Line', 'axes'=>array( 'xaxis'=>array('renderer'=>'js:$.jqplot.CategoryAxisRenderer'), 'yaxis'=>array('min'=>-10, 'max'=>240,'numberTicks'=>6) ), ), 'htmlOptions'=>array( 'style'=>'width:400px;height:300px;' ), 'pluginScriptFile'=>array( 'jqplot.dateAxisRenderer.js', 'jqplot.barRenderer.js', 'jqplot.categoryAxisRenderer.js') ) );
指南:http://blog.csdn.net/gaoyusi4964238/archive/2009/07/25/4378459.aspx
Usage Documentation: http://www.jqplot.com/docs/files/usage-txt.html
Total 8 comments
Data Labels don't render without error.
Uncaught TypeError: Object # has no method 'u2p'
Thanks a lot for this great plugin!
Very nice plugin, does what it says on the tin.
this is one of the best extension in creating a chart.
But is there any more detail of example in the usage?
for example, the way to change the label from series, to anything that we desire. or does anyone can show me if there are a link that shows that kind of example above?
thank you for your kind response.
Similarly, in jquery.jqplot.css:
I tried this extension, but the legend doesn't display correctly. It uses table and we have already had table class in screen.css. So I customize the table class to :
table:not(.jqplot-table-legend):not(.jqplot-highlighter)
And it works fine now.
Anyway, thanks for sharing this. Good work!
Ok, Ipost the modifications to use ajax loading, if somebody is interested.
I modified JqplotGraphWidget this way : (this is the complete file)
You can now use ajax loading :
My test file 'data.test.php' contains :
It's a nice plugin, however it could be really nice to extend it with: - ajax data loading if needed - use of minified files if needed
I wrote these extensions, let me know if you're interested in, I can post modifications or maybe create a new extension if sharehua doesn't want to extend his code.
Leave a comment
Please login to leave your comment.