fix(Home): 修正图表类型,本月趋势改为柱状+折线组合,库龄分布改为柱状图
| | |
| | | } |
| | | ], |
| | | series: [ |
| | | { name: "入库", type: "line", data: this.monthlyData.map(m => m.Inbound), itemStyle: { color: "#5470c6" } }, |
| | | { name: "入库", type: "bar", data: this.monthlyData.map(m => m.Inbound), itemStyle: { color: "#5470c6" } }, |
| | | { name: "出库", type: "line", data: this.monthlyData.map(m => m.Outbound), itemStyle: { color: "#91cc75" } } |
| | | ] |
| | | }; |
| | |
| | | |
| | | updateStockAgeChart() { |
| | | const option = { |
| | | tooltip: { trigger: "item" }, |
| | | legend: { data: this.stockAgeData.map(s => s.Range), textStyle: { color: "#fff" } }, |
| | | tooltip: { trigger: "axis" }, |
| | | xAxis: { |
| | | type: "category", |
| | | data: this.stockAgeData.map(s => s.Range), |
| | | axisLabel: { color: "#fff" } |
| | | }, |
| | | yAxis: { |
| | | type: "value", |
| | | axisLabel: { color: "#fff" } |
| | | }, |
| | | series: [ |
| | | { |
| | | type: "pie", |
| | | radius: "60%", |
| | | data: this.stockAgeData.map((s, i) => ({ |
| | | name: s.Range, |
| | | value: s.Count |
| | | })), |
| | | emphasis: { |
| | | itemStyle: { |
| | | shadowBlur: 10, |
| | | shadowOffsetX: 0, |
| | | shadowColor: "rgba(0, 0, 0, 0.5)" |
| | | } |
| | | } |
| | | type: "bar", |
| | | data: this.stockAgeData.map(s => s.Count), |
| | | itemStyle: { color: "#5470c6" } |
| | | } |
| | | ] |
| | | }; |