nullInteraction (plotOptions properties)
값이 null인 포인트도 마우스에 반응하게 합니다.
true이면 빈 값 위치에 마우스를 올렸을 때 툴팁이 표시되고 포인트 이벤트가 발생합니다. 툴팁 문구는 tooltip nullFormat 또는 nullFormatter로 지정합니다.
막대(column) 차트는 null 위치에 마우스를 올릴 대상이 없어 툴팁이 뜨지 않으므로, 시리즈가 여럿일 때 tooltip.shared: true와 함께 사용합니다. (선 차트는 null 위치의 x축 바로 위에 마우스를 올려야 반응합니다)
Info
| name |
type |
required(default) |
description |
| nullInteraction |
boolean |
선택(false) |
값이 null인 포인트도 마우스에 반응하게 합니다. |
Example
myChart.setOptions({
chart: {
type: "column"
},
plotOptions: {
series: {
nullInteraction: true
}
},
tooltip: {
shared: true,
nullFormat: "{series.name}: 데이터 없음"
},
xAxis: {
categories: ["1월", "2월", "3월", "4월"]
},
series: [{
name: "서울",
data: [60, null, 20, 80]
}, {
name: "인천",
data: [30, 50, 90, 70]
}]
}, {
append: true,
redraw: true
});
제공 버전