|
|
|
@ -8,6 +8,7 @@
|
|
|
|
|
import {targetWidgetLinkageLogic} from "@/views/bigscreenDesigner/designer/linkageLogic";
|
|
|
|
|
|
|
|
|
|
import echarts from "echarts";
|
|
|
|
|
|
|
|
|
|
export default {
|
|
|
|
|
name: "widgetMoreBarLineChart",
|
|
|
|
|
components: {},
|
|
|
|
@ -528,7 +529,7 @@ export default {
|
|
|
|
|
series[1].data = bar2;
|
|
|
|
|
series[2].data = line;
|
|
|
|
|
// 根据图表的宽度 x轴的字体大小、长度来估算X轴的label能展示多少个字
|
|
|
|
|
const wordNum = parseInt((this.optionsStyle.width / axis.length) / optionsSetup.fontSizeX);
|
|
|
|
|
const rowsNum = optionsSetup.textRowsNum !== "" ? optionsSetup.textRowsNum : parseInt((this.optionsStyle.width / axis.length) / optionsSetup.fontSizeX);
|
|
|
|
|
const axisLabel = {
|
|
|
|
|
show: true,
|
|
|
|
|
interval: optionsSetup.textInterval,
|
|
|
|
@ -545,7 +546,7 @@ export default {
|
|
|
|
|
let str = ''
|
|
|
|
|
for (let i = 0, s; s = strs[i++];) {
|
|
|
|
|
str += s;
|
|
|
|
|
if (!(i % wordNum)) str += '\n';
|
|
|
|
|
if (!(i % rowsNum)) str += '\n';
|
|
|
|
|
}
|
|
|
|
|
return str
|
|
|
|
|
}
|
|
|
|
@ -651,7 +652,7 @@ export default {
|
|
|
|
|
if (val.length !== 0) {
|
|
|
|
|
xAxisDataLength = val.xAxis.length;
|
|
|
|
|
}
|
|
|
|
|
const wordNum = parseInt((this.optionsStyle.width / xAxisDataLength) / optionsSetup.fontSizeX);
|
|
|
|
|
const rowsNum = optionsSetup.textRowsNum !== "" ? optionsSetup.textRowsNum : parseInt((this.optionsStyle.width / xAxisDataLength) / optionsSetup.fontSizeX);
|
|
|
|
|
const axisLabel = {
|
|
|
|
|
show: true,
|
|
|
|
|
interval: optionsSetup.textInterval,
|
|
|
|
@ -668,7 +669,7 @@ export default {
|
|
|
|
|
let str = ''
|
|
|
|
|
for (let i = 0, s; s = strs[i++];) {
|
|
|
|
|
str += s;
|
|
|
|
|
if (!(i % wordNum)) str += '\n';
|
|
|
|
|
if (!(i % rowsNum)) str += '\n';
|
|
|
|
|
}
|
|
|
|
|
return str
|
|
|
|
|
}
|
|
|
|
|