728x90
반응형
label: {
show: true,
fontSize: 12,
fontWeight: "bold",
position: "inside", // Position the label inside the bar
color: "black",
formatter: function(data) {
const seriesName = data.seriesName; // The series name (e.g., '영업수익')
const value = Common.numberWithCommas(data.data); // The value, formatted
return `${seriesName}\n${value}`; // Add a newline character between the series name and value
}
}
데이터이름 : const seriesName = data.seriesName;
\n 포함 => 이름 + 줄바꿈 + 수치
728x90
반응형
'Front > JS & jQuery' 카테고리의 다른 글
[js] 숫자 음수 처리 (0) | 2025.01.01 |
---|---|
[js][Echarts] bar 차트에서 x축에 따라 각 막대에 다른 색상 설정하기 (0) | 2024.12.29 |
[js][Echarts] 차트에 x축 이름 표시하기 (0) | 2024.12.27 |
[js][Echarts] stack bar 차트에서 각 막대에 다른 색상 설정하기 (0) | 2024.12.26 |
[jquery] evt.currentTarget을 사용하여 선택된 <select> 박스의 선택된 option의 text를 가져오기 (0) | 2024.12.25 |