文字角度更新

qianming 3 years ago
parent 2c74cce904
commit 3f032ebbbc

@ -126,20 +126,25 @@ export default {
const optionsSetup = this.optionsSetup;
const xAxis = {
type: "category",
show: optionsSetup.hideX, //
name: optionsSetup.xName, //
//
show: optionsSetup.hideX,
//
name: optionsSetup.xName,
nameTextStyle: {
color: optionsSetup.xNameColor,
fontSize: optionsSetup.xNameFontSize
},
nameRotate: optionsSetup.textAngleX, //
inverse: optionsSetup.reversalX, //
//
inverse: optionsSetup.reversalX,
axisLabel: {
show: true,
interval: optionsSetup.textInterval, //
rotate: optionsSetup.textAngle, //
//
interval: optionsSetup.textInterval,
//
rotate: optionsSetup.textAngleX,
textStyle: {
color: optionsSetup.Xcolor, // x
//
color: optionsSetup.Xcolor,
fontSize: optionsSetup.fontSizeX
}
},
@ -163,18 +168,23 @@ export default {
const optionsSetup = this.optionsSetup;
const yAxis = {
type: "value",
show: optionsSetup.isShowY, //
name: optionsSetup.textNameY, //
//
show: optionsSetup.isShowY,
//
name: optionsSetup.textNameY,
nameTextStyle: {
color: optionsSetup.NameColorY,
fontSize: optionsSetup.NameFontSizeY
},
inverse: optionsSetup.reversalY, // y
// y
inverse: optionsSetup.reversalY,
axisLabel: {
show: true,
rotate: optionsSetup.textAngleY,//
//
rotate: optionsSetup.textAngleY,
textStyle: {
color: optionsSetup.colorY, // y
//
color: optionsSetup.colorY,
fontSize: optionsSetup.fontSizeY
}
},
@ -237,7 +247,8 @@ export default {
//
setOptionsData() {
const optionsSetup = this.optionsSetup;
const optionsData = this.optionsData; // or
// or
const optionsData = this.optionsData;
optionsData.dataType == "staticData"
? this.staticDataFn(optionsData.staticData, optionsSetup)
: this.dynamicDataFn(
@ -280,8 +291,8 @@ export default {
xAxisList[i] = val[i].axis
yAxisList[i] = val[i].name
}
xAxisList = this.setUnique(xAxisList) // x 0725 0726 0727
yAxisList = this.setUnique(yAxisList) // y A B C
xAxisList = this.setUnique(xAxisList)
yAxisList = this.setUnique(yAxisList)
for (const i in yAxisList) {
const data = new Array(yAxisList.length).fill(0)
for (const j in xAxisList) {

@ -126,20 +126,25 @@ export default {
const optionsSetup = this.optionsSetup;
const xAxis = {
type: "category",
show: optionsSetup.hideX, //
name: optionsSetup.xName, //
//
show: optionsSetup.hideX,
//
name: optionsSetup.xName,
nameTextStyle: {
color: optionsSetup.xNameColor,
fontSize: optionsSetup.xNameFontSize
},
nameRotate: optionsSetup.textAngleX, //
inverse: optionsSetup.reversalX, //
//
inverse: optionsSetup.reversalX,
axisLabel: {
show: true,
interval: optionsSetup.textInterval, //
rotate: optionsSetup.textAngle, //
//
interval: optionsSetup.textInterval,
//
rotate: optionsSetup.textAngleX,
textStyle: {
color: optionsSetup.Xcolor, // x
//
color: optionsSetup.Xcolor,
fontSize: optionsSetup.fontSizeX
}
},
@ -163,18 +168,23 @@ export default {
const optionsSetup = this.optionsSetup;
const yAxis = {
type: "value",
show: optionsSetup.isShowY, //
name: optionsSetup.textNameY, //
//
show: optionsSetup.isShowY,
//
name: optionsSetup.textNameY,
nameTextStyle: {
color: optionsSetup.NameColorY,
fontSize: optionsSetup.NameFontSizeY
},
inverse: optionsSetup.reversalY, // y
// y
inverse: optionsSetup.reversalY,
axisLabel: {
show: true,
rotate: optionsSetup.textAngleY,//
//
rotate: optionsSetup.textAngleY,
textStyle: {
color: optionsSetup.colorY, // y
// y
color: optionsSetup.colorY,
fontSize: optionsSetup.fontSizeY
}
},
@ -264,7 +274,8 @@ export default {
//
setOptionsData() {
const optionsSetup = this.optionsSetup;
const optionsData = this.optionsData; // or
// or
const optionsData = this.optionsData;
optionsData.dataType == "staticData"
? this.staticDataFn(optionsData.staticData, optionsSetup)
: this.dynamicDataFn(
@ -298,14 +309,14 @@ export default {
xAxisList[i] = val[i].axis
yAxisList[i] = val[i].name
}
xAxisList = this.setUnique(xAxisList) // x 0725 0726 0727
yAxisList = this.setUnique(yAxisList) // y A B C
xAxisList = this.setUnique(xAxisList)
yAxisList = this.setUnique(yAxisList)
for (const i in yAxisList) {
const data = new Array(yAxisList.length).fill(0)
for (const j in xAxisList) {
for (const k in val) {
if (val[k].name == yAxisList[i]) { // a = a
if (val[k].axis == xAxisList[j]) { // 0725
if (val[k].name == yAxisList[i]) {
if (val[k].axis == xAxisList[j]) {
data[j] = val[k].data
}
}

Loading…
Cancel
Save