javascript - Why is jqplot behaving this way? -
i have chart consists of 4 series. 3 of 4 stacked bar charts , forth line. why graph acting way? assumed didn't matter in order passed in series $.jqplot
function. thought able adjust series using series
property , giving empty object ones didn't want adjust.
scorearray series want line chart want overlayed on bars. first attempt code:
$.jqplot("historychart", [scorearray, availablearray, unavailablearray, unknownarray], { stackseries: true, seriesdefaults : { renderer: $.jqplot.barrenderer, rendereroptions : { barwidth: 40 } }, series : [{ disablestack : true, renderer: $.jqplot.linerenderer }, {}, {}, {}], axesdefaults : { tickrenderer: $.jqplot.canvasaxistickrenderer, tickoptions: { angle: -45 } }, axes: { xaxis : { renderer: $.jqplot.categoryaxisrenderer, ticks: datearray } } } );
this generated graph:
now if made scorearray last series , adjusted series property accordingly, looks correct. here code , graph:
$.jqplot("historychart", [availablearray, unavailablearray, unknownarray, scorearray], { stackseries: true, seriesdefaults : { renderer: $.jqplot.barrenderer, rendereroptions : { barwidth: 40 } }, series : [{}, {}, {}, { disablestack : true, renderer: $.jqplot.linerenderer }], axesdefaults : { tickrenderer: $.jqplot.canvasaxistickrenderer, tickoptions: { angle: -45 } }, axes: { xaxis : { renderer: $.jqplot.categoryaxisrenderer, ticks: datearray } } } );
seems more bug me. have not set y axis min-max, skewing initial setup of axis. try setting min. may work
Comments
Post a Comment