Issue #659 resolved

Unable to use jqplot with Javascript compressors

Chris Spencer avatarChris Spencer created an issue

It's common practice to use Javascript compression engines like YUI or JSMin to bundle and compress all Javascript files into a single file for fast distribution and deployment. However, due to the design of jquery.jqplot.js, this is not possible with Jqplot. This is because the file initializes the library by looking for the <script> tag that defines "jquery.jqplot.js". Since this file is not directly linked when it's bundled, the error "TypeError: Cannot read property 'root' of undefined" is thrown, preventing jqplot from rendering any plots.

If you remove all the "getRootNode" functionality, and skip auto-appending includes, this should fix the problem.

Comments (3)

  1. Chris Spencer

    I like using my own compressor with the uncompressed JS. However, I now realize that the jquery.jqplot.js file is optional, as all it does is generate includes for the other files. Feel free to close this.

  2. Log in to comment
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.