|
|
@ -1,6 +1,6 @@
|
|
|
|
<template>
|
|
|
|
<template>
|
|
|
|
<div :style="styleObj">
|
|
|
|
<div :style="styleObj">
|
|
|
|
<v-chart ref="myVChart" :options="options" autoresize />
|
|
|
|
<v-chart ref="myVChart" :options="options" autoresize/>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
|
@ -8,6 +8,7 @@
|
|
|
|
import {targetWidgetLinkageLogic} from "@/views/bigscreenDesigner/designer/linkageLogic";
|
|
|
|
import {targetWidgetLinkageLogic} from "@/views/bigscreenDesigner/designer/linkageLogic";
|
|
|
|
|
|
|
|
|
|
|
|
import echarts from "echarts";
|
|
|
|
import echarts from "echarts";
|
|
|
|
|
|
|
|
|
|
|
|
export default {
|
|
|
|
export default {
|
|
|
|
name: "widgetMoreBarLineChart",
|
|
|
|
name: "widgetMoreBarLineChart",
|
|
|
|
components: {},
|
|
|
|
components: {},
|
|
|
@ -528,7 +529,7 @@ export default {
|
|
|
|
series[1].data = bar2;
|
|
|
|
series[1].data = bar2;
|
|
|
|
series[2].data = line;
|
|
|
|
series[2].data = line;
|
|
|
|
// 根据图表的宽度 x轴的字体大小、长度来估算X轴的label能展示多少个字
|
|
|
|
// 根据图表的宽度 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 = {
|
|
|
|
const axisLabel = {
|
|
|
|
show: true,
|
|
|
|
show: true,
|
|
|
|
interval: optionsSetup.textInterval,
|
|
|
|
interval: optionsSetup.textInterval,
|
|
|
@ -545,7 +546,7 @@ export default {
|
|
|
|
let str = ''
|
|
|
|
let str = ''
|
|
|
|
for (let i = 0, s; s = strs[i++];) {
|
|
|
|
for (let i = 0, s; s = strs[i++];) {
|
|
|
|
str += s;
|
|
|
|
str += s;
|
|
|
|
if (!(i % wordNum)) str += '\n';
|
|
|
|
if (!(i % rowsNum)) str += '\n';
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return str
|
|
|
|
return str
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -648,10 +649,10 @@ export default {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
// 根据图表的宽度 x轴的字体大小、长度来估算X轴的label能展示多少个字
|
|
|
|
// 根据图表的宽度 x轴的字体大小、长度来估算X轴的label能展示多少个字
|
|
|
|
let xAxisDataLength = 1;
|
|
|
|
let xAxisDataLength = 1;
|
|
|
|
if (val.length !== 0){
|
|
|
|
if (val.length !== 0) {
|
|
|
|
xAxisDataLength = val.xAxis.length;
|
|
|
|
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 = {
|
|
|
|
const axisLabel = {
|
|
|
|
show: true,
|
|
|
|
show: true,
|
|
|
|
interval: optionsSetup.textInterval,
|
|
|
|
interval: optionsSetup.textInterval,
|
|
|
@ -668,7 +669,7 @@ export default {
|
|
|
|
let str = ''
|
|
|
|
let str = ''
|
|
|
|
for (let i = 0, s; s = strs[i++];) {
|
|
|
|
for (let i = 0, s; s = strs[i++];) {
|
|
|
|
str += s;
|
|
|
|
str += s;
|
|
|
|
if (!(i % wordNum)) str += '\n';
|
|
|
|
if (!(i % rowsNum)) str += '\n';
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return str
|
|
|
|
return str
|
|
|
|
}
|
|
|
|
}
|
|
|
|