API
Split

Split extends ChartItem

Split의 기능을 사용하기 위해서는 'split'모듈이 필요하다. 자세한 설명은 guide/modules에서 확인할 수 있다.


다중 분할 panes.
각 pane에 해당하는 x, y축이 반드시 존재해야 한다. axis는 row, col 속성으로 위치를 지정한다. 시리즈는 row, col 속성으로 지정하거나, 아니면 axis 위치에 따라 자동으로 결정된다.

Split의 기능을 사용하기 위해서는 'split'모듈이 필요하다. 자세한 설명은 guide/modules에서 확인할 수 있다.


Properties

options: SplitOptions readonly

차트를 생성할 때나 updateOptions 등을 통해 이 모델 객체에 설정된 옵션 값들과 기본 설정값들이 포함된 원본 설정 객체(복사본이 아니다).
리턴된 객체의 속성값들을 가져올 수 있지만, 속성들을 직접 수정하는 것은 권장되는 방법이 아니다. updateOptionsupdateOption 등을 사용해서 옵션들을 변경해야 한다.

default :undefined

visible: boolean (opens in a new tab)

표시 여부.
설정 옵션의 visible 값을 그대로 return하는 것이 아니라, undefinednull 등으로 지정하는 경우 모델의 상태에 따라 truefalse로 해석될 수 있다.
설정의 경우 updateOption으로 지정하는 것과 동일하다.

model.updateOption('visible', value);
model.updateOptions({
    visible: value
});

default :undefined

Methods

calcSizes(width, height): void (opens in a new tab)

body들의 표시 크기를 계산한다.

ParameterType
widthnumber (opens in a new tab)
heightnumber (opens in a new tab)

clearOptions(render?): this

updateOptionsupdateOption 등을 통해 설정된 모든 옵션 값들을 제거하거나, 전역 기본값이 존재하는 경우 그 값으로 되돌린다.

ParameterTypeDescription
renderboolean (opens in a new tab)true(기본값)으로 지정하면 차트를 다시 그린다.

return 객체 자신.

destroy(): null

객체가 소유한 참조 등을 해제하고 null을 리턴한다.

model = model.destroy();

return null

loadOptions(source): this

기존 옵션 값들을 모두 제거하고 source에 지정한 값들로 새로 구성한다.

chart.legend.loadOptions({
     visible: true,
     location: 'right
})
ParameterTypeDescription
sourceSplitOptions설정 정보 객체 혹은 단일값.

return 이 객체 자신.

removeOption(prop, render?): this

지정한 속성에 설정한 값이 있으면 제거하고, 기본값으로(있다면) 되돌린다.

ParameterTypeDescription
propkeyof (opens in a new tab) SplitOptions속성 이름.
renderboolean (opens in a new tab)true(기본값)으로 지정하면 차트를 다시 그린다.

return 객체 자신.

saveOptions(recursive?): any (opens in a new tab)

이 모델 객체에 설정된 전역 기본값과 다른 옵션 값들이 포함된 사본 객체로 리턴한다.
options 객체에는 전역 기본값들도 포함되어 있다.

const options = chart.legend.saveOptions();
console.log(options);
ParameterTypeDescription
recursiveboolean (opens in a new tab)기본값 true이면 하위 모델의 옵션들도 포함된다.

return 옵션 사본 객체.

toggleOption(prop, render?): this

Boolean 타입의 설정값을 변경한다.
지정 가능한 설정 값 목록은 Configuration API 페이지에서 확인할 수 있다.

chart.getSeries('ser02').toggleOption('visible');
ParameterTypeDescription
propkeyof (opens in a new tab) SplitOptions설정 속성 이름.
renderboolean (opens in a new tab)true로 지정하면 chart를 다시 그린다. false로 지정하고 여러 설정 후에 render를 호출해서 다시 그리게 할 수도 있다. 기본값은 true.

return 객체 자신.

updateOption(prop, value, render?): this

하나의 속성 값을 설정한다.
여러 속성들을 한꺼번에 변경할 때는 updateOptions를 사용한다.

ParameterTypeDescription
propkeyof (opens in a new tab) SplitOptions
valueany (opens in a new tab)
renderboolean (opens in a new tab)true로 지정하면 설정 후 차트를 다시 그린다.

return 객체 자신.

updateOptions(source?, render?): this

하나 이상의 option 설정을 하고, 차트가 다시 그려지도록 한다.

chart.legend.updateOptions({
    gap: 10,
    lineGap: 20
});

권장하는 방식은 아니지만, options의 값들을 직접 수정한 후에도 이 메소드를 호출해서 내부의 값들이 다시 계산되도록 해야 한다.

chart.legend.options.gap = 10,
chart.legend.options.lineGap = 20,
chart.legend.updateOptions();
ParameterTypeDescription
sourceSplitOptions설정 정보 객체 혹은 단일값.
renderboolean (opens in a new tab)true로 지정하면 설정 후 차트를 다시 그린다.

return 객체 자신.