装饰图调整

qianming 3 years ago
parent 104c455f3f
commit 6b20f7c043

@ -94,6 +94,35 @@ export const widgetDecoratePie = {
},
]
},
{
name: '三分环设置',
list: [
{
type: 'vue-color',
label: '一段颜色',
name: 'three1Color',
required: false,
placeholder: '',
value: '#fc8d89'
},
{
type: 'vue-color',
label: '二段颜色',
name: 'three2Color',
required: false,
placeholder: '',
value: '#46d3f3'
},
{
type: 'vue-color',
label: '三段颜色',
name: 'three3Color',
required: false,
placeholder: '',
value: 'rgba(203,203,203,.2)'
},
]
},
],
],
// 坐标

@ -5,6 +5,8 @@
</template>
<script>
import echarts from "echarts";
export default {
name: "widgetRotatePieChart",
components: {},
@ -104,7 +106,6 @@ export default {
color: ["#fc8d89", "#46d3f3", "rgba(203,203,203,.2)"],
startAngle: 50,
hoverAnimation: false,
// animation:false, //charts3 no
label: {
normal: {
show: false
@ -113,7 +114,7 @@ export default {
data: [50, 20, 40]
},
{
name: "刻度环",
name: "刻度环",
type: 'gauge',
splitNumber: 30, //
min: 0,
@ -159,7 +160,7 @@ export default {
},
},
{
name: '刻度环',
name: '刻度环',
type: 'gauge',
splitNumber: 30, //
min: 0,
@ -293,6 +294,7 @@ export default {
this.setOptionsLastRing();
this.setOptionsEightRing();
this.setOptionsDottedRing();
this.setOptionsThreeRing();
},
// 1
setOptionsLastRing() {
@ -341,7 +343,7 @@ export default {
value: 25,
itemStyle: {
normal: {
color: optionsSetup.eightColor,
color: eightColor,
borderWidth: 0,
borderColor: 'rgba(0,0,0,0)'
}
@ -361,6 +363,7 @@ export default {
}
return dataArr
},
//
setOptionsEightRing() {
const series = this.options.series;
series[1].data = this.setRingPie2();
@ -402,30 +405,29 @@ export default {
}
return dataArr
},
setOptionsDottedRing(){
// 线
setOptionsDottedRing() {
const series = this.options.series;
series[3].data = this.setRingPie3()
},
//
setOptionsTitle() {
const optionsCollapse = this.optionsSetup;
const title = {};
title.text = optionsCollapse.titleText;
title.show = optionsCollapse.isNoTitle;
title.left = optionsCollapse.textAlign;
title.textStyle = {
color: optionsCollapse.textColor,
fontSize: optionsCollapse.textFontSize,
fontWeight: optionsCollapse.textFontWeight
};
title.subtext = optionsCollapse.subText;
title.subtextStyle = {
color: optionsCollapse.subTextColor,
fontWeight: optionsCollapse.subTextFontWeight,
fontSize: optionsCollapse.subTextFontSize
};
this.options.title = title;
},
//
setOptionsThreeRing() {
const optionsSetup = this.optionsSetup;
const series = this.options.series;
let three1Color = optionsSetup.three1Color;
let three2Color = optionsSetup.three2Color;
let three3Color = optionsSetup.three3Color;
if (three1Color == "") {
three1Color = 'rgba(0,0,0,0)'
}
if (three2Color == "") {
three2Color = 'rgba(0,0,0,0)'
}
if (three3Color == "") {
three3Color = 'rgba(0,0,0,0)'
}
series[4].color = [three1Color,three2Color,three3Color]
}
}
}
</script>

Loading…
Cancel
Save