API
createChartAsync

createChartAsync(doc, container, config, animate, callback?): Promise (opens in a new tab)

지도 파일이나 데이터가 URL을 통해 제공되는 경우, 데이터를 모두 로드한 뒤 차트를 생성하도록 비동기 처리할 수 있다.

const config = {
    map: [
        { url: '../map.json', }
    ],
    series: [{
        dataUrl: '../data.json',
    }]
};
const chart = await RealMap.createChartAsync(document, 'realmap', config);
ParameterTypeDescription
docDocument (opens in a new tab)
containerstring (opens in a new tab) | HTMLDivElement (opens in a new tab)컨트롤이 생성되는 div 엘리먼트나 id
configany (opens in a new tab)차트 모델 설정 JSON
animateboolean (opens in a new tab)첫 로딩 animation을 실행한다.
callback() => void (opens in a new tab)차트가 모두 로드되고 첫 렌더링이 완료된 후 호출되는 콜백 함수.