0
負の値と正の値の両方でハイチャートを作成しようとしています。今や、負の値は、正の値に比べてそれほど大きくありません。ここでy軸を0ハイチャートに固定
グラフの絵があるとされています。あなたは、両方のy軸上に密接に見れば、彼らは0で、最大満たしていない今、小さなギャップがあり
。それらを両方とも0から始めることは可能ですが、それらをマイナスにすることは可能ですか?
これは私のコードです:
Highcharts.chart('chart', {
chart: {
type: 'column'
},
title: {
text: 'Sales Graph'
},
xAxis: {
categories: xAxisTicks
},
plotOptions: {
column: {
stacking: 'normal'
}
},
tooltip: {
formatter: function() {
debugger;
if (this.series.type == "column") {
return '<b>' + this.x + '</b><br/>' +
this.series.name + ': ' + prettyNumber(this.y) + '<br/>' +
'Sales without discount: ' + prettyNumber(this.point.stackTotal);
} else {
return '<b>' + this.x + '</b><br/>' +
this.series.name + ': ' + prettyNumber(this.y) + '<br/>';
}
}
},
colors: ['yellow', 'orange', 'red', 'blue', 'green', 'red', 'blue', 'green'],
yAxis: [
{
title: {
text: 'Daily sales'
},
min: minYAxisValue,
startOnTick: false
}, {
title: {
text: 'Accumulated sales'
},
min: minYAxisValue,
startOnTick: false,
opposite: true
}
],
series: data
});
をすることができますあなたはこの単純な回避策を試すことができますしかし
問題の生き生きした例を作る?一部のデータをハードコードするだけで問題を表示できます。また、プラグインの位置合わせのしきい値を確認することもできます。https://highcharts.uservoice.com/forums/55896-highcharts-javascript-api/suggestions/2554384-multiple-axis-alignment-control - 問題を解決するかどうかはわかりませんが – morganfree