一张图表中的jqplot不同种类的渲染 [英] Jqplot different kinds of rendering in one chart

查看:90
本文介绍了一张图表中的jqplot不同种类的渲染的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想构建类似示例中的图表的东西:barLineAnimated.html. 我的问题是;我有1个以上的系列,我希望将其渲染为条形,而一个应渲染为线形. 我无法理解示例:示例中的2系列之一将以不同的方式呈现.

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.

如何设置单个系列的渲染类型?

推荐答案

在jqplot构造函数中尝试以下操作:

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)

这篇关于一张图表中的jqplot不同种类的渲染的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆