margin (xAxis properties)

같은 쪽에 축이 여러 개 있을 때 축과 축 사이의 간격(px)을 설정합니다.

Info

name type required(default) description
margin number 선택(15) 같은 쪽에 축이 여러 개 있을 때 축과 축 사이의 간격(px)을 설정합니다.

Example

myChart.setOptions({
  chart: {
    type: "line"
  },
  xAxis: [{
    categories: ["1월", "2월", "3월", "4월"]
  }, {
    categories: ["Q1", "Q2", "Q3", "Q4"],
    margin: 40   // 첫 번째 x축과 40px 간격
  }],
  series: [{
    name: "서울",
    data: [60, 40, 20, 80]
  }, {
    name: "인천",
    data: [30, 50, 90, 70],
    xAxis: 1
  }]
}, {
  append: true,
  redraw: true
});

제공 버전

version desc
7.3.0.0