Browse Source

对比图更新

qianming 4 years ago
parent
commit
cb301a60fb

+ 8 - 8
report-ui/src/views/report/bigscreen/designer/tools/componentsJSON/widget-line-compare.js

@@ -197,7 +197,7 @@ export const widgetLineCompare = {
               name: 'colorX',
               required: false,
               placeholder: '',
-              value: '#fff',
+              value: '#36c5e7',
             },
             {
               type: 'el-input-number',
@@ -237,7 +237,7 @@ export const widgetLineCompare = {
               name: 'lineColorX',
               required: false,
               placeholder: '',
-              value: '#fff',
+              value: '#36c5e7',
             },
           ],
         },
@@ -265,7 +265,7 @@ export const widgetLineCompare = {
               name: 'nameColorYTop',
               required: false,
               placeholder: '',
-              value: '#fff',
+              value: '#36c5e7',
             },
             {
               type: 'el-input-number',
@@ -297,7 +297,7 @@ export const widgetLineCompare = {
               name: 'colorYTop',
               required: false,
               placeholder: '',
-              value: '#fff',
+              value: '#36c5e7',
             },
             {
               type: 'el-input-number',
@@ -329,7 +329,7 @@ export const widgetLineCompare = {
               name: 'lineColorYTop',
               required: false,
               placeholder: '',
-              value: '#fff',
+              value: '#36c5e7',
             },
             {
               type: 'el-switch',
@@ -381,7 +381,7 @@ export const widgetLineCompare = {
               name: 'nameColorYBottom',
               required: false,
               placeholder: '',
-              value: '#fff',
+              value: '#e68b55',
             },
             {
               type: 'el-input-number',
@@ -413,7 +413,7 @@ export const widgetLineCompare = {
               name: 'colorYBottom',
               required: false,
               placeholder: '',
-              value: '#fff',
+              value: '#e68b55',
             },
             {
               type: 'el-input-number',
@@ -445,7 +445,7 @@ export const widgetLineCompare = {
               name: 'lineColorYBottom',
               required: false,
               placeholder: '',
-              value: '#fff',
+              value: '#e68b55',
             },
             {
               type: 'el-switch',

+ 3 - 2
report-ui/src/views/report/bigscreen/designer/widget/line/widgetLineCompareChart.vue

@@ -639,8 +639,9 @@ export default {
       });
     },
     renderingFn(optionsSetup, val) {
-      this.options.yAxis[1]['data'] = val.xAxis
-      if (val.series[0].type == "bar") {
+      this.options.xAxis[0]['data'] = val.xAxis
+      this.options.xAxis[1]['data'] = val.xAxis
+      if (val.series[0].type == "line") {
         this.options.series[0]['name'] = val.series[0].name
         this.options.series[0]['data'] = val.series[0].data
         this.options.series[1]['name'] = val.series[1].name