series: [
name: '占比',
colorByPoint: true,
data: [{
name: '开号订单',
y: tnbr/(tcharge+tnbr),
sum:123,
sliced: true,
selected: true
}]
}]
要拿到上面代码块所示的sum属性该怎么拿呢,之前我试了使用下面几种方式
this.series.data.sum ==错误
this.sum ==错误
this.data.sum ==错误
最后查看API,百度,各种方式终于找到了下面这种方式
this.point.sum
这样就可以在formatter中随意获取需要的数据
本文介绍了一种在图表中正确获取特定数据属性的方法。通过实例演示如何利用 this.point 属性访问到系列数据中的 sum 值,解决了常规方法无法直接访问的问题。
775

被折叠的 条评论
为什么被折叠?



