[英]How to make a highchart pathfill blink/flicker continuisly
我在其中一個應用程序中使用了海圖。 基本上基於內容,我想突出顯示該特定筆畫。 目前我可以實現,但是我的要求是讓它閃爍/閃爍,好像在特定點上有什么問題。 有人可以幫助我,如何實現這一目標?
<path
fill="rgba(214,45,32,0.5)"
d="M 472 125.83319815668202 A 30 30 0 1 1 471.99998500000123 125.803198161682 Z"
stroke="#d62d20"
stroke-width="2"
class="highcharts-point highcharts-negative highcharts-color-1 highcharts-point-hover"
>
</path>
您可以使用Highcharts animate
方法來獲得所需的結果:
Highcharts.chart('container', {
chart: {
events: {
load: function() {
var point = this.series[0].points[2];
function toRed() {
point.graphic.animate({
fill: '#ff0000'
}, {
duration: 300
}, toBlue);
}
function toBlue() {
point.graphic.animate({
fill: 'rgb(124, 181, 236)'
}, {
duration: 300
}, toRed);
}
toRed();
}
}
},
series: [{
type: 'column',
data: [43934, 52503, 57177, 69658, 97031, 119931, 137133, 154175]
}]
});
現場演示: http : //jsfiddle.net/BlackLabel/bxa64930/
API參考: https : //api.highcharts.com/class-reference/Highcharts.SVGElement#animate
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.