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

qianming 11 months ago
parent 144998c514
commit acb17c279a

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

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

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

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

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

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

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

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

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

@ -442,7 +442,7 @@ export default {
legendName.push("bar1");
legendName.push("bar2");
// 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 = {
show: true,
interval: optionsSetup.textInterval,
@ -459,7 +459,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
}
@ -501,10 +501,10 @@ export default {
}
// xXlabel
let xAxisDataLength = 1;
if (val.length !== 0){
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,
@ -521,7 +521,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
}

@ -394,7 +394,7 @@ export default {
this.options.yAxis.type = "value";
}
// 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 = {
show: true,
interval: optionsSetup.textInterval,
@ -411,7 +411,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
}
@ -501,10 +501,10 @@ export default {
}
// xXlabel
let xAxisDataLength = 1;
if (val.length !== 0){
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,
@ -521,7 +521,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
}

@ -395,7 +395,7 @@ export default {
}
}
// 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 = {
show: true,
interval: optionsSetup.textInterval,
@ -412,7 +412,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
}
@ -519,7 +519,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,
@ -536,7 +536,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
}

@ -445,7 +445,7 @@ export default {
series[0].data = data;
}
// 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 = {
show: true,
interval: optionsSetup.textInterval,
@ -462,7 +462,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
}
@ -509,10 +509,10 @@ export default {
}
// xXlabel
let xAxisDataLength = 1;
if (val.length !== 0){
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,
@ -529,7 +529,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
}

@ -494,7 +494,7 @@ export default {
});
}
// 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 = {
show: true,
interval: optionsSetup.textInterval,
@ -511,7 +511,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
}
@ -628,7 +628,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,
@ -645,7 +645,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
}

@ -1,6 +1,6 @@
<template>
<div :style="styleObj">
<v-chart ref="myVChart" :options="options" autoresize />
<v-chart ref="myVChart" :options="options" autoresize/>
</div>
</template>
@ -471,7 +471,7 @@ export default {
legendName.push("line");
const optionsSetup = this.optionsSetup;
// 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 = {
show: true,
interval: optionsSetup.textInterval,
@ -488,7 +488,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
}
@ -530,10 +530,10 @@ export default {
const optionsSetup = this.optionsSetup;
// xXlabel
let xAxisDataLength = 1;
if (val.length !== 0){
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,
@ -550,7 +550,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
}

@ -1,6 +1,6 @@
<template>
<div :style="styleObj">
<v-chart ref="myVChart" :options="options" autoresize />
<v-chart ref="myVChart" :options="options" autoresize/>
</div>
</template>
@ -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;
// 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 = {
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
}
@ -648,10 +649,10 @@ export default {
}
// xXlabel
let xAxisDataLength = 1;
if (val.length !== 0){
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
}

@ -1,6 +1,6 @@
<template>
<div :style="styleObj">
<v-chart ref="myVChart" :options="options" autoresize />
<v-chart ref="myVChart" :options="options" autoresize/>
</div>
</template>
@ -317,10 +317,10 @@ export default {
optionsData.dataType == "staticData"
? this.staticDataFn(optionsData.staticData, optionsSetup)
: this.dynamicDataFn(
optionsData.dynamicData,
optionsData.refreshTime,
optionsSetup
);
optionsData.dynamicData,
optionsData.refreshTime,
optionsSetup
);
},
//
setUnique(arr) {
@ -406,7 +406,7 @@ export default {
this.options.yAxis.type = "value";
}
// 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 = {
show: true,
interval: optionsSetup.textInterval,
@ -423,7 +423,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
}
@ -509,10 +509,10 @@ export default {
}
// xXlabel
let xAxisDataLength = 1;
if (val.length !== 0){
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,
@ -529,7 +529,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
}

@ -358,7 +358,7 @@ export default {
}
}
// 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 = {
show: true,
interval: optionsSetup.textInterval,
@ -375,7 +375,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
}
@ -455,10 +455,10 @@ export default {
}
// xXlabel
let xAxisDataLength = 1;
if (val.length !== 0){
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,
@ -475,7 +475,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
}

Loading…
Cancel
Save