728x90
반응형
series: [
{
name: '영업수익',
data: amtArr,
type: 'bar',
stack: 'Ad',
barWidth: '30%',
itemStyle: {
color: (params) => amtColors[params.dataIndex % amtColors.length]
},
label: {
show: true,
fontSize: 12,
fontWeight: "bold",
position: "inside",
color: "black",
formatter: function(data) {
const xAxisName = data.name;
const value = Common.numberWithCommas(data.data);
return `${xAxisName}: ${value}`;
}
}
}
]
x축 이름 : const xAxisName = data.name;
728x90
반응형
'Front > JS & jQuery' 카테고리의 다른 글
[js][Echarts] bar 차트에서 x축에 따라 각 막대에 다른 색상 설정하기 (0) | 2024.12.29 |
---|---|
[js][Echarts] 차트에 데이터 이름 표시하기 (0) | 2024.12.28 |
[js][Echarts] stack bar 차트에서 각 막대에 다른 색상 설정하기 (0) | 2024.12.26 |
[jquery] evt.currentTarget을 사용하여 선택된 <select> 박스의 선택된 option의 text를 가져오기 (0) | 2024.12.25 |
[js][datatables] 엑셀 파일명 특수문자 처리 (0) | 2024.12.22 |