Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/395.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

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/kubernetes/5.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_Css_Highcharts - Fatal编程技术网

Javascript 如何防止highcharts工具提示弹出窗口隐藏,在图形区域或浏览器窗口上调整大小?

Javascript 如何防止highcharts工具提示弹出窗口隐藏,在图形区域或浏览器窗口上调整大小?,javascript,jquery,css,highcharts,Javascript,Jquery,Css,Highcharts,调整图形区域或浏览器窗口的大小后,鼠标在highcharts中不会显示工具提示弹出窗口 $(function () { $.getJSON('http://www.highcharts.com/samples/data/jsonp.php?filename=large-dataset.json&callback=?', function (data) { // Create a timer var start = +new Date(); // Creat

调整图形区域或浏览器窗口的大小后,鼠标在highcharts中不会显示工具提示弹出窗口

$(function () {

 $.getJSON('http://www.highcharts.com/samples/data/jsonp.php?filename=large-dataset.json&callback=?', function (data) {

    // Create a timer
    var start = +new Date();

    // Create the chart
    $('#container').highcharts('StockChart', {
        chart: {
            events: {
                load: function () {
                    if (!window.isComparing) {
                        this.setTitle(null, {
                            text: 'Built chart in ' + (new Date() - start) + 'ms'
                        });
                    }
                }
            },
            zoomType: 'x'
        },

        rangeSelector: {

            buttons: [{
                type: 'day',
                count: 3,
                text: '3d'
            }, {
                type: 'week',
                count: 1,
                text: '1w'
            }, {
                type: 'month',
                count: 1,
                text: '1m'
            }, {
                type: 'month',
                count: 6,
                text: '6m'
            }, {
                type: 'year',
                count: 1,
                text: '1y'
            }, {
                type: 'all',
                text: 'All'
            }],
            selected: 3
        },

        yAxis: {
            title: {
                text: 'Temperature (°C)'
            }
        },

        title: {
            text: 'Hourly temperatures in Vik i Sogn, Norway, 2004-2010'
        },

        subtitle: {
            text: 'Built chart in ...' // dummy text to reserve space for dynamic subtitle
        },

        series: [{
            name: 'Temperature',
            data: data,
            pointStart: Date.UTC(2004, 3, 1),
            pointInterval: 3600 * 1000,
            tooltip: {
                valueDecimals: 1,
                valueSuffix: '°C'
            }
        }]

    });
 });
});

只需按如下所示的百分比指定图表容器宽度,或者在调整浏览器窗口或图表区域的大小时使用重画功能

<div id="chartcontainer" width='100%'></div>
更新图表演示链接


这是我们的bug追踪器上已经报告的bug。它应该在4.1.4/2.1.4版本中修复。

是否尝试过调整大小时的chart.redraw或chart.reflow?这是奇怪的行为。祝你好运