|
|
|
@ -242,21 +242,26 @@ export default {
|
|
|
|
|
setOptionsX() {
|
|
|
|
|
const optionsSetup = this.optionsSetup;
|
|
|
|
|
const xAxis = {
|
|
|
|
|
type: 'category',
|
|
|
|
|
show: optionsSetup.hideX, // 坐标轴是否显示
|
|
|
|
|
name: optionsSetup.xName, // 坐标轴名称
|
|
|
|
|
type: "category",
|
|
|
|
|
// 坐标轴是否显示
|
|
|
|
|
show: optionsSetup.hideX,
|
|
|
|
|
// 坐标轴名称
|
|
|
|
|
name: optionsSetup.nameX,
|
|
|
|
|
nameTextStyle: {
|
|
|
|
|
color: optionsSetup.nameColorX,
|
|
|
|
|
fontSize: optionsSetup.nameFontSizeX
|
|
|
|
|
},
|
|
|
|
|
nameRotate: optionsSetup.textAngle, // 文字角度
|
|
|
|
|
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.colorX,
|
|
|
|
|
fontSize: optionsSetup.fontSizeX
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
@ -280,53 +285,75 @@ export default {
|
|
|
|
|
const optionsSetup = this.optionsSetup;
|
|
|
|
|
const yAxis = [
|
|
|
|
|
{
|
|
|
|
|
type: 'value',
|
|
|
|
|
show: optionsSetup.isShowYLeft, // 坐标轴是否显示
|
|
|
|
|
name: optionsSetup.textNameYLeft, // 坐标轴名称
|
|
|
|
|
nameTextStyle: { //颜色字号
|
|
|
|
|
type: "value",
|
|
|
|
|
// 均分
|
|
|
|
|
splitNumber: optionsSetup.splitNumberLeft,
|
|
|
|
|
// 坐标轴是否显示
|
|
|
|
|
show: optionsSetup.isShowYLeft,
|
|
|
|
|
// 坐标轴名称
|
|
|
|
|
name: optionsSetup.textNameYLeft,
|
|
|
|
|
// 别名
|
|
|
|
|
nameTextStyle: {
|
|
|
|
|
color: optionsSetup.nameColorYLeft,
|
|
|
|
|
fontSize: optionsSetup.nameFontSizeYLeft
|
|
|
|
|
},
|
|
|
|
|
axisLabel: {
|
|
|
|
|
show: true,
|
|
|
|
|
// 文字角度
|
|
|
|
|
rotate: optionsSetup.textAngleYLeft,
|
|
|
|
|
textStyle: {
|
|
|
|
|
color: optionsSetup.colorY, // y轴 坐标文字颜色
|
|
|
|
|
fontSize: optionsSetup.fontSizeY
|
|
|
|
|
// 坐标文字颜色
|
|
|
|
|
color: optionsSetup.colorYLeft,
|
|
|
|
|
fontSize: optionsSetup.fontSizeYLeft
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
axisLine: {
|
|
|
|
|
show: true,
|
|
|
|
|
lineStyle: {
|
|
|
|
|
color: optionsSetup.lineColorY
|
|
|
|
|
color: optionsSetup.lineColorYLeft
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
splitLine: {
|
|
|
|
|
show: false,
|
|
|
|
|
show: optionsSetup.isShowSplitLineYLeft,
|
|
|
|
|
lineStyle: {
|
|
|
|
|
color: optionsSetup.splitLineColorYLeft,
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
type: 'value',
|
|
|
|
|
show: optionsSetup.isShowYRight, // 坐标轴是否显示
|
|
|
|
|
name: optionsSetup.textNameYRight, // 坐标轴名称
|
|
|
|
|
nameTextStyle: { // 颜色字号
|
|
|
|
|
type: "value",
|
|
|
|
|
// 均分
|
|
|
|
|
splitNumber: optionsSetup.splitNumberRight,
|
|
|
|
|
// 坐标轴是否显示
|
|
|
|
|
show: optionsSetup.isShowYRight,
|
|
|
|
|
// 坐标轴名称
|
|
|
|
|
name: optionsSetup.textNameYRight,
|
|
|
|
|
// 别名
|
|
|
|
|
nameTextStyle: {
|
|
|
|
|
color: optionsSetup.nameColorYRight,
|
|
|
|
|
fontSize: optionsSetup.nameFontSizeYRight
|
|
|
|
|
},
|
|
|
|
|
axisLabel: {
|
|
|
|
|
show: true,
|
|
|
|
|
// 文字角度
|
|
|
|
|
rotate: optionsSetup.textAngleYRight,
|
|
|
|
|
textStyle: {
|
|
|
|
|
color: optionsSetup.colorY, // y轴 坐标文字颜色
|
|
|
|
|
fontSize: optionsSetup.fontSizeY
|
|
|
|
|
// 坐标文字颜色
|
|
|
|
|
color: optionsSetup.colorYRight,
|
|
|
|
|
fontSize: optionsSetup.fontSizeYRight
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
axisLine: {
|
|
|
|
|
show: true,
|
|
|
|
|
lineStyle: {
|
|
|
|
|
color: optionsSetup.lineColorY
|
|
|
|
|
color: optionsSetup.lineColorYRight
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
splitLine: {
|
|
|
|
|
show: false,
|
|
|
|
|
show: optionsSetup.isShowSplitLineYRight,
|
|
|
|
|
lineStyle: {
|
|
|
|
|
color: optionsSetup.splitLineColorYRight,
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
];
|
|
|
|
|