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