ソースを参照

首页echarts修改

caojunjie 2 年 前
コミット
324fbe9c4d
1 ファイル変更12 行追加5 行削除
  1. 12 5
      src/views/wel/components/sales-trend.vue

+ 12 - 5
src/views/wel/components/sales-trend.vue

@@ -338,10 +338,11 @@ export default {
                       type: 'value',
                       name: '数量(条)',
                       min: 0,
-                      max: 250,
-                      interval: 50,
                       axisLine:{
                           show:true,
+                          lineStyle: {
+                              color: "#5266bc",//y轴线的颜色(若只设置了y轴线的颜色,未设置y轴文字的颜色,则y轴文字会默认跟设置的y轴线颜色一致)
+                          },
                       },
                       axisLabel: {
                           formatter: '{value}'
@@ -351,13 +352,17 @@ export default {
                       type: 'value',
                       name: '金额(元)',
                       min: 0,
-                      max: 25,
-                      interval: 5,
                       axisLine:{
                           show:true,
+                          lineStyle: {
+                              color: "#98c46d",//y轴线的颜色(若只设置了y轴线的颜色,未设置y轴文字的颜色,则y轴文字会默认跟设置的y轴线颜色一致)
+                          },
                       },
                       axisLabel: {
-                          formatter: '{value}'
+                          formatter: '{value}',
+                          // textStyle: {
+                          //     color: "#000",//Y轴内容文字颜色
+                          // },
                       }
                   }
               ],
@@ -365,6 +370,7 @@ export default {
                   {
                       name: '数量',
                       type: 'bar',
+                      yAxisIndex: 0,
                       tooltip: {
                           valueFormatter: function (value) {
                               return value + ' ml';
@@ -375,6 +381,7 @@ export default {
                   {
                       name: '金额',
                       type: 'bar',
+                      yAxisIndex: 1,
                       tooltip: {
                           valueFormatter: function (value) {
                               return value + ' ml';