jqplot same properties for multiple plots -
question reusing plot properties e.g.
plot_x = $.jqplot('somedivid_x', [line], { grid: { background: "rgba(0,0,0,0.0)", drawborder: false, shadow: false, color: "#fff" }, series:[ { pointlabels:{ show: true, location:'s', ypadding : 5, edgetolerance : -100, }}], seriescolors: ["#ff666d"], seriesdefaults:{ renderer:$.jqplot.barrenderer, rendereroptions: { filltozero: true, barwidth: '60' } }, axes: { xaxis: { renderer: $.jqplot.dateaxisrenderer, }, yaxis: { min:0, max:100 } } });
this plot definition attached somedivid_x. want reuse definition similar plots using same properties
this how can achieve it.
var plotoptions = { grid: { background: "rgba(0,0,0,0.0)", drawborder: false, shadow: false, color: "#fff" }, series:[ { pointlabels:{ show: true, location:'s', ypadding : 5, edgetolerance : -100, }}], seriescolors: ["#ff666d"], seriesdefaults:{ renderer:$.jqplot.barrenderer, rendereroptions: { filltozero: true, barwidth: '60' } }, axes: { xaxis: { renderer: $.jqplot.dateaxisrenderer, }, yaxis: { min:0, max:100 } } }; plot_x = $.jqplot('somedivid_x', [line], plotoptions); plot_y = $.jqplot('somedivid_y', [line], plotoptions); plot_z = $.jqplot('somedivid_z', [line], plotoptions);
Comments
Post a Comment