Highcharts plotBand animation

爷,独闯天下 提交于 2020-01-07 04:40:33

问题


I have a plotband that resizes dynamically. At the moment is works by removing old one and drawing next. Is there any way to update plotBand's position parameters in the way it could animate moving?


回答1:


It's not part of the API, but it's possible to update plotBand's options, demo: http://jsfiddle.net/2sqpt1aa/

Snippet:

var chart = $("#container").highcharts(), // get chart 
    plotBand = chart.xAxis[0].plotLinesAndBands[0]; // get first plotBand

// Update options:
plotBand.options.from = 2010;
plotBand.options.to = 2012;

// Render the plotBand:
plotBand.render();


来源:https://stackoverflow.com/questions/43777698/highcharts-plotband-animation

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!