1. Chris Leonello
  2. jqplot
Issue #705 resolved

pointLabels prints null values

created an issue


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?


Comments (9)

  1. jens_ reporter

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

    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 (' 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