饼图支持切换实心和空心俩种样式

qianming 3 years ago
parent 50cbc26c0a
commit d9148126c5

@ -3709,10 +3709,10 @@ const widgetTools = [
required: false, required: false,
placeholder: '', placeholder: '',
selectOptions: [ selectOptions: [
{code: '50%', name: '实心饼图'}, {code: 'shixin', name: '实心饼图'},
{code: ["40%", "70%"], name: '空心饼图'}, {code: 'kongxin', name: '空心饼图'},
], ],
value: '50%' value: 'shixin'
}, },
[ [
{ {

@ -94,7 +94,11 @@ export default {
}, },
// //
setOptionsPiechartStyle(){ setOptionsPiechartStyle(){
this.options.series[0]['radius'] = this.optionsSetup.piechartStyle if (this.optionsSetup.piechartStyle == "shixin") {
this.options.series[0]['radius'] = "50%"
}else if (this.optionsSetup.piechartStyle == "kongxin"){
this.options.series[0]['radius'] = ["40%", "70%"]
}else {}
}, },
// //
setOptionsTitle() { setOptionsTitle() {

Loading…
Cancel
Save