使用echarts的graphic自定义背景图

2024-10-11 23:03:51

1、echarts提供的grpahic有多种。这里使用圆和文字作为示例,其他类似

使用echarts的graphic自定义背景图

3、默认的线条颜色和填充,可以通过style来修改。如果什么也不填充,可以设置fill:null

使用echarts的graphic自定义背景图

5、想让文本显示在圆心。这里可以设置水平和垂直对齐方式。使用起来非常方便

使用echarts的graphic自定义背景图

7、grpahic中棵褶佐峨还有个group类型的图,在group图形,可以在children中添加多个不同的图。设置了group的position值,其下children中所有的坐标都是以position设置的坐标进行偏移。

使用echarts的graphic自定义背景图
猜你喜欢