exporting에 사용할 메뉴를 설정 합니다.
| name | type | required(default) | description |
|---|---|---|---|
| contextButtons | object |
선택 | 메뉴 항목 설정 |
| name | type | required(default) | description |
|---|---|---|---|
| className | string |
선택('ibcharts-contextbutton') | 버튼 클래스 CSS 클래스명 (예: "my-context-button") |
| menuClassName | string |
선택('ibcharts-contextmenu') | 메뉴 클래스 CSS 클래스명 (예: "my-context-menu") |
| menuItems | array |
선택([printChart, separator, downloadJPEG, downloadPDF, downloadSVG]) | 메뉴 아이템 설정 |
| name | type | required(default) | description |
|---|---|---|---|
| text | string |
선택 | 아이템에 표시할 문구 메뉴에 표시할 텍스트 (예: "PNG 다운로드") |
| textKey | string |
선택 | Lang 파일에서 참조한 텍스트 lang 옵션의 키 이름 (예: "downloadPNG", "printChart") |
| onclick | function |
선택 | 클릭 시 동작 |
myChart.setOptions({
exporting: {
enabled: true,
url: '../../assets/ibchart/Down2Image.jsp', // jsp 경로
buttons: {
contextButton: {
menuItems: [ // default: [printChart, separator, downloadJPEG, downloadPDF, downloadSVG]
{
text: '차트 사이즈 축소',
// textKey: "차트 사이즈 축소", // text와 동시에 설정 시 text로 표시
onclick: function (e) {
myChart.setSize(500, 300);
}
},
"printChart", // defaut로 설정되어 있는 항목을 string으로 설정 시 사용 가능
"separator", // 구분선
"downloadJPEG"
]
}
}
},
})
| version | desc |
|---|---|
| 7.3.1.26 | 기능 추가 |