我们能否在森伯斯特图表中使用平均聚合而不是求和来获得更高的水平

时间:2019-01-25 20:22:02

标签: highcharts sunburst-diagram

我有一些数据需要在Sunburst进行钻取时进行平均。现在,它会将数据汇总到较低级别。有没有可以对它求平均而不是求和的选项。

https://jsfiddle.net/gh/get/library/pure/highcharts/highcharts/tree/master/samples/highcharts/demo/sunburst

我可以添加一些选项使其平均而不是加起来

series: [{
    type: "sunburst",
    data: data,
    stacking: 'percent',
    allowDrillToNode: true,
    cursor: 'pointer',
    dataLabels: {
        format: '{point.name}',
        filter: {
            property: 'innerArcLength',
            operator: '>',
            value: 16
        }
    },
    levels: [{
        level: 1,
        levelIsConstant: false,
        dataLabels: {
            filter: {
                property: 'outerArcLength',
                operator: '>',
                value: 64
            }
        }
    }, {
        level: 2,
        colorByPoint: true
    },
    {
        level: 3,
        colorVariation: {
            key: 'brightness',
            to: -0.5
        }
    }, {
        level: 4,
        colorVariation: {
            key: 'brightness',
            to: 0.5
        }
    }]

}],

0 个答案:

没有答案