tooltip (plotOptions properties)
시리즈별로 툴팁 형식을 따로 설정합니다.
tooltip 속성 중 headerFormat, pointFormat, footerFormat, valuePrefix, valueSuffix, valueDecimals, xDateFormat 등을 시리즈마다 다르게 지정할 수 있습니다. 시리즈 데이터에 지정하면 해당 시리즈에만 적용됩니다.
Info
| name |
type |
required(default) |
description |
| tooltip |
object |
선택(undefined) |
시리즈별로 툴팁 형식을 따로 설정합니다. |
| tooltip.headerFormat |
string |
선택 |
머리글 형식 (headerFormat) |
| tooltip.pointFormat |
string |
선택 |
포인트 값 형식 (pointFormat) |
| tooltip.footerFormat |
string |
선택 |
아래쪽 문구 (footerFormat) |
| tooltip.valuePrefix |
string |
선택 |
값 앞에 붙일 문자열 (valuePrefix) |
| tooltip.valueSuffix |
string |
선택 |
값 뒤에 붙일 문자열 (valueSuffix) |
| tooltip.valueDecimals |
number |
선택 |
값의 소수 자릿수 (valueDecimals) |
| tooltip.xDateFormat |
string |
선택 |
시간 축 머리글 날짜 형식 (xDateFormat) |
- 시리즈의 툴팁만 끄는 설정은 없습니다 (
tooltip.enabled는 시리즈에서 무시됨). 특정 시리즈의 툴팁을 없애려면 enableMouseTracking을 false로 설정합니다.
Example
myChart.setOptions({
chart: {
type: "column"
},
tooltip: {
shared: false
},
series: [{
name: "매출",
data: [60, 40, 20, 80],
tooltip: {
valueSuffix: " 억원"
}
}, {
name: "이익률",
data: [3.1, 5.2, 4.4, 6.9],
tooltip: {
valueSuffix: " %",
valueDecimals: 1
}
}]
}, {
append: true,
redraw: true
});
제공 버전