plotLines (xAxis properties)

축의 특정 값 위치에 세로 기준선을 표시합니다.
카테고리 축에서는 카테고리 인덱스(0부터)가 값입니다. 화면에서 동적으로 추가/제거할 때는 addPlotLine 메서드를 사용합니다.

Info

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")

Example

myChart.setOptions({
  chart: {
    type: "line"
  },
  xAxis: {
    categories: ["1월", "2월", "3월", "4월"],
    plotLines: [{
      value: 1.5,         // 2월과 3월 사이
      color: "#0055AA",
      width: 1,
      label: {
        text: "개편일",
        rotation: 0
      }
    }]
  },
  series: [{
    name: "서울",
    data: [60, 40, 20, 80]
  }, {
    name: "인천",
    data: [30, 50, 90, 70]
  }]
}, {
  append: true,
  redraw: true
});

제공 버전

version desc
7.3.0.0