提交 fade8771 编写于 作者: K kener

数值精度格式修复

fixed this http://www.oschina.net/question/1431801_143036
上级 9ca07018
......@@ -325,18 +325,14 @@ define(function (require) {
var textHeight = zrArea.getTextHeight('', font);
var textWidth = Math.max(
zrArea.getTextWidth(
dataRangeOption.precision === 0
? dataRangeOption.max
: dataRangeOption.max.toFixed(
dataRangeOption.max.toFixed(
dataRangeOption.precision
),
),
font),
zrArea.getTextWidth(
dataRangeOption.precision === 0
? dataRangeOption.min
: dataRangeOption.min.toFixed(
dataRangeOption.min.toFixed(
dataRangeOption.precision
),
),
font
)
) + 2;
......@@ -461,7 +457,9 @@ define(function (require) {
zlevel : _zlevelBase + 1,
style : {
pointList : pointListStart,
text : dataRangeOption.max + '',
text : dataRangeOption.max.toFixed(
dataRangeOption.precision
),
textX : textXStart,
textY : textYStart,
textPosition : 'specific',
......@@ -486,7 +484,9 @@ define(function (require) {
zlevel : _zlevelBase + 1,
style : {
pointList : pointListEnd,
text : dataRangeOption.min + '',
text : dataRangeOption.min.toFixed(
dataRangeOption.precision
),
textX : textXEnd,
textY : textYEnd,
textPosition : 'specific',
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册