지정할 위치에 맵차트 객체를 생성합니다.
elem객체의 크기에 따라 맵차트의 너비/높이가 결정됩니다.
IBMapCharts.create(elem, cfg);
| Name | Type | Required | Description |
|---|---|---|---|
elem |
object or string |
필수 | 맵차트가 생성될 컨테이터 객체 또는 div객체의 id |
cfg |
object |
선택 | 설정 옵션 객체 |
var cfg = {
// animate 적용 시간
duration : 400,
// 맵 설정
map: {
dataLabel: {
enable: true, // 데이터 레이블 표시
formatter: function(d, str) {
return str + "kw";
}
},
// 차트(bar,pie 등) 설정
chart: {
// 차트(bar,pie 등) 스타일 설정
style: {
width: 40,
height: 40,
backgroundColor: "white",
border: {
width: 2
}
}
}
},
// 포인트 설정
point: {
// 포인트 심볼 설정
symbol: {
style: {
width: 40,
height: 40,
backgroundColor: "white",
border: {
width: 2
}
}
}
},
// 서브 타이틀 설정
subtitle: {
style: {
color: "blue",
fontSize: 15
}
}
}
// 맵차트 객체 생성
IBMapCharts.create("container", cfg);