feat(largeScreen): 优化大屏展示效果

- 在折线图中添加图例显示
- 调整柱状图的图例位置和标签显示
- 优化库存图的视觉效果
This commit is contained in:
tcy
2025-08-22 18:23:26 +08:00
parent 11bded87e4
commit fb105b7962

View File

@ -255,6 +255,7 @@ export const getLineOption = (lineData: any) => {
const maxData = Math.max(...lineData.line1.flat()); const maxData = Math.max(...lineData.line1.flat());
const option = { const option = {
backgroundColor: '', backgroundColor: '',
tooltip: { tooltip: {
trigger: 'axis', trigger: 'axis',
@ -695,6 +696,10 @@ export const getInventoryOption = () => {
}; };
export const getBarOptions = (data: any) => { export const getBarOptions = (data: any) => {
const option = { const option = {
legend: {
show: true,
top: '50%',
},
backgroundColor: '', backgroundColor: '',
grid: { grid: {
left: '8%', left: '8%',
@ -846,7 +851,7 @@ export const getBarOptions = (data: any) => {
) )
}, },
label: { label: {
show: false, show: true,
formatter: '{c}', formatter: '{c}',
position: 'top', position: 'top',
color: '#fff', color: '#fff',