对比图更新

qianming 3 years ago
parent dd07f598c6
commit cb301a60fb

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

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

Loading…
Cancel
Save