Merge remote-tracking branch 'origin/dev' into dev

Raod 3 years ago
commit bf6ff4355a

@ -5741,6 +5741,14 @@ const widgetTools = [
placeholder: '', placeholder: '',
value: 20, value: 20,
}, },
{
type: 'el-slider',
label: '圆角',
name: 'radius',
require: false,
placeholder: '',
value: 5,
},
], ],
}, },
{ {
@ -6210,7 +6218,7 @@ const widgetTools = [
}, },
], ],
}, },
/*{ {
name: '自定义配色', name: '自定义配色',
list: [ list: [
{ {
@ -6221,7 +6229,7 @@ const widgetTools = [
value: [{color: '#ff7f50'}, {color: '#87cefa'}, {color: '#da70d6'}, {color: '#32cd32'}, {color: '#6495ed'}], value: [{color: '#ff7f50'}, {color: '#87cefa'}, {color: '#da70d6'}, {color: '#32cd32'}, {color: '#6495ed'}],
}, },
], ],
},*/ },
], ],
], ],
// 数据 // 数据

@ -48,7 +48,7 @@ export default {
type: "bar", type: "bar",
barGap: "0%", barGap: "0%",
itemStyle: { itemStyle: {
borderRadius: null barBorderRadius: null
} }
} }
] ]
@ -100,7 +100,7 @@ export default {
this.setOptionsTooltip(); this.setOptionsTooltip();
this.setOptionsMargin(); this.setOptionsMargin();
this.setOptionsLegend(); this.setOptionsLegend();
//this.setOptionsColor(); this.setOptionsColor();
this.setOptionsData(); this.setOptionsData();
}, },
// //
@ -255,7 +255,7 @@ export default {
}; };
legend.itemWidth = optionsCollapse.lengedWidth; legend.itemWidth = optionsCollapse.lengedWidth;
}, },
// //
setOptionsColor() { setOptionsColor() {
const optionsCollapse = this.optionsSetup; const optionsCollapse = this.optionsSetup;
const customColor = optionsCollapse.customColor; const customColor = optionsCollapse.customColor;
@ -270,7 +270,7 @@ export default {
return arrColor[params.dataIndex]; return arrColor[params.dataIndex];
}, },
barBorderRadius : optionsCollapse.radius barBorderRadius : optionsCollapse.radius
} },
}; };
for (const key in this.options.series) { for (const key in this.options.series) {
if (this.options.series[key].type == "bar") { if (this.options.series[key].type == "bar") {
@ -311,6 +311,13 @@ export default {
// //
staticDataFn(val) { staticDataFn(val) {
const optionsSetup = this.optionsSetup; const optionsSetup = this.optionsSetup;
//
const customColor = optionsSetup.customColor;
const arrColor = [];
for (let i = 0; i < customColor.length; i++) {
arrColor.push(customColor[i].color);
}
//
const series = []; const series = [];
let xAxisList = [] let xAxisList = []
let yAxisList = [] let yAxisList = []
@ -346,8 +353,12 @@ export default {
color: optionsSetup.subTextColor, color: optionsSetup.subTextColor,
fontWeight: optionsSetup.fontWeight fontWeight: optionsSetup.fontWeight
}, },
//
itemStyle: { itemStyle: {
borderRadius: null normal : {
color: arrColor[i],
barBorderRadius : optionsSetup.radius,
}
} }
}) })
} }

Loading…
Cancel
Save