Tags:
create new tag
view all tags
---+!! !JqPlotPlugin <!-- Contributions to this plugin are appreciated. Please update the plugin page at http://twiki.org/cgi-bin/view/Plugins/JqPlotPlugin or provide feedback at http://twiki.org/cgi-bin/view/Plugins/JqPlotPluginDev. If you are a TWiki contributor please update the plugin in the SVN repository. One line description, required for extensions repository catalog. * Set SHORTDESCRIPTION = Add line, bar and pie charts to TWiki topics using jqPlot !JavaScript library --> <sticky> <div style="float:right; background-color:#EBEEF0; margin:0 0 20px 20px; padding: 0 10px 0 10px;"> %TOC{title="Page contents"}% </div> </sticky> %SHORTDESCRIPTION% ---++ Usage <verbatim> %JQPLOT{"canvasTextRenderer,canvasAxisLabelRenderer"}% <div id='chart1' style='height:280px; width: 500px;'></div> <script> $.jqplot ('chart1', [[3,7,9,1,4,6,8,2,5]]); </script> </verbatim> <!-- The following would look better if the real thing and the screenshot are displayed side-by-side. But on IE 7, a jqplot generated graph is not displayed in a table cell. --> __Resulting chart (if plugin is installed and enabled):__ %JQPLOT{"canvasTextRenderer,canvasAxisLabelRenderer"}% <div id='chart1' style='height:280px; width: 500px;'></div> <script> $.jqplot ('chart1', [[3,7,9,1,4,6,8,2,5]]); </script> __Simulated (screenshot):__ <div> %ATTACHURL%/chart1.png </sticky> More examples are found in the [[http://www.jqplot.com/deploy/dist/examples/][official jqPlot website]]. ---++ Description [[http://www.jqplot.com/][jqPlot]] is a "pure javascript plotting" library, and this TWiki plugin bundles the package with easy setup using =%<nop>JQPLOT%= tag. Since jqPlot depends on the jQuery !JavaScript library, JQueryPlugin must be installed for JqPlotPlugin to work. When a =%<nop>JQPLOT%= tag is present, the necessary !JavaScript and CSS references are added to the =<head>= of the page. The =%<nop>JQPLOT%= tag itself is expanded into an empty string. Even if the tag happens to be used multiple times, the required references are added only once. In order to use jqPlot plugins (for bar charts, pie charts, axis labels, etc.), the plugin names should be added to the =%<nop>JQPLOT%= tag. <verbatim> %JQPLOT{"barRenderer, pieRenderer, categoryAxisRenderer"}% or %JQPLOT{"barRenderer"}% %JQPLOT{"pieRenderer"}% %JQPLOT{"categoryAxisRenderer"}% </verbatim> The above will add the =<script>= tags to the =<head>= as below: <verbatim> <script type="text/javascript" src=".../plugins/jqplot.barRenderer.min.js"></script> <script type="text/javascript" src=".../plugins/jqplot.pieRenderer.min.js"></script> <script type="text/javascript" src=".../plugins/jqplot.categoryAxisRenderer.min.js"></script> </verbatim> All the common references such as =jquery.jqplot.min.js= (which would be added by the empty =%<nop>JQPLOT%=) are also added automatically. ---++ Installation Instructions __Note:__ You do not need to install anything on the browser to use this plugin. The following instructions are for the administrator who installs the plugin on the TWiki server. * For an __automated installation__, run the [[%SCRIPTURL{configure}%][configure]] script and follow "Find More Extensions" in the in the __Extensions__ section. * See the [[http://twiki.org/cgi-bin/view/Plugins/BuildContribInstallationSupplement][installation supplement]] on TWiki.org for more information. * Or, follow these __manual installation__ steps: * Download the ZIP file from the Plugins home (see below). * Unzip ==%TOPIC%.zip== in your twiki installation directory. Content: | *File:* | *Description:* | | ==data/TWiki/JqPlotPllugin.txt== | Plugin topic | | ==data/TWiki/VarJQPLOT.txt== | JQPLOT variable documentation topic | | ==lib/TWiki/Plugins/JqPlotPlugin.pm== | Plugin Perl module | | ==pub/TWiki/JqPlotPlugin/*.png== | Image files | | ==pub/TWiki/JqPlotPlugin/jquery.jqplot.*== | jqPlot library package | * Set the ownership of the extracted directories and files to the webserver user. * Install the dependencies. * Plugin __configuration and testing__: * Run the [[%SCRIPTURL{configure}%][configure]] script and enable the plugin in the __Plugins__ section. * Test if the installation was successful using the example above. ---++ Plugin Info Many thanks to the following sponsors for supporting this work: * Morgan Stanley | Plugin Author: | TWiki:Main.MahiroAndo | | Copyright: | © 2012-2013 TWiki:Main.MahiroAndo %BR% © 2012-2013 TWiki:TWiki.TWikiContributor | | License: | [[http://www.gnu.org/licenses/gpl.html][GPL (Gnu General Public License)]] | | Plugin Version: | 2013-03-06 jquery.jqplot.1.0.7r1224 | | Change History: | <!-- versions below in reverse order --> | | 2013-03-06: | Fixed Fast CGI/mod_perl unfriendliness, upgraded to jquery.jqplot.1.0.7r1224 | | 2012-11-14: | Initial release with jquery.jqplot.1.0.4r1121 | | Dependencies: | JQueryPlugin | | Plugin Home: | http://twiki.org/cgi-bin/view/Plugins/JqPlotPlugin | | Feedback: | http://twiki.org/cgi-bin/view/Plugins/JqPlotPluginDev | | Appraisal: | http://twiki.org/cgi-bin/view/Plugins/JqPlotPluginAppraisal | __Related Topics:__ %SYSTEMWEB%.VarJQPLOT, %SYSTEMWEB%.TWikiPlugins, %SYSTEMWEB%.DeveloperDocumentationCategory, %SYSTEMWEB%.AdminDocumentationCategory, %SYSTEMWEB%.TWikiPreferences
E
dit
|
A
ttach
|
Watch
|
P
rint version
|
H
istory
:
|
B
acklinks
|
V
iew topic
|
Ra
w
edit
|
M
ore topic actions
Topic revision: r0 - 2013-03-06
-
TWikiContributor
Home
Site map
Main web
Sandbox web
TWiki web
TWiki Web
User registration
Users
Groups
Index
Search
Changes
Notifications
RSS Feed
Statistics
Preferences
View
Raw View
Print version
Find backlinks
History
More topic actions
Edit
Raw edit
Attach file or image
Edit topic preference settings
Set new parent
More topic actions
User Reference
ATasteOfTWiki
TextFormattingRules
TWikiVariables
FormattedSearch
QuerySearch
TWikiDocGraphics
TWikiSkinBrowser
InstalledPlugins
Admin Maintenance
Reference Manual
InterWikis
ManagingUsers
ManagingWebs
TWikiSiteTools
TWikiPreferences
WebPreferences
Categories
Admin Documentation
Admin Tools
Developer Doc
User Documentation
User Tools
Account
Log In
Register User
E
dit
A
ttach
Copyright © 1999-2024 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki?
Send feedback
Note:
Please contribute updates to this topic on TWiki.org at
TWiki:TWiki.JqPlotPlugin
.