style (cfg.map.dataLabel)
맵 차트 내부 데이터를 이용해서 생성한 레이블의 스타일을 설정합니다.
Type
object
Options
| Value |
Description |
object |
맵 차트 내의 레이블 스타일을 설정 |
style Info
| name |
type |
required(Default) |
description |
color |
string |
선택(’#666’) |
레이블의 폰트 색상 |
fontWeight |
string |
선택('bold') |
레이블의 폰트 굵기 |
fontSize |
number \| string |
선택(12) |
레이블의 폰트 크기 |
fontFamily |
string |
선택 |
레이블의 글꼴 |
borderColor |
string |
선택(’#fff’) |
레이블의 테두리 색상 |
borderWidth |
number \| string |
선택(2) |
레이블의 테두리 너비 |
lineBreak |
string |
선택 |
레이블을 줄바꿈 기준 설정 |
textAlign |
string |
선택 |
레이블을 줄바꿈 시 문자 정렬 설정('left', 'center', 'right') |
Example
IBMapCharts.config({
map:{
dataLabel: {
enable: true,
style: {
color: 'red',
borderColor: 'blue',
borderWidth: 2,
fontSize: '12px',
lineBreak: '\n',
textAlign: 'right',
fontFamily: 'Emblema One'
},
formatter: function(d, str) {
if (typeof d.properties.etcData != "undefined") {
return str + "\n" + (d.properties.etcData).toLocaleString() + "명";
} else {
return str;
}
}
}
}
})
since
| version |
desc |
| 8.0.0.13 |
기능 추가 |