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

qianming 1 year ago
parent 144998c514
commit acb17c279a

@ -384,6 +384,14 @@ export const widgetBarDoubleYaxis = {
placeholder: '', placeholder: '',
value: 14, value: 14,
}, },
{
type: 'el-input-text',
label: '数值行数',
name: 'textRowsNum',
required: false,
placeholder: '',
value: '',
},
{ {
type: 'el-input-number', type: 'el-input-number',
label: '数值间隔', label: '数值间隔',

@ -403,6 +403,14 @@ export const widgetBarStack = {
placeholder: '', placeholder: '',
value: 14, value: 14,
}, },
{
type: 'el-input-text',
label: '数值行数',
name: 'textRowsNum',
required: false,
placeholder: '',
value: '',
},
{ {
type: 'el-input-number', type: 'el-input-number',
label: '数值间隔', label: '数值间隔',

@ -411,6 +411,14 @@ export const widgetBarchart = {
placeholder: '', placeholder: '',
value: 14, value: 14,
}, },
{
type: 'el-input-text',
label: '数值行数',
name: 'textRowsNum',
required: false,
placeholder: '',
value: '',
},
{ {
type: 'el-input-number', type: 'el-input-number',
label: '数值间隔', label: '数值间隔',

@ -309,6 +309,14 @@ export const widgetGradientBarchart = {
placeholder: '', placeholder: '',
value: 14, value: 14,
}, },
{
type: 'el-input-text',
label: '数值行数',
name: 'textRowsNum',
required: false,
placeholder: '',
value: '',
},
{ {
type: 'el-input-number', type: 'el-input-number',
label: '数值间隔', label: '数值间隔',

@ -371,6 +371,14 @@ export const widgetBarLineStack = {
placeholder: '', placeholder: '',
value: 14, value: 14,
}, },
{
type: 'el-input-text',
label: '数值行数',
name: 'textRowsNum',
required: false,
placeholder: '',
value: '',
},
{ {
type: 'el-input-number', type: 'el-input-number',
label: '数值间隔', label: '数值间隔',

@ -387,6 +387,14 @@ export const widgetBarlinechart = {
placeholder: '', placeholder: '',
value: 14, value: 14,
}, },
{
type: 'el-input-text',
label: '数值行数',
name: 'textRowsNum',
required: false,
placeholder: '',
value: '',
},
{ {
type: 'el-input-number', type: 'el-input-number',
label: '数值间隔', label: '数值间隔',

@ -391,6 +391,14 @@ export const widgetMoreBarLine = {
placeholder: '', placeholder: '',
value: 14, value: 14,
}, },
{
type: 'el-input-text',
label: '数值行数',
name: 'textRowsNum',
required: false,
placeholder: '',
value: '',
},
{ {
type: 'el-input-number', type: 'el-input-number',
label: '数值间隔', label: '数值间隔',

@ -366,6 +366,14 @@ export const widgetLineStack = {
placeholder: '', placeholder: '',
value: 14, value: 14,
}, },
{
type: 'el-input-text',
label: '数值行数',
name: 'textRowsNum',
required: false,
placeholder: '',
value: '',
},
{ {
type: 'el-input-number', type: 'el-input-number',
label: '数值间隔', label: '数值间隔',

@ -358,6 +358,14 @@ export const widgetLinechart = {
placeholder: '', placeholder: '',
value: 14, value: 14,
}, },
{
type: 'el-input-text',
label: '数值行数',
name: 'textRowsNum',
required: false,
placeholder: '',
value: '',
},
{ {
type: 'el-input-number', type: 'el-input-number',
label: '数值间隔', label: '数值间隔',

@ -442,7 +442,7 @@ export default {
legendName.push("bar1"); legendName.push("bar1");
legendName.push("bar2"); legendName.push("bar2");
// xXlabel // xXlabel
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,
@ -459,7 +459,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
} }
@ -501,10 +501,10 @@ export default {
} }
// xXlabel // xXlabel
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,
@ -521,7 +521,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
} }

@ -394,7 +394,7 @@ export default {
this.options.yAxis.type = "value"; this.options.yAxis.type = "value";
} }
// xXlabel // xXlabel
const wordNum = parseInt((this.optionsStyle.width / xAxisList.length) / optionsSetup.fontSizeX); const rowsNum = optionsSetup.textRowsNum !== "" ? optionsSetup.textRowsNum : parseInt((this.optionsStyle.width / xAxisList.length) / optionsSetup.fontSizeX);
const axisLabel = { const axisLabel = {
show: true, show: true,
interval: optionsSetup.textInterval, interval: optionsSetup.textInterval,
@ -411,7 +411,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
} }
@ -501,10 +501,10 @@ export default {
} }
// xXlabel // xXlabel
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,
@ -521,7 +521,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
} }

@ -395,7 +395,7 @@ export default {
} }
} }
// xXlabel // xXlabel
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,
@ -412,7 +412,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
} }
@ -519,7 +519,7 @@ export default {
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,
@ -536,7 +536,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
} }

@ -445,7 +445,7 @@ export default {
series[0].data = data; series[0].data = data;
} }
// xXlabel // xXlabel
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,
@ -462,7 +462,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
} }
@ -509,10 +509,10 @@ export default {
} }
// xXlabel // xXlabel
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,
@ -529,7 +529,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
} }

@ -494,7 +494,7 @@ export default {
}); });
} }
// xXlabel // xXlabel
const wordNum = parseInt((this.optionsStyle.width / xAxisList.length) / optionsSetup.fontSizeX); const rowsNum = optionsSetup.textRowsNum !== "" ? optionsSetup.textRowsNum : parseInt((this.optionsStyle.width / xAxisList.length) / optionsSetup.fontSizeX);
const axisLabel = { const axisLabel = {
show: true, show: true,
interval: optionsSetup.textInterval, interval: optionsSetup.textInterval,
@ -511,7 +511,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
} }
@ -628,7 +628,7 @@ export default {
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,
@ -645,7 +645,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
} }

@ -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>
@ -471,7 +471,7 @@ export default {
legendName.push("line"); legendName.push("line");
const optionsSetup = this.optionsSetup; const optionsSetup = this.optionsSetup;
// xXlabel // xXlabel
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,
@ -488,7 +488,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
} }
@ -530,10 +530,10 @@ export default {
const optionsSetup = this.optionsSetup; const optionsSetup = this.optionsSetup;
// xXlabel // xXlabel
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,
@ -550,7 +550,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
} }

@ -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;
// xXlabel // xXlabel
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 {
} }
// xXlabel // xXlabel
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
} }

@ -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>
@ -406,7 +406,7 @@ export default {
this.options.yAxis.type = "value"; this.options.yAxis.type = "value";
} }
// xXlabel // xXlabel
const wordNum = parseInt((this.optionsStyle.width / xAxisList.length) / optionsSetup.fontSizeX); const rowsNum = optionsSetup.textRowsNum !== "" ? optionsSetup.textRowsNum : parseInt((this.optionsStyle.width / xAxisList.length) / optionsSetup.fontSizeX);
const axisLabel = { const axisLabel = {
show: true, show: true,
interval: optionsSetup.textInterval, interval: optionsSetup.textInterval,
@ -423,7 +423,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
} }
@ -509,10 +509,10 @@ export default {
} }
// xXlabel // xXlabel
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,
@ -529,7 +529,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
} }

@ -358,7 +358,7 @@ export default {
} }
} }
// xXlabel // xXlabel
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,
@ -375,7 +375,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
} }
@ -455,10 +455,10 @@ export default {
} }
// xXlabel // xXlabel
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,
@ -475,7 +475,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
} }

Loading…
Cancel
Save