100% CPU usage with stacked bar renderer having only one point

Tomasz Nurkiewicz avatarTomasz Nurkiewicz created an issue

The following bar chart with date X-axis renders fine:

var chartData = [
    [
        [new Date(2012, 3, 19), 1],
        [new Date(2012, 3, 20), 2]
    ],
    [
        [new Date(2012, 3, 19), 2],
        [new Date(2012, 3, 20), 3]
    ]
];

$.jqplot("chart", chartData, {
    stackSeries: true,
    seriesDefaults: {
        renderer: $.jqplot.BarRenderer
    },
    axes: {
        xaxis: {
            renderer: $.jqplot.DateAxisRenderer
        }
    }
});

However removing the second bar causes the script to use 100% CPU and eventually browser kills it:

var chartData = [
    [
        [new Date(2012, 3, 20), 2]
    ],
    [
        [new Date(2012, 3, 20), 3]
    ]
];

I am using jqPlot 1.0.0b2_r1012 with the following plugins:

<script src="jquery.jqplot.js"></script>
<script src="jqplot.dateAxisRenderer.js"></script>
<script src="jqplot.categoryAxisRenderer.js"></script>
<script src="jqplot.barRenderer.js"></script>

Comments (1)

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