1
$(document).ready(function(){
    var l0 = [6,  11, 10, 13, 11,  7];
    var l1 = [3,   6,  7,  7,  5,  3];
    var l2 = [4,   8,  9, 10, 8,   6];
    var l3 = [9,  13, 14, 16, 17, 19];
    var l4 = [15, 17, 16, 18, 13, 11];

    var plot1 = $.jqplot("chart1", [l0, l1, l2, l3, l4], {
        title: "Fill between 2 lines",
        axesDefaults: {
            pad: 1.05
        },

        fillBetween: {
            series1: 1,
            series2: 3,
            color: "rgba(227, 167, 111, 0.7)",
            baseSeries: 0,
            fill: true
        },
        seriesDefaults: {
            rendererOptions: {
                smooth: true
            }
        }
    });

});

this example shows fill between 2 series. i need to fill the series 1,2 and 3,4 . stacked fill is not met my requirement.

4

1 回答 1

1

此功能仍然不存在。我一直致力于此代码的增强。 用于增强功能的 Bitbucket 拉取请求链接

此链接中的代码更改将帮助您解决问题。

更改代码后,为 fillbetween 属性传递 series1 和 series2 的值数组:

 fillBetween: {
        series1: [1,3],
        series2: [2,4],
        color: "rgba(227, 167, 111, 0.7)",
        baseSeries: 0,
        fill: true
    }

这样,您将能够填充系列 1,2 和 3,4 。

于 2013-06-18T13:20:42.887 回答