Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/jquery/87.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript Highcharts保持选中状态,就像选择时一样_Javascript_Jquery_Highcharts - Fatal编程技术网

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