我试过的
highchartsLeaderBoard = Highcharts;
chartOptionsLeaderBoard={
chart: {
reflow:false,
type: 'bar',
marginLeft: 80,
width: 500,
borderWidth:0,
backgroundColor:'transparent',
},
plotOptions: {
bar: {
borderWidth:0,
},
},
title: {
text: 'LeaderBoard',
},
credits:{
enabled:false
},
yAxis: {
visible:false,
title: {
text: ''
}
},
xAxis: {
type: 'category',
min: 0,
labels: {
animate: true,
duration:5000
}
},
legend: {
enabled: false
},
series: [{
zoneAxis: 'x',
zones: [{
value: 1,
color: '#ff4d40'
}],
dataLabels: {
enabled: true,
format: '{y:,.0f}',
borderWidth:0,
color:'white',
style:{
textOutline:0
}
},
dataSorting: {
enabled: true,
sortKey: 'y',
animate: true,
duration:5000
},
data:[],
}]
}
this.chartOptionsLeaderBoard.series[0].data.push(array)
我想要动画,例如其中的小节如何滑动:
在上面的小提琴代码中,在setData()中添加了动画。.但是我不能在angular中使用setData()。
提前致谢!!!
要在使用highcharts和highchart-angular包装器时执行update / setData,您需要更新chartOptions(如您所做的那样),然后将其设置updateFlag
为true。
文档参考: https :
//github.com/highcharts/highcharts-angular
实时示例
https://stackblitz.com/edit/highcharts-angular-optimal-way-to-update
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句