|
@@ -212,22 +212,27 @@ export default {
|
|
// 标题修改
|
|
// 标题修改
|
|
setOptionsTitle() {
|
|
setOptionsTitle() {
|
|
const optionsSetup = this.optionsSetup;
|
|
const optionsSetup = this.optionsSetup;
|
|
- const title = {};
|
|
|
|
- title.text = optionsSetup.titleText;
|
|
|
|
- title.show = optionsSetup.isNoTitle;
|
|
|
|
- title.left = optionsSetup.textAlign;
|
|
|
|
- title.textStyle = {
|
|
|
|
- color: optionsSetup.textColor,
|
|
|
|
- fontSize: optionsSetup.textFontSize,
|
|
|
|
- fontWeight: optionsSetup.textFontWeight,
|
|
|
|
- fontStyle: optionsSetup.textFontStyle,
|
|
|
|
- };
|
|
|
|
- title.subtext = optionsSetup.subText;
|
|
|
|
- title.subtextStyle = {
|
|
|
|
- color: optionsSetup.subTextColor,
|
|
|
|
- fontWeight: optionsSetup.subTextFontWeight,
|
|
|
|
- fontSize: optionsSetup.subTextFontSize,
|
|
|
|
- fontStyle: optionsSetup.subTextFontStyle,
|
|
|
|
|
|
+ const title = {
|
|
|
|
+ text: optionsSetup.text,
|
|
|
|
+ show: optionsSetup.isShowTitle,
|
|
|
|
+ left: optionsSetup.titleLeft,
|
|
|
|
+ top: optionsSetup.titleTop + "%",
|
|
|
|
+ itemGap: optionsSetup.titleItemGap,
|
|
|
|
+ textStyle: {
|
|
|
|
+ color: optionsSetup.textColor,
|
|
|
|
+ fontSize: optionsSetup.textFontSize,
|
|
|
|
+ fontWeight: optionsSetup.textFontWeight,
|
|
|
|
+ fontStyle: optionsSetup.textFontStyle,
|
|
|
|
+ fontFamily: optionsSetup.textFontFamily,
|
|
|
|
+ },
|
|
|
|
+ subtext: optionsSetup.subtext,
|
|
|
|
+ subtextStyle: {
|
|
|
|
+ color: optionsSetup.subtextColor,
|
|
|
|
+ fontWeight: optionsSetup.subtextFontWeight,
|
|
|
|
+ fontSize: optionsSetup.subtextFontSize,
|
|
|
|
+ fontStyle: optionsSetup.subtextFontStyle,
|
|
|
|
+ fontFamily: optionsSetup.subtextFontFamily
|
|
|
|
+ },
|
|
};
|
|
};
|
|
this.options.title = title;
|
|
this.options.title = title;
|
|
},
|
|
},
|
|
@@ -237,33 +242,52 @@ export default {
|
|
const xAxis = {
|
|
const xAxis = {
|
|
type: "category",
|
|
type: "category",
|
|
// 坐标轴是否显示
|
|
// 坐标轴是否显示
|
|
- show: optionsSetup.hideX,
|
|
|
|
|
|
+ show: optionsSetup.isShowX,
|
|
|
|
+ position: optionsSetup.positionX,
|
|
|
|
+ offset: optionsSetup.offsetX,
|
|
// 坐标轴名称
|
|
// 坐标轴名称
|
|
name: optionsSetup.nameX,
|
|
name: optionsSetup.nameX,
|
|
|
|
+ nameLocation: optionsSetup.nameLocationX,
|
|
nameTextStyle: {
|
|
nameTextStyle: {
|
|
color: optionsSetup.nameColorX,
|
|
color: optionsSetup.nameColorX,
|
|
fontSize: optionsSetup.nameFontSizeX,
|
|
fontSize: optionsSetup.nameFontSizeX,
|
|
|
|
+ fontWeight: optionsSetup.nameFontWeightX,
|
|
|
|
+ fontStyle: optionsSetup.nameFontStyleX,
|
|
|
|
+ fontFamily: optionsSetup.nameFontFamilyX,
|
|
},
|
|
},
|
|
// 轴反转
|
|
// 轴反转
|
|
inverse: optionsSetup.reversalX,
|
|
inverse: optionsSetup.reversalX,
|
|
axisLabel: {
|
|
axisLabel: {
|
|
- show: true,
|
|
|
|
- interval: optionsSetup.textInterval,
|
|
|
|
|
|
+ show: optionsSetup.isShowAxisLabelX,
|
|
|
|
+ interval: optionsSetup.textIntervalX,
|
|
// 文字角度
|
|
// 文字角度
|
|
rotate: optionsSetup.textAngleX,
|
|
rotate: optionsSetup.textAngleX,
|
|
textStyle: {
|
|
textStyle: {
|
|
// 坐标文字颜色
|
|
// 坐标文字颜色
|
|
- color: optionsSetup.colorX,
|
|
|
|
- fontSize: optionsSetup.fontSizeX,
|
|
|
|
|
|
+ color: optionsSetup.textColorX,
|
|
|
|
+ fontSize: optionsSetup.textFontSizeX,
|
|
|
|
+ fontWeight: optionsSetup.textFontWeightX,
|
|
|
|
+ fontStyle: optionsSetup.textFontStyleX,
|
|
|
|
+ fontFamily: optionsSetup.textFontFamilyX,
|
|
},
|
|
},
|
|
},
|
|
},
|
|
|
|
+ // X轴线
|
|
axisLine: {
|
|
axisLine: {
|
|
- show: true,
|
|
|
|
|
|
+ show: optionsSetup.isShowAxisLineX,
|
|
|
|
+ lineStyle: {
|
|
|
|
+ color: optionsSetup.lineColorX,
|
|
|
|
+ width: optionsSetup.lineWidthX,
|
|
|
|
+ },
|
|
|
|
+ },
|
|
|
|
+ // X轴刻度线
|
|
|
|
+ axisTick: {
|
|
|
|
+ show: optionsSetup.isShowAxisLineX,
|
|
lineStyle: {
|
|
lineStyle: {
|
|
color: optionsSetup.lineColorX,
|
|
color: optionsSetup.lineColorX,
|
|
width: optionsSetup.lineWidthX,
|
|
width: optionsSetup.lineWidthX,
|
|
},
|
|
},
|
|
},
|
|
},
|
|
|
|
+ // X轴分割线
|
|
splitLine: {
|
|
splitLine: {
|
|
show: optionsSetup.isShowSplitLineX,
|
|
show: optionsSetup.isShowSplitLineX,
|
|
lineStyle: {
|
|
lineStyle: {
|
|
@@ -281,33 +305,47 @@ export default {
|
|
{
|
|
{
|
|
max: optionsSetup.maxYLeft !== "" ? optionsSetup.maxYLeft : null,
|
|
max: optionsSetup.maxYLeft !== "" ? optionsSetup.maxYLeft : null,
|
|
type: "value",
|
|
type: "value",
|
|
|
|
+ scale: optionsSetup.scaleYLeft,
|
|
// 均分
|
|
// 均分
|
|
- splitNumber: optionsSetup.splitNumberLeft,
|
|
|
|
|
|
+ splitNumber: optionsSetup.splitNumberYLeft,
|
|
// 坐标轴是否显示
|
|
// 坐标轴是否显示
|
|
show: optionsSetup.isShowYLeft,
|
|
show: optionsSetup.isShowYLeft,
|
|
|
|
+ position: optionsSetup.positionYLeft,
|
|
|
|
+ offset: optionsSetup.offsetYLeft,
|
|
// 坐标轴名称
|
|
// 坐标轴名称
|
|
name: optionsSetup.textNameYLeft,
|
|
name: optionsSetup.textNameYLeft,
|
|
|
|
+ nameLocation: optionsSetup.nameLocationYLeft,
|
|
// 别名
|
|
// 别名
|
|
nameTextStyle: {
|
|
nameTextStyle: {
|
|
color: optionsSetup.nameColorYLeft,
|
|
color: optionsSetup.nameColorYLeft,
|
|
fontSize: optionsSetup.nameFontSizeYLeft,
|
|
fontSize: optionsSetup.nameFontSizeYLeft,
|
|
|
|
+ fontWeight: optionsSetup.nameFontWeightYLeft,
|
|
|
|
+ fontStyle: optionsSetup.nameFontStyleYLeft,
|
|
|
|
+ fontFamily: optionsSetup.nameFontFamilyYLeft,
|
|
},
|
|
},
|
|
axisLabel: {
|
|
axisLabel: {
|
|
- show: true,
|
|
|
|
|
|
+ show: optionsSetup.isShowAxisLabelYLeft,
|
|
// 文字角度
|
|
// 文字角度
|
|
rotate: optionsSetup.textAngleYLeft,
|
|
rotate: optionsSetup.textAngleYLeft,
|
|
textStyle: {
|
|
textStyle: {
|
|
// 坐标文字颜色
|
|
// 坐标文字颜色
|
|
- color: optionsSetup.colorYLeft,
|
|
|
|
- fontSize: optionsSetup.fontSizeYLeft,
|
|
|
|
|
|
+ color: optionsSetup.textColorYLeft,
|
|
|
|
+ fontSize: optionsSetup.textFontSizeYLeft,
|
|
|
|
+ fontWeight: optionsSetup.textFontWeightYLeft,
|
|
|
|
+ fontStyle: optionsSetup.textFontStyleYLeft,
|
|
|
|
+ fontFamily: optionsSetup.textFontFamilyYLeft,
|
|
|
|
+ },
|
|
|
|
+ },
|
|
|
|
+ axisLine: {
|
|
|
|
+ show: optionsSetup.isShowAxisLineYLeft,
|
|
|
|
+ lineStyle: {
|
|
|
|
+ width: optionsSetup.lineWidthYLeft,
|
|
|
|
+ color: optionsSetup.lineColorYLeft,
|
|
},
|
|
},
|
|
},
|
|
},
|
|
axisTick: {
|
|
axisTick: {
|
|
// 刻度
|
|
// 刻度
|
|
- show: optionsSetup.tickLineYLeft,
|
|
|
|
- },
|
|
|
|
- axisLine: {
|
|
|
|
- show: optionsSetup.lineYLeft,
|
|
|
|
|
|
+ show: optionsSetup.isShowAxisLineYLeft,
|
|
lineStyle: {
|
|
lineStyle: {
|
|
width: optionsSetup.lineWidthYLeft,
|
|
width: optionsSetup.lineWidthYLeft,
|
|
color: optionsSetup.lineColorYLeft,
|
|
color: optionsSetup.lineColorYLeft,
|
|
@@ -324,38 +362,52 @@ export default {
|
|
{
|
|
{
|
|
max: optionsSetup.maxYRight !== "" ? optionsSetup.maxYRight : null,
|
|
max: optionsSetup.maxYRight !== "" ? optionsSetup.maxYRight : null,
|
|
type: "value",
|
|
type: "value",
|
|
|
|
+ scale: optionsSetup.scaleYRight,
|
|
// 均分
|
|
// 均分
|
|
- splitNumber: optionsSetup.splitNumberRight,
|
|
|
|
|
|
+ splitNumber: optionsSetup.splitNumberYRight,
|
|
// 坐标轴是否显示
|
|
// 坐标轴是否显示
|
|
show: optionsSetup.isShowYRight,
|
|
show: optionsSetup.isShowYRight,
|
|
|
|
+ position: optionsSetup.positionYRight,
|
|
|
|
+ offset: optionsSetup.offsetYRight,
|
|
// 坐标轴名称
|
|
// 坐标轴名称
|
|
name: optionsSetup.textNameYRight,
|
|
name: optionsSetup.textNameYRight,
|
|
|
|
+ nameLocation: optionsSetup.nameLocationYRight,
|
|
// 别名
|
|
// 别名
|
|
nameTextStyle: {
|
|
nameTextStyle: {
|
|
color: optionsSetup.nameColorYRight,
|
|
color: optionsSetup.nameColorYRight,
|
|
fontSize: optionsSetup.nameFontSizeYRight,
|
|
fontSize: optionsSetup.nameFontSizeYRight,
|
|
|
|
+ fontWeight: optionsSetup.nameFontWeightYRight,
|
|
|
|
+ fontStyle: optionsSetup.nameFontStyleYRight,
|
|
|
|
+ fontFamily: optionsSetup.nameFontFamilyYRight,
|
|
},
|
|
},
|
|
axisLabel: {
|
|
axisLabel: {
|
|
- show: true,
|
|
|
|
|
|
+ show: optionsSetup.isShowAxisLabelYRight,
|
|
// 文字角度
|
|
// 文字角度
|
|
rotate: optionsSetup.textAngleYRight,
|
|
rotate: optionsSetup.textAngleYRight,
|
|
textStyle: {
|
|
textStyle: {
|
|
// 坐标文字颜色
|
|
// 坐标文字颜色
|
|
- color: optionsSetup.colorYRight,
|
|
|
|
- fontSize: optionsSetup.fontSizeYRight,
|
|
|
|
|
|
+ color: optionsSetup.textColorYRight,
|
|
|
|
+ fontSize: optionsSetup.textFontSizeYRight,
|
|
|
|
+ fontWeight: optionsSetup.textFontWeightYRight,
|
|
|
|
+ fontStyle: optionsSetup.textFontStyleYRight,
|
|
|
|
+ fontFamily: optionsSetup.textFontFamilyYRight,
|
|
},
|
|
},
|
|
},
|
|
},
|
|
- axisTick: {
|
|
|
|
- // 刻度
|
|
|
|
- show: optionsSetup.tickLineYRight,
|
|
|
|
- },
|
|
|
|
axisLine: {
|
|
axisLine: {
|
|
- show: optionsSetup.lineYRight,
|
|
|
|
|
|
+ show: optionsSetup.isShowAxisLineYRight,
|
|
lineStyle: {
|
|
lineStyle: {
|
|
width: optionsSetup.lineWidthYRight,
|
|
width: optionsSetup.lineWidthYRight,
|
|
color: optionsSetup.lineColorYRight,
|
|
color: optionsSetup.lineColorYRight,
|
|
},
|
|
},
|
|
},
|
|
},
|
|
|
|
+ axisTick: {
|
|
|
|
+ // 刻度
|
|
|
|
+ show: optionsSetup.isShowAxisLineYRight,
|
|
|
|
+ lineStyle: {
|
|
|
|
+ width: optionsSetup.lineWidthYRight,
|
|
|
|
+ color: optionsSetup.lineColorYRight,
|
|
|
|
+ }
|
|
|
|
+ },
|
|
splitLine: {
|
|
splitLine: {
|
|
show: optionsSetup.isShowSplitLineYRight,
|
|
show: optionsSetup.isShowSplitLineYRight,
|
|
lineStyle: {
|
|
lineStyle: {
|
|
@@ -377,8 +429,11 @@ export default {
|
|
type: optionsSetup.tooltipAxisPointerType,
|
|
type: optionsSetup.tooltipAxisPointerType,
|
|
},
|
|
},
|
|
textStyle: {
|
|
textStyle: {
|
|
- color: optionsSetup.tipsColor,
|
|
|
|
- fontSize: optionsSetup.tipsFontSize,
|
|
|
|
|
|
+ color: optionsSetup.tooltipColor,
|
|
|
|
+ fontSize: optionsSetup.tooltipFontSize,
|
|
|
|
+ fontWeight: optionsSetup.tooltipFontWeight,
|
|
|
|
+ fontStyle: optionsSetup.tooltipFontStyle,
|
|
|
|
+ fontFamily: optionsSetup.tooltipFontFamily,
|
|
},
|
|
},
|
|
};
|
|
};
|
|
this.options.tooltip = tooltip;
|
|
this.options.tooltip = tooltip;
|
|
@@ -397,17 +452,24 @@ export default {
|
|
},
|
|
},
|
|
setOptionsLegend() {
|
|
setOptionsLegend() {
|
|
const optionsSetup = this.optionsSetup;
|
|
const optionsSetup = this.optionsSetup;
|
|
- const legend = this.options.legend;
|
|
|
|
- legend.show = optionsSetup.isShowLegend;
|
|
|
|
- legend.left = optionsSetup.lateralPosition;
|
|
|
|
- legend.top = optionsSetup.longitudinalPosition;
|
|
|
|
- legend.bottom = optionsSetup.longitudinalPosition;
|
|
|
|
- legend.orient = optionsSetup.layoutFront;
|
|
|
|
- legend.textStyle = {
|
|
|
|
- color: optionsSetup.legendColor,
|
|
|
|
- fontSize: optionsSetup.legendFontSize,
|
|
|
|
|
|
+ const legend = {
|
|
|
|
+ show: optionsSetup.isShowLegend,
|
|
|
|
+ left: optionsSetup.lateralPosition,
|
|
|
|
+ //right: optionsSetup.lateralPosition,
|
|
|
|
+ top: optionsSetup.longitudinalPosition,
|
|
|
|
+ //bottom: optionsSetup.longitudinalPosition,
|
|
|
|
+ orient: optionsSetup.layoutFront,
|
|
|
|
+ textStyle: {
|
|
|
|
+ color: optionsSetup.legendColor,
|
|
|
|
+ fontSize: optionsSetup.legendFontSize,
|
|
|
|
+ fontWeight: optionsSetup.legendFontWeight,
|
|
|
|
+ fontStyle: optionsSetup.legendFontStyle,
|
|
|
|
+ fontFamily: optionsSetup.legendFontFamily,
|
|
|
|
+ },
|
|
|
|
+ itemHeight: optionsSetup.legendHeight,
|
|
|
|
+ itemWidth: optionsSetup.legendWidth,
|
|
};
|
|
};
|
|
- legend.itemWidth = optionsSetup.legendWidth;
|
|
|
|
|
|
+ this.options.legend = legend;
|
|
},
|
|
},
|
|
// 图例名称设置
|
|
// 图例名称设置
|
|
setOptionsLegendName(name) {
|
|
setOptionsLegendName(name) {
|
|
@@ -497,11 +559,13 @@ export default {
|
|
series[i].label = {
|
|
series[i].label = {
|
|
show: optionsSetup.isShowBar,
|
|
show: optionsSetup.isShowBar,
|
|
position: optionsSetup.fontPositionBar,
|
|
position: optionsSetup.fontPositionBar,
|
|
- distance: optionsSetup.distanceBar,
|
|
|
|
|
|
+ distance: optionsSetup.fontDistanceBar,
|
|
fontSize: optionsSetup.fontSizeBar,
|
|
fontSize: optionsSetup.fontSizeBar,
|
|
- color: optionsSetup.subTextColorBar,
|
|
|
|
|
|
+ color: optionsSetup.fontColorBar,
|
|
fontWeight: optionsSetup.fontWeightBar,
|
|
fontWeight: optionsSetup.fontWeightBar,
|
|
- formatter: !!optionsSetup.percentSignBar ? '{c}%' : '{c}'
|
|
|
|
|
|
+ formatter: !!optionsSetup.percentSignBar ? '{c}%' : '{c}',
|
|
|
|
+ fontStyle: optionsSetup.fontStyleBar,
|
|
|
|
+ fontFamily: optionsSetup.fontFamilyBar,
|
|
};
|
|
};
|
|
//柱体背景属性
|
|
//柱体背景属性
|
|
series[i].showBackground = optionsSetup.isShowBackground;
|
|
series[i].showBackground = optionsSetup.isShowBackground;
|
|
@@ -546,11 +610,13 @@ export default {
|
|
series[i].label = {
|
|
series[i].label = {
|
|
show: optionsSetup.isShowLine,
|
|
show: optionsSetup.isShowLine,
|
|
position: optionsSetup.fontPositionLine,
|
|
position: optionsSetup.fontPositionLine,
|
|
- distance: optionsSetup.distanceLine,
|
|
|
|
|
|
+ distance: optionsSetup.fontDistanceLine,
|
|
fontSize: optionsSetup.fontSizeLine,
|
|
fontSize: optionsSetup.fontSizeLine,
|
|
- color: optionsSetup.subTextColorLine,
|
|
|
|
|
|
+ color: optionsSetup.fontColorLine,
|
|
fontWeight: optionsSetup.fontWeightLine,
|
|
fontWeight: optionsSetup.fontWeightLine,
|
|
- formatter: !!optionsSetup.percentSignLine ? '{c}%' : '{c}'
|
|
|
|
|
|
+ formatter: !!optionsSetup.percentSignLine ? '{c}%' : '{c}',
|
|
|
|
+ fontStyle: optionsSetup.fontStyleLine,
|
|
|
|
+ fontFamily: optionsSetup.fontFamilyLine,
|
|
};
|
|
};
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -558,16 +624,19 @@ export default {
|
|
series[1].data = bar2;
|
|
series[1].data = bar2;
|
|
series[2].data = line;
|
|
series[2].data = line;
|
|
// 根据图表的宽度 x轴的字体大小、长度来估算X轴的label能展示多少个字
|
|
// 根据图表的宽度 x轴的字体大小、长度来估算X轴的label能展示多少个字
|
|
- const rowsNum = optionsSetup.textRowsNum !== "" ? optionsSetup.textRowsNum : parseInt((this.optionsStyle.width / axis.length) / optionsSetup.fontSizeX);
|
|
|
|
|
|
+ const rowsNum = optionsSetup.textRowsNum !== "" ? optionsSetup.textRowsNum : parseInt((this.optionsStyle.width / axis.length) / optionsSetup.textFontSizeX);
|
|
const axisLabel = {
|
|
const axisLabel = {
|
|
- show: true,
|
|
|
|
- interval: optionsSetup.textInterval,
|
|
|
|
|
|
+ show: optionsSetup.isShowAxisLabelX,
|
|
|
|
+ interval: optionsSetup.textIntervalX,
|
|
// 文字角度
|
|
// 文字角度
|
|
rotate: optionsSetup.textAngleX,
|
|
rotate: optionsSetup.textAngleX,
|
|
textStyle: {
|
|
textStyle: {
|
|
// 坐标文字颜色
|
|
// 坐标文字颜色
|
|
- color: optionsSetup.colorX,
|
|
|
|
- fontSize: optionsSetup.fontSizeX,
|
|
|
|
|
|
+ color: optionsSetup.textColorX,
|
|
|
|
+ fontSize: optionsSetup.textFontSizeX,
|
|
|
|
+ fontWeight: optionsSetup.textFontWeightX,
|
|
|
|
+ fontStyle: optionsSetup.textFontStyleX,
|
|
|
|
+ fontFamily: optionsSetup.textFontFamilyX,
|
|
},
|
|
},
|
|
// 自动换行
|
|
// 自动换行
|
|
formatter: function (value, index) {
|
|
formatter: function (value, index) {
|
|
@@ -626,11 +695,13 @@ export default {
|
|
obj.label = {
|
|
obj.label = {
|
|
show: optionsSetup.isShowBar,
|
|
show: optionsSetup.isShowBar,
|
|
position: optionsSetup.fontPositionBar,
|
|
position: optionsSetup.fontPositionBar,
|
|
- distance: optionsSetup.distanceBar,
|
|
|
|
|
|
+ distance: optionsSetup.fontDistanceBar,
|
|
fontSize: optionsSetup.fontSizeBar,
|
|
fontSize: optionsSetup.fontSizeBar,
|
|
- color: optionsSetup.subTextColorBar,
|
|
|
|
|
|
+ color: optionsSetup.fontColorBar,
|
|
fontWeight: optionsSetup.fontWeightBar,
|
|
fontWeight: optionsSetup.fontWeightBar,
|
|
- formatter: !!optionsSetup.percentSignBar ? '{c}%' : '{c}'
|
|
|
|
|
|
+ formatter: !!optionsSetup.percentSignBar ? '{c}%' : '{c}',
|
|
|
|
+ fontStyle: optionsSetup.fontStyleBar,
|
|
|
|
+ fontFamily: optionsSetup.fontFamilyBar,
|
|
};
|
|
};
|
|
obj.barWidth = optionsSetup.maxWidth;
|
|
obj.barWidth = optionsSetup.maxWidth;
|
|
obj.itemStyle = {
|
|
obj.itemStyle = {
|
|
@@ -681,11 +752,13 @@ export default {
|
|
obj.label = {
|
|
obj.label = {
|
|
show: optionsSetup.isShowLine,
|
|
show: optionsSetup.isShowLine,
|
|
position: optionsSetup.fontPositionLine,
|
|
position: optionsSetup.fontPositionLine,
|
|
- distance: optionsSetup.distanceLine,
|
|
|
|
|
|
+ distance: optionsSetup.fontDistanceLine,
|
|
fontSize: optionsSetup.fontSizeLine,
|
|
fontSize: optionsSetup.fontSizeLine,
|
|
- color: optionsSetup.subTextColorLine,
|
|
|
|
|
|
+ color: optionsSetup.fontColorLine,
|
|
fontWeight: optionsSetup.fontWeightLine,
|
|
fontWeight: optionsSetup.fontWeightLine,
|
|
- formatter: !!optionsSetup.percentSignLine ? '{c}%' : '{c}'
|
|
|
|
|
|
+ formatter: !!optionsSetup.percentSignLine ? '{c}%' : '{c}',
|
|
|
|
+ fontStyle: optionsSetup.fontStyleLine,
|
|
|
|
+ fontFamily: optionsSetup.fontFamilyLine,
|
|
};
|
|
};
|
|
obj.data = val.series[i].data;
|
|
obj.data = val.series[i].data;
|
|
series.push(obj);
|
|
series.push(obj);
|
|
@@ -693,16 +766,19 @@ export default {
|
|
}
|
|
}
|
|
// 根据图表的宽度 x轴的字体大小、长度来估算X轴的label能展示多少个字
|
|
// 根据图表的宽度 x轴的字体大小、长度来估算X轴的label能展示多少个字
|
|
const xAxisDataLength = val.length !== 0 ? val.xAxis.length : 1;
|
|
const xAxisDataLength = val.length !== 0 ? val.xAxis.length : 1;
|
|
- const rowsNum = optionsSetup.textRowsNum !== "" ? optionsSetup.textRowsNum : parseInt((this.optionsStyle.width / xAxisDataLength) / optionsSetup.fontSizeX);
|
|
|
|
|
|
+ const rowsNum = optionsSetup.textRowsNum !== "" ? optionsSetup.textRowsNum : parseInt((this.optionsStyle.width / xAxisDataLength) / optionsSetup.textFontSizeX);
|
|
const axisLabel = {
|
|
const axisLabel = {
|
|
- show: true,
|
|
|
|
- interval: optionsSetup.textInterval,
|
|
|
|
|
|
+ show: optionsSetup.isShowAxisLabelX,
|
|
|
|
+ interval: optionsSetup.textIntervalX,
|
|
// 文字角度
|
|
// 文字角度
|
|
rotate: optionsSetup.textAngleX,
|
|
rotate: optionsSetup.textAngleX,
|
|
textStyle: {
|
|
textStyle: {
|
|
// 坐标文字颜色
|
|
// 坐标文字颜色
|
|
- color: optionsSetup.colorX,
|
|
|
|
- fontSize: optionsSetup.fontSizeX,
|
|
|
|
|
|
+ color: optionsSetup.textColorX,
|
|
|
|
+ fontSize: optionsSetup.textFontSizeX,
|
|
|
|
+ fontWeight: optionsSetup.textFontWeightX,
|
|
|
|
+ fontStyle: optionsSetup.textFontStyleX,
|
|
|
|
+ fontFamily: optionsSetup.textFontFamilyX,
|
|
},
|
|
},
|
|
// 自动换行
|
|
// 自动换行
|
|
formatter: function (value, index) {
|
|
formatter: function (value, index) {
|