feat--柱状堆叠图优化-增加Y轴最大值和阴影

qianming 1 year ago
parent 3ef94ec900
commit 5ec8feaa54

@ -411,6 +411,22 @@ export const widgetBarStack = {
placeholder: '',
value: true,
},
{
type: 'el-input-text',
label: '最大值',
name: 'maxY',
required: false,
placeholder: '',
value: '100',
},
{
type: 'el-switch',
label: '阴影显示',
name: 'isShowBackground',
require: false,
placeholder: '',
value: true,
},
{
type: 'el-input-text',
label: '坐标名',

@ -173,10 +173,20 @@ export default {
};
this.options.xAxis = xAxis;
},
//yAxis maxnull
getOptionsYMax() {
const optionsSetup = this.optionsSetup;
let max = null;
if (optionsSetup.maxY !== "") {
max = optionsSetup.maxY
}
return max
},
// Y
setOptionsY() {
const optionsSetup = this.optionsSetup;
const yAxis = {
max: this.getOptionsYMax(),
type: "value",
scale: optionsSetup.scale,
//
@ -357,6 +367,7 @@ export default {
}
series.push({
name: yAxisList[i],
showBackground: optionsSetup.isShowBackground,
type: "bar",
data: data,
barGap: "0%",

Loading…
Cancel
Save