apexcharts 使用時のデータなしの状態の表示について apexcharts apexcharts

apexcharts 使用時のデータなしの状態の表示について

chartOptions 直下の階層に、noData を定義すればよい
--------------------------------
chartOptions: {
plotOptions: {
bar: {
horizontal: true
}
},
xaxis: {
categories: [1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999]
},
noData: { ★ここ
text: "There's no data",
align: 'center',
verticalAlign: 'middle',
offsetX: 0,
offsetY: 0
}
},
series: [
{
name: "series-1",
data: [] ★ここのデータがない場合に nodataが表示される
}
]
--------------------------------