Issue #504 duplicate

jqPlot crashes when there is only a single datapoint.

Anonymous avatarAnonymous created an issue

I retrieve my data via ajax, and sometimes, this will result in the following data:

[[["2010-10-10", 10]]]

This causes some kind of infinite loop to happen.

    $(document).ready(function () {
        $.getJSON('@Url.Action("ProfitOverTime", "Results", new { id = Model })',
            function (results) {
                $.jqplot('plottingOverTime', results,
                        axes: { xaxis: { renderer: $.jqplot.DateAxisRenderer} },
                        highlighter: { show: true }

Comments (5)

  1. Anonymous

    Hits me also. Some observations:

    - same with javascript arrays

    - bug not occuring if 'min' is specified for xaxis

    - bug not occuring if 'tickInterval' specified for xaxis, but rendering is incorrect

  2. Anonymous

    I have the same problem. It looks a simple bug, I hope it will be fixed soon.

    When you define a min or max, then the bug is gone and it is able to draw the axis because now it has 2 points on it (one data and one min/max)

  3. 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.