Issue #659 resolved

Unable to use jqplot with Javascript compressors

Chris 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 reporter

    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