问题
I would like to build somthing like the chart in the sample: barLineAnimated.html. my problem is; i have more then 1 series, which i like to render as bars, and one should be rendered as line. I can't undestand the sample: one the 2 series in the sample will be rendered in different way.
How can i set the kind of rendering for the single series?
回答1:
Try this inside the jqplot constructor:
seriesDefaults : {
renderer: $.jqplot.BarRenderer,
rendererOptions : {
barWidth: 30
}
},
series : [{}, {}, {}, {
renderer: $.jqplot.LineRenderer
}]
You can only set one series to be drawn either as line or bar... unless you are adding a trendline (which is different concept altogther). You can add multiple series in one plot and show them in different rendering (bar + line)
来源:https://stackoverflow.com/questions/16375459/jqplot-different-kinds-of-rendering-in-one-chart