Я пытаюсь построить гистограмму с накоплением, используя highcharts. Мне нужно избегать метки оси Y «Количество» и диапазона от оси Y, когда нет данных для графика. Но нужно вернуть метку, а также значение, когда есть некоторые данные. Может кто-то помочь мне с этим
Песочница: https://codesandbox.io/s/cranky-thunder-edtcy
import React from "react";
import ReactDOM from "react-dom";
import Highcharts from "highcharts";
import HighchartsReact from "highcharts-react-official";
const axisData = [
"12/16/2019",
"12/17/2019",
"12/18/2019",
"12/19/2019",
"12/20/2019",
"12/21/2019",
"12/22/2019",
"12/23/2019"
];
const seriesData = [
{ name: "item1", data: [0, 0, 0, 0, 0, 0, 0, 0] },
{ name: "item2", data: [0, 0, 0, 0, 0, 0, 0, 0] },
{ name: "item3", data: [0, 0, 0, 0, 0, 0, 0, 0] }
];
const options = {
chart: {
type: "column",
height: 152
},
credits: false,
exporting: { enabled: false },
title: {
text: ""
},
xAxis: {
categories: axisData
},
yAxis: {
stackLabels: {
enabled: false,
align: "center"
},
visible: true,
title: { enabled: true, text: "Count" }
},
plotOptions: {
column: {
stacking: "normal"
}
},
legend: {
symbolRadius: 0
},
tooltip: { enabled: true },
series: seriesData
};
class App extends React.Component {
render() {
return (
<>
<HighchartsReact highcharts={Highcharts} options={options} />
</>
);
}
}