Skip to content

Commit

Permalink
fix: 修复仪表盘访问趋势区块 y 轴数值过大时无法展示的问题
Browse files Browse the repository at this point in the history
增加 y 轴单位转换逻辑
  • Loading branch information
Charles7c committed Nov 10, 2023
1 parent 8820c1d commit 47a5746
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
const { chartOption } = useChartOption((isDark) => {
return {
grid: {
left: '30',
left: '38',
right: '0',
top: '10',
bottom: '50',
Expand Down Expand Up @@ -114,6 +114,9 @@
axisLabel: {
formatter(value: any, idx: number) {
if (idx === 0) return value;
if (value >= 1000) {
return `${value / 1000}k`;
}
return `${value}`;
},
},
Expand Down

0 comments on commit 47a5746

Please sign in to comment.