文字角度更新

qianming 3 years ago
parent 2c74cce904
commit 3f032ebbbc

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

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

Loading…
Cancel
Save