antv-g2雷达图基础配置

2020-09-27  本文已影响0人  DSuperLu
image.png
const config = {
        data,
        angleField: "item",
        radiusField: "score",
        color: ['#23b895'], // 颜色
        angleAxis: {
            grid: {
                visible: false,
            },
        },
        radiusAxis: {
            tickCount: 5,
            grid: {
                alternateColor: ["rgba(0, 0, 0, 0.04)", null],
                line: {
                    type: "line" as "line",
                },
            },
            max: 100,
            label: {
                visible: true,
                suffix: "%",
            },
        },
        area: {
            visible: true,
        },
        point: {
            visible: true,
            style: {
                fill: '#fff'
            }
        },
        line: {
            visible: true,
        },
        tooltip: {
            visible: true,
            shared: false,
            formatter: (item, score) => {
                return {
                    name: item,
                    value: `${score}%` as any,
                    showTitle: false
                }
            }
        },
    };
上一篇 下一篇

猜你喜欢

热点阅读