Javascript Highcharts保持选中状态,就像选择时一样
我要进行自定义选择,在“选择”上,我要使选择层指向图像:Javascript Highcharts保持选中状态,就像选择时一样,javascript,jquery,highcharts,Javascript,Jquery,Highcharts,我要进行自定义选择,在“选择”上,我要使选择层指向图像: 示例是,但我刚刚选择了点。您可以创建一个与选择填充完全相同的打印条带 selection: function (e) { e.preventDefault(); var axis = this.xAxis[0]; axis.removePlotBand('selection-plot-band'); axis.ad
示例是,但我刚刚选择了点。您可以创建一个与选择填充完全相同的打印条带
selection: function (e) {
e.preventDefault();
var axis = this.xAxis[0];
axis.removePlotBand('selection-plot-band');
axis.addPlotBand({
color: Highcharts.color('#335cad').setOpacity(0.25).get() //use Highcharts.Color in version 4,
from: e.xAxis[0].min,
to: e.xAxis[0].max,
id: 'selection-plot-band',
zIndex: 6
});
}
示例:您可以创建与选择填充完全相同的打印标注栏
selection: function (e) {
e.preventDefault();
var axis = this.xAxis[0];
axis.removePlotBand('selection-plot-band');
axis.addPlotBand({
color: Highcharts.color('#335cad').setOpacity(0.25).get() //use Highcharts.Color in version 4,
from: e.xAxis[0].min,
to: e.xAxis[0].max,
id: 'selection-plot-band',
zIndex: 6
});
}
示例:I get Uncaught TypeError:Highcharts.color不是函数,如何修复?它应该是Highcharts.color('335cad')你说得对,Highcharts.color在版本5+中工作,版本4.x必须是Highcharts.ColorI get Uncaught TypeError:Highcharts.color不是函数,如何修复?它应该是Highcharts.color('335cad'))你说得对,Highcharts.color在版本5+中工作,而版本4.x必须是Highcharts.color