Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/447.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 gauge中禁用工具提示?_Javascript_Highcharts - Fatal编程技术网

Javascript 如何在highcharts gauge中禁用工具提示?

Javascript 如何在highcharts gauge中禁用工具提示?,javascript,highcharts,Javascript,Highcharts,我尝试禁用,但无论我做什么,它都不起作用 我试着把: tooltip: { enabled: false } 在图表,窗格,系列 以下是我使用的演示: 这是一个代码: $('#container').highcharts({ chart: { type: 'gauge', plotBackgroundColor: null, plotBackgroundImage: null,

我尝试禁用,但无论我做什么,它都不起作用

我试着把:

tooltip: {
   enabled: false
} 
图表
窗格
系列

以下是我使用的演示:

这是一个代码:

 $('#container').highcharts({

        chart: {
            type: 'gauge',
            plotBackgroundColor: null,
            plotBackgroundImage: null,
            plotBorderWidth: 0,
            plotShadow: false,
            tooltip: {
             enabled: false
            }
        },
                exporting: {enabled: false},
        title: {
            text: 'meetings',
            //align: 'bottom'
            verticalAlign: 'bottom',
            y: 10,
                 style: {
                        fontWeight: 'bold',
                        fontSize:'18px'
                    }
        },

        pane: {
        tooltip: {
             enabled: false
            },
            startAngle: -150,
            endAngle: 150,
            background: [{
                backgroundColor: {
                    linearGradient: { x1: 0, y1: 0, x2: 0, y2: 1 },
                    stops: [
                        [0, '#FFF'],
                        [1, '#333']
                    ]
                },
                borderWidth: 0,
                outerRadius: '109%'
            }, {
                backgroundColor: {
                    linearGradient: { x1: 0, y1: 0, x2: 0, y2: 1 },
                    stops: [
                        [0, '#333'],
                        [1, '#FFF']
                    ]
                },
                borderWidth: 1,
                outerRadius: '107%'
            }, {
                // default background
            }, {
                backgroundColor: '#DDD',
                borderWidth: 0,
                outerRadius: '105%',
                innerRadius: '103%'
            }]
        },

        // the value axis
        yAxis: {
        tooltip: {
             enabled: false
            },
            min: 0,
            max: max,

            minorTickInterval: 'auto',
            minorTickWidth: 0,
            minorTickLength: 0,
            minorTickPosition: 'inside',
            minorTickColor: '#666',

            tickPixelInterval: 0,
            tickWidth: 0,
            tickPosition: 'inside',
            tickLength: 0,
            tickColor: '#666',
            labels: {
                step: 2,
                rotation: 'auto'
            },
            title: {
                text: '',
                y: 150,
                 style: {
                        fontWeight: 'bold',
                        fontSize:'18px'
                    }
            },
            plotBands: [{
                from: 0,
                to: color_threshold_values[0],
                color: '#DA2626' 
            }, {
                from: color_threshold_values[0],
                to: color_threshold_values[1],
                color: '#F19E26' 
            }, {
                from: color_threshold_values[1],
                to: color_threshold_max,
                color: '#88A61F'
            }]
        },

        series: [{
            name: 'Count',
            data: [data.count],

            dataLabels: {
            enabled:false,
                    borderColor: 'red',
                    borderWidth: 0,
                    padding: 5,
                    shadow: true,
                    style: {
                        fontWeight: 'bold',
                        fontSize:'25px'
                    }
                },

        }]

    });

有什么想法吗?

尝试将其添加到配置对象itslef


这是基于文档的。请注意,没有启用
选项。.

是否尝试将其添加到配置对象itslef


这是基于文档的。请注意,没有启用
选项。.

您只需添加
.highcharts工具提示{opacity:0;}


查看fiddle

您可以添加
。highcharts工具提示{opacity:0;}


请看fiddle,不透明度为0表示DOM仍然存在,这并不清楚anyways@snaggsJoseph的答案更好,但是如果你
.highcharts工具提示{display:none}
它不会存在,lolwell,不透明度0意味着DOM仍然存在,这不清楚。Hanksanyways@snaggs约瑟夫的答案更好,但是,如果您
.highcharts工具提示{display:none}
它将不存在lol
$('#container').highcharts({
  tooltip: {
    enabled: false
  },
  chart: {
  ...
});