feat--柱线堆叠图增加柱体堆叠样式

qianming 1 year ago
parent a0be7dee44
commit fd871c031b

@ -47,6 +47,18 @@ export const widgetBarLineStack = {
placeholder: '',
value: 5,
},
{
type: 'el-select',
label: '堆叠样式',
name: 'stackStyle',
required: false,
placeholder: '',
selectOptions: [
{ code: 'leftRight', name: '左右堆叠' },
{ code: 'upDown', name: '上下堆叠' },
],
value: 'leftRight'
},
],
},
{

@ -359,6 +359,15 @@ export default {
this.options.legend["data"] = arr;
}
},
//
getStackStyle() {
const optionsSetup = this.optionsSetup;
let style = "";
if (optionsSetup.stackStyle == "upDown") {
style = "total";
}
return style;
},
//
setOptionsData(e, paramsConfig) {
const optionsSetup = this.optionsSetup;
@ -440,6 +449,7 @@ export default {
type: "bar",
data: bar,
barGap: "0%",
stack : this.getStackStyle(),
barWidth: optionsSetup.maxWidth,
label: {
show: optionsSetup.isShowBar,
@ -544,6 +554,7 @@ export default {
type: "bar",
data: bar,
barGap: "0%",
stack : this.getStackStyle(),
barWidth: optionsSetup.maxWidth,
label: {
show: optionsSetup.isShowBar,

Loading…
Cancel
Save