在 jqplot 中显示组图

Show group chart in jqplot

如何在 jqplot 中显示一个订单号的柱线总和。我想将每个月的值显示为该栏顶部的总和,如下图所示。

开始提琴手 http://jsfiddle.net/bywfc5xx/1/

`var s1 = [200, 600, 700, 1000];
var s2 = [460, 210, 690, 820];
var s3 = [260, 440, 320, 200];
// Can specify a custom tick Array.
// Ticks should match up one for each y value (category) in the series.
var ticks = ['May', 'June', 'July', 'August'];`

请帮忙。

我不明白你想做什么,总计使用:

var total = [s1[0] + s2[0] + s3[0], s1[1] + s2[1] + s3[1], s1[2] + s2[2] + s3[2], s1[3] + s2[3] + s3[3]];

var plot1 = $.jqplot('chart1', [s1, s2, s3, total], {..

实施: http://jsfiddle.net/e4zasp6L/

好的,知道了,这是更新后的答案:http://jsfiddle.net/282tkr12/

series:[
        {
              label:'Total',
              color: 'blue' ,
              renderer: $.jqplot.BarRenderer,
              rendererOptions: { 
                  barWidth:80,
                  shadowAlpha: 0,
                  barPadding: -86,
              }
            },
            {label:'Hotel'},
            {label:'Event Registration'},
            {label:'Airfare'}                
        ]