美文网首页
antv-g2雷达图基础配置

antv-g2雷达图基础配置

作者: DSuperLu | 来源:发表于2020-09-27 11:09 被阅读0次
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
                }
            }
        },
    };

相关文章

网友评论

      本文标题:antv-g2雷达图基础配置

      本文链接:https://www.haomeiwen.com/subject/xtikuktx.html