formatter (tooltip properties)

툴팁의 텍스트를 포맷하는 콜백 기능 속성 입니다.

Info

name type required description
formatter object 선택 툴팁의 텍스트를 포맷

Enum

value description
{this.percentage} 백분율
{this.point} 포인트 개체 사용 할 수 있음. Ex) this.point.name
{this.series} 시리즈 개체 사용 할 수 있음. Ex) this.series.name
{this.total} 총 가치 x값
{this.x} 현재 x값
{this.y} 현재 y값

Example

myChart.setOptions({
  chart: {
    type: "column"
  },
  tooltip: {// tooltip 속성 설정
    formatter: function (){
      return this.series.name + ‘ for <b>’ + this.x +
        ‘</b> is <b>’ + this.y + ‘</b>’;
    }
  },
  series: [{
    name: "서울",
    data : [60,40,20,80]
  },{
    name: "인천",
    data : [30,50,90,70]
  },{
    name: "부산",
    data : [40,70,30,60]
  }]
}, {
  append: true,
  redraw: true
});

제공 버전

version desc
7.3.0.0