pointLabels prints null values

jens_ avatarjens_ created an issue

Hello,

the example at http://www.jqplot.com/tests/point-labels.php, when reproduced with a current (1.0.4-1121) jqPlot version, will print null values in data series labels as "null", instead of printing nothing. (example at "chart2") This cannot currently be undone with a labelFormatter, because (as it seems) the formatter function is ignored for null values.

Is there a quick easy fix available?

Thanks!

Comments (9)

  1. jens_

    Thank you - but that does not work since jqplot still spends a lot of time rendering the empty strings. I have graphs with >1000 datapoints, on a Core2Duo system the plot takes >2s to render then. (<100ms without the pointLabels) Isn't it possible to just skip nulls (and possibly empty strings) when rendering?

  2. jens_

    Try with a different browser. Here, Firefox 18.0 (on OS X) does not show 'null' strings, but Chrome 24 and Safari 6.0.2 do. I have a Ruby on Rails project and I imported the 'outfielding-jqplot-rails (1.0.4.1121)' gem into my project (see https://github.com/outfielding/jqplot-rails). Then I created a blank page with a DIV and copied the example from the above URL into the JS console. Except for the DIV ID I changed nothing.

  3. Floris Luiten

    I can confirm that this happens on an iPad (native Safari) as well. Also running Chrome 23.0 (Linux desktop) prints "null". Running FF 18.0.1 (Linux desktop) does work as expected (doesn't print the string null) so it seems to be a browser issue.

  4. Zack Nichols

    I grabbed the latest version not too long ago (1.0.8r1250) and the minified version (jqplot.pointLabels.min.js) still shows null labels (in FF 21 and IE9). The non-min version (jqplot.pointLabels.js) works as expected.

  5. 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 ProjectModifiedEvent.java.
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.