Jqplot different kinds of rendering in one chart

2019-09-05 14:29发布

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条回答
放荡不羁爱自由
2楼-- · 2019-09-05 14:43

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)

查看更多
登录 后发表回答