Jqplot different kinds of rendering in one chart

僤鯓⒐⒋嵵緔 提交于 2019-12-24 20:28:26

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!