0
我有我的情节线的折线图与钻到显示的问题显示的故事情节。如何当只有一个值存在
每一件事工作正常,但是当我在2015年(在这里我只有每行值为1)向下钻取,情节线不显示。
我在this post阅读关于这个问题,但他们禁用y轴的自动缩放所有解决方案都不能接受的。
这里是发生了什么:
正常的图表(前向下钻取)。它完美:
用钻头在2014年(在那里我有每行4个值)的图表。它完美:
用钻头向下在2015年(在那里我有每行1倍的值)的图。情节线没有显示出与这两个点在同一位置:
这是我如何初始化我的图表:
/*Initialisation du chart*/
chart = new Highcharts.Chart({
chart: {
renderTo: instanceData.id,
type: 'line',
alignTicks: false
},
title: {
text: titre_drill
},
subtitle: {
text: soustitre_drill
},
legend:{
enabled:true
},
xAxis: {
type: 'category'
},
yAxis: [{
title: {
text: texte_ordonee_expedie,
style: {
color: color_expedie
}
},
plotLines : [{
value : seuil_expedie,
color : color_expedie,
dashStyle : 'shortdash',
width : 2,
label : {
text : ''
}
}],
labels: {
format: '{value} €',
style: {
color: color_expedie
}
},
gridLineColor: 'transparent'
},
{
title: {
text: texte_ordonee_packee,
style: {
color: color_packee
}
},
plotLines : [{
value : seuil_packee,
color : color_packee,
dashStyle : 'shortdash',
width : 2,
label : {
text : ''
}
}],
labels: {
format: '{value} €',
style: {
color: color_packee
}
},
gridLineColor: 'transparent',
opposite: true //Pour que le deuxième axe soit à l'opposé du premier
}],
plotOptions: {
line: {
cursor: 'pointer',
marker: {
symbol: 'triangle'
},
dataLabels: {
enabled: false
}
}
},
tooltip: {
formatter: function() {
return '<b>'+ this.y +'</b> €<br/>';
}
},
series: main_data,
drilldown: {
series: drilldown_series,
drillUpButton: {
relativeTo: 'spacingBox',
position: {
y: 0,
x: 0
}
}
},
exporting: {
enabled: true
}
});
我知道没有任何本地函数在Highcharts到“总是显示”情节线。有没有人有建议,所以我可以在2015年的钻取中显示我的两条情节?
我明白了。我想这是保持自动缩放的最佳解决方案。谢谢 ! – Kabulan0lak