提交 f5e9232b 编写于 作者: K kener

axis label textStyle支持align、baseline

上级 4f227b57
......@@ -365,8 +365,8 @@ define(function (require) {
color : dataTextStyle.color,
text : this._labelData[i].value || this._labelData[i],
textFont : this.getFont(dataTextStyle),
textAlign : 'center',
textBaseline : baseLine
textAlign : dataTextStyle.align || 'center',
textBaseline : dataTextStyle.baseline || baseLine
}
};
if (rotate) {
......@@ -416,13 +416,14 @@ define(function (require) {
color : dataTextStyle.color,
text : this._labelData[i].value || this._labelData[i],
textFont : this.getFont(dataTextStyle),
textAlign : align,
textBaseline : (i === 0 && this.option.name !== '')
? 'bottom'
: (i == (dataLength - 1)
&& this.option.name !== '')
? 'top'
: 'middle'
textAlign : dataTextStyle.align || align,
textBaseline : dataTextStyle.baseline
|| (i === 0 && this.option.name !== '')
? 'bottom'
: (i == (dataLength - 1)
&& this.option.name !== '')
? 'top'
: 'middle'
}
};
......
......@@ -224,8 +224,8 @@ define(function (require) {
? textStyle.color(data[i]) : textStyle.color,
text : this._valueLabel[i],
textFont : this.getFont(textStyle),
textAlign : 'center',
textBaseline : baseLine
textAlign : textStyle.align || 'center',
textBaseline : textStyle.baseline || baseLine
}
};
if (rotate) {
......@@ -267,13 +267,14 @@ define(function (require) {
? textStyle.color(data[i]) : textStyle.color,
text : this._valueLabel[i],
textFont : this.getFont(textStyle),
textAlign : align,
textBaseline : (i === 0 && this.option.name !== '')
? 'bottom'
: (i == (dataLength - 1)
&& this.option.name !== '')
? 'top'
: 'middle'
textAlign : textStyle.align || align,
textBaseline : textStyle.baseline
|| (i === 0 && this.option.name !== '')
? 'bottom'
: (i == (dataLength - 1)
&& this.option.name !== '')
? 'top'
: 'middle'
}
};
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册