feat--X轴数值增加数值行数配置优化

qianming 1 year ago
parent acb17c279a
commit 3a115f3d9b

@ -500,10 +500,7 @@ export default {
} }
} }
// xXlabel // xXlabel
let xAxisDataLength = 1; const xAxisDataLength = val.length !== 0 ? val.xAxis.length : 1;
if (val.length !== 0) {
xAxisDataLength = val.xAxis.length;
}
const rowsNum = optionsSetup.textRowsNum !== "" ? optionsSetup.textRowsNum : parseInt((this.optionsStyle.width / xAxisDataLength) / optionsSetup.fontSizeX); const rowsNum = optionsSetup.textRowsNum !== "" ? optionsSetup.textRowsNum : parseInt((this.optionsStyle.width / xAxisDataLength) / optionsSetup.fontSizeX);
const axisLabel = { const axisLabel = {
show: true, show: true,

@ -500,10 +500,7 @@ export default {
legendName.push(val.series[i].name); legendName.push(val.series[i].name);
} }
// xXlabel // xXlabel
let xAxisDataLength = 1; const xAxisDataLength = val.length !== 0 ? val.xAxis.length : 1;
if (val.length !== 0) {
xAxisDataLength = val.xAxis.length;
}
const rowsNum = optionsSetup.textRowsNum !== "" ? optionsSetup.textRowsNum : parseInt((this.optionsStyle.width / xAxisDataLength) / optionsSetup.fontSizeX); const rowsNum = optionsSetup.textRowsNum !== "" ? optionsSetup.textRowsNum : parseInt((this.optionsStyle.width / xAxisDataLength) / optionsSetup.fontSizeX);
const axisLabel = { const axisLabel = {
show: true, show: true,

@ -515,11 +515,8 @@ export default {
} }
} }
// xXlabel // xXlabel
let xAxisDataLength = 1; const xAxisDataLength = val.length !== 0 ? val.xAxis.length : 1;
if (val.length !== 0){ const rowsNum = optionsSetup.textRowsNum !== "" ? optionsSetup.textRowsNum : parseInt((this.optionsStyle.width / xAxisDataLength) / optionsSetup.fontSizeX);
xAxisDataLength = val.xAxis.length;
}
const rowsNum = optionsSetup.textRowsNum !== "" ? optionsSetup.textRowsNum : parseInt((this.optionsStyle.width / xAxisDataLength) / optionsSetup.fontSizeX)
const axisLabel = { const axisLabel = {
show: true, show: true,
interval: optionsSetup.textInterval, interval: optionsSetup.textInterval,

@ -508,10 +508,7 @@ export default {
series[0].data = val.series[0].data; series[0].data = val.series[0].data;
} }
// xXlabel // xXlabel
let xAxisDataLength = 1; const xAxisDataLength = val.length !== 0 ? val.xAxis.length : 1;
if (val.length !== 0) {
xAxisDataLength = val.xAxis.length;
}
const rowsNum = optionsSetup.textRowsNum !== "" ? optionsSetup.textRowsNum : parseInt((this.optionsStyle.width / xAxisDataLength) / optionsSetup.fontSizeX); const rowsNum = optionsSetup.textRowsNum !== "" ? optionsSetup.textRowsNum : parseInt((this.optionsStyle.width / xAxisDataLength) / optionsSetup.fontSizeX);
const axisLabel = { const axisLabel = {
show: true, show: true,

@ -624,10 +624,7 @@ export default {
}); });
} }
// xXlabel // xXlabel
let xAxisDataLength = 1; const xAxisDataLength = val.length !== 0 ? val.xAxis.length : 1;
if (val.length !== 0){
xAxisDataLength = val.xAxis.length;
}
const rowsNum = optionsSetup.textRowsNum !== "" ? optionsSetup.textRowsNum : parseInt((this.optionsStyle.width / xAxisDataLength) / optionsSetup.fontSizeX); const rowsNum = optionsSetup.textRowsNum !== "" ? optionsSetup.textRowsNum : parseInt((this.optionsStyle.width / xAxisDataLength) / optionsSetup.fontSizeX);
const axisLabel = { const axisLabel = {
show: true, show: true,

@ -529,10 +529,7 @@ export default {
} }
const optionsSetup = this.optionsSetup; const optionsSetup = this.optionsSetup;
// xXlabel // xXlabel
let xAxisDataLength = 1; const xAxisDataLength = val.length !== 0 ? val.xAxis.length : 1;
if (val.length !== 0) {
xAxisDataLength = val.xAxis.length;
}
const rowsNum = optionsSetup.textRowsNum !== "" ? optionsSetup.textRowsNum : parseInt((this.optionsStyle.width / xAxisDataLength) / optionsSetup.fontSizeX); const rowsNum = optionsSetup.textRowsNum !== "" ? optionsSetup.textRowsNum : parseInt((this.optionsStyle.width / xAxisDataLength) / optionsSetup.fontSizeX);
const axisLabel = { const axisLabel = {
show: true, show: true,

@ -648,10 +648,7 @@ export default {
} }
} }
// xXlabel // xXlabel
let xAxisDataLength = 1; const xAxisDataLength = val.length !== 0 ? val.xAxis.length : 1;
if (val.length !== 0) {
xAxisDataLength = val.xAxis.length;
}
const rowsNum = optionsSetup.textRowsNum !== "" ? optionsSetup.textRowsNum : parseInt((this.optionsStyle.width / xAxisDataLength) / optionsSetup.fontSizeX); const rowsNum = optionsSetup.textRowsNum !== "" ? optionsSetup.textRowsNum : parseInt((this.optionsStyle.width / xAxisDataLength) / optionsSetup.fontSizeX);
const axisLabel = { const axisLabel = {
show: true, show: true,

@ -508,10 +508,7 @@ export default {
legendName.push(val.series[i].name); legendName.push(val.series[i].name);
} }
// xXlabel // xXlabel
let xAxisDataLength = 1; const xAxisDataLength = val.length !== 0 ? val.xAxis.length : 1;
if (val.length !== 0) {
xAxisDataLength = val.xAxis.length;
}
const rowsNum = optionsSetup.textRowsNum !== "" ? optionsSetup.textRowsNum : parseInt((this.optionsStyle.width / xAxisDataLength) / optionsSetup.fontSizeX); const rowsNum = optionsSetup.textRowsNum !== "" ? optionsSetup.textRowsNum : parseInt((this.optionsStyle.width / xAxisDataLength) / optionsSetup.fontSizeX);
const axisLabel = { const axisLabel = {
show: true, show: true,

@ -454,10 +454,7 @@ export default {
} }
} }
// xXlabel // xXlabel
let xAxisDataLength = 1; const xAxisDataLength = val.length !== 0 ? val.xAxis.length : 1;
if (val.length !== 0) {
xAxisDataLength = val.xAxis.length;
}
const rowsNum = optionsSetup.textRowsNum !== "" ? optionsSetup.textRowsNum : parseInt((this.optionsStyle.width / xAxisDataLength) / optionsSetup.fontSizeX); const rowsNum = optionsSetup.textRowsNum !== "" ? optionsSetup.textRowsNum : parseInt((this.optionsStyle.width / xAxisDataLength) / optionsSetup.fontSizeX);
const axisLabel = { const axisLabel = {
show: true, show: true,

Loading…
Cancel
Save