축의 특정 값 위치에 기준선(목표선, 평균선 등)을 표시합니다.
화면에서 동적으로 추가/제거할 때는 addPlotLine 메서드를 사용합니다.
| name | type | required(default) | description |
|---|---|---|---|
| plotLines | Array<object> |
선택(undefined) | 축의 특정 값 위치에 기준선(목표선, 평균선 등)을 표시합니다. |
| plotLines.value | number |
선택 | 기준선 위치 값 |
| plotLines.color | color |
선택(#999999) | 선 색상 |
| plotLines.width | number |
선택(1) | 선 두께(px) |
| plotLines.dashStyle | string |
선택(Solid) | 선 모양 (Solid, Dash, Dot, DashDot 등) |
| plotLines.label | object |
선택(undefined) | 라벨 속성 (text, align, verticalAlign, x, y, rotation, style) |
| plotLines.zIndex | number |
선택(undefined) | 그리는 순서 (높을수록 위에 표시) |
| plotLines.id | string |
선택(undefined) | 기준선 id (removePlotLine에서 사용) 기준선을 구분할 임의의 문자열 (예: "target") |
myChart.setOptions({
chart: {
type: "column"
},
yAxis: {
plotLines: [{
value: 50, // y값 50 위치
color: "#FF0000",
width: 2,
dashStyle: "Dash",
label: {
text: "목표"
},
zIndex: 5 // 막대 위에 표시
}]
},
series: [{
name: "서울",
data: [60, 40, 20, 80]
}, {
name: "인천",
data: [30, 50, 90, 70]
}]
}, {
append: true,
redraw: true
});
| version | desc |
|---|---|
| 7.3.0.0 |