问题
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