ECharts 中的极坐标(polar)配置中,坐标轴指示器可以通过设置 indicator 属性来进行配置。下面是一个简单的例子,演示如何设置坐标轴指示器属性:
option = {
    polar: {
        center: ['50%', '50%'],
        radius: '80%'
    },
    tooltip: {
        trigger: 'axis',
        axisPointer: {
            type: 'cross'
        }
    },
    angleAxis: {
        type: 'value',
        startAngle: 0
    },
    radiusAxis: {
        min: 0
    },
    polar: {
        center: ['50%', '50%'],
        radius: '80%'
    },
    series: [{
        type: 'bar',
        data: [2, 1, 3, 4],
        coordinateSystem: 'polar',
        name: 'A',
        stack: 'a'
    }, {
        type: 'bar',
        data: [5, 1, 2, 6],
        coordinateSystem: 'polar',
        name: 'B',
        stack: 'a'
    }, {
        type: 'bar',
        data: [1, 2, 3, 4],
        coordinateSystem: 'polar',
        name: 'C',
        stack: 'a'
    }],
    indicator: [
        { text: '指示器1', max: 5 },
        { text: '指示器2', max: 5 },
        { text: '指示器3', max: 5 },
        { text: '指示器4', max: 5 }
    ]
};

在上面的例子中,通过 indicator 属性设置了四个指示器,每个指示器都有一个文本和最大值。这些指示器将在极坐标图中显示,用于表示每个数据项的相对大小。你可以根据需要调整指示器的数量、文本和最大值。


转载请注明出处:http://www.zyzy.cn/article/detail/5230/ECharts