Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/macos/10.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 hightChart打印';诺达';消息_Javascript_Jquery_Highcharts - Fatal编程技术网

Javascript hightChart打印';诺达';消息

Javascript hightChart打印';诺达';消息,javascript,jquery,highcharts,Javascript,Jquery,Highcharts,我使用库hightChart构建一些图表,我想在图表中没有数据时显示一条消息,因此我有以下javascript代码: statChart = new Highcharts.Chart ({ lang: { noData : "no data", }, chart: { renderTo: 'chart

我使用库hightChart构建一些图表,我想在图表中没有数据时显示一条消息,因此我有以下javascript代码:

   statChart = new Highcharts.Chart
    ({
            lang:
            {
                noData : "no data",
            },
            chart:
            {
                renderTo: 'chart_container',
                type: 'line',
                marginRight: 130,
                marginBottom: 25
            },
            title:
            {
                text: 'Graphique',
                x: -20
            },
            subtitle:
            {
                x: -20
            },
            xAxis:
            {
                categories:['Juin', 'Juillet', 'Aout', 'Septembre', 'Octobre', 'Novembre', 'Décembre', 'Janvier', 'Février', 'Mars', 'Avril', 'Mai']
            },
            yAxis:
            {
                title:
                {
                    text: ''
                },
                plotLines: 
                [{
                    value: 0,
                    width: 1,
                    color: '#808080'
                }]
            },
            legend:
            {
                layout: 'vertical',
                align: 'right',
                verticalAlign: 'top',
                x: -10,
                y: 100,
                borderWidth: 0,
            },
            credits :
            {
                enabled : false
            }
});
在我用javascript添加了一些数据之后:

newSerie = statChart.addSeries(
    {
        name : nameGraph,
        data : []
    });

但是我从来没有到过这里来打印那些说没有数据的消息,我真的不明白为什么,因为在所有的例子中,我发现他们对于打印这条消息没有什么特别的作用。

你还需要包括没有数据要显示。js:

你还需要包括没有数据要显示。js:

你还需要包括没有要显示的数据。js:

您还需要包括no-data-to-display.js: