提交 fb844fc3 编写于 作者: HQChart's avatar HQChart

ver 7205

7205 DrawInsideHorizontal() 修正Y轴右边刻度和最低价重合
7204 小程序 DrawInsideHorizontal() 修正右边坐标轴刻度和最低价重合
上级 acaad577
......@@ -6717,8 +6717,8 @@ function AverageWidthFrame()
if (y >= bottom - 2) this.Canvas.textBaseline = 'bottom';
else if (y <= top + 2) this.Canvas.textBaseline = 'top';
else this.Canvas.textBaseline = "middle";
var textObj={ X:right, Y:y, Text:{ BaseLine:this.Canvas.textBaseline, TextAlign: this.Canvas.textAlign, Font:this.Canvas.font, Value:item.Message[1]}} ;
var textWidth = this.Canvas.measureText(item.Message[1]).width;
var textObj={ X:right-textWidth, Y:y, Text:{ BaseLine:this.Canvas.textBaseline, TextAlign: this.Canvas.textAlign, Font:this.Canvas.font, Value:item.Message[1]}} ;
if (!this.IsOverlayMaxMin || !this.IsOverlayMaxMin(textObj))
this.Canvas.fillText(item.Message[1], right - 1*pixelTatio, y);
}
......@@ -3399,8 +3399,8 @@ function AverageWidthFrame()
if (y >= bottom - 2) this.Canvas.textBaseline = 'bottom';
else if (y <= top + 2) this.Canvas.textBaseline = 'top';
else this.Canvas.textBaseline = "middle";
var textObj={ X:right, Y:y, Text:{ BaseLine:this.Canvas.textBaseline, TextAlign: this.Canvas.textAlign, Font:this.Canvas.font, Value:item.Message[1]}} ;
var textWidth = this.Canvas.measureText(item.Message[1]).width;
var textObj={ X:right-textWidth, Y:y, Text:{ BaseLine:this.Canvas.textBaseline, TextAlign: this.Canvas.textAlign, Font:this.Canvas.font, Value:item.Message[1]}} ;
if (!this.IsOverlayMaxMin || !this.IsOverlayMaxMin(textObj))
this.Canvas.fillText(item.Message[1], right - 1*pixelTatio, y);
}
......@@ -6758,8 +6758,8 @@ function AverageWidthFrame()
if (y >= bottom - 2) this.Canvas.textBaseline = 'bottom';
else if (y <= top + 2) this.Canvas.textBaseline = 'top';
else this.Canvas.textBaseline = "middle";
var textObj={ X:right, Y:y, Text:{ BaseLine:this.Canvas.textBaseline, TextAlign: this.Canvas.textAlign, Font:this.Canvas.font, Value:item.Message[1]}} ;
var textWidth = this.Canvas.measureText(item.Message[1]).width;
var textObj={ X:right-textWidth, Y:y, Text:{ BaseLine:this.Canvas.textBaseline, TextAlign: this.Canvas.textAlign, Font:this.Canvas.font, Value:item.Message[1]}} ;
if (!this.IsOverlayMaxMin || !this.IsOverlayMaxMin(textObj))
this.Canvas.fillText(item.Message[1], right - 1*pixelTatio, y);
}
......@@ -3399,8 +3399,8 @@ function AverageWidthFrame()
if (y >= bottom - 2) this.Canvas.textBaseline = 'bottom';
else if (y <= top + 2) this.Canvas.textBaseline = 'top';
else this.Canvas.textBaseline = "middle";
var textObj={ X:right, Y:y, Text:{ BaseLine:this.Canvas.textBaseline, TextAlign: this.Canvas.textAlign, Font:this.Canvas.font, Value:item.Message[1]}} ;
var textWidth = this.Canvas.measureText(item.Message[1]).width;
var textObj={ X:right-textWidth, Y:y, Text:{ BaseLine:this.Canvas.textBaseline, TextAlign: this.Canvas.textAlign, Font:this.Canvas.font, Value:item.Message[1]}} ;
if (!this.IsOverlayMaxMin || !this.IsOverlayMaxMin(textObj))
this.Canvas.fillText(item.Message[1], right - 1*pixelTatio, y);
}
......@@ -3399,8 +3399,8 @@ function AverageWidthFrame()
if (y >= bottom - 2) this.Canvas.textBaseline = 'bottom';
else if (y <= top + 2) this.Canvas.textBaseline = 'top';
else this.Canvas.textBaseline = "middle";
var textObj={ X:right, Y:y, Text:{ BaseLine:this.Canvas.textBaseline, TextAlign: this.Canvas.textAlign, Font:this.Canvas.font, Value:item.Message[1]}} ;
var textWidth = this.Canvas.measureText(item.Message[1]).width;
var textObj={ X:right-textWidth, Y:y, Text:{ BaseLine:this.Canvas.textBaseline, TextAlign: this.Canvas.textAlign, Font:this.Canvas.font, Value:item.Message[1]}} ;
if (!this.IsOverlayMaxMin || !this.IsOverlayMaxMin(textObj))
this.Canvas.fillText(item.Message[1], right - 1*pixelTatio, y);
}
......@@ -2116,15 +2116,16 @@ function AverageWidthFrame()
if (!this.IsOverlayMaxMin || !this.IsOverlayMaxMin(textObj)) this.Canvas.fillText(item.Message[0], left + 1, y);
}
if (item.Message[1] != null && borderRight < 10 && this.IsShowYText[1] === true) {
if (item.Message[1] != null && borderRight < 10 && this.IsShowYText[1] === true)
{
if (item.Font != null) this.Canvas.font = item.Font;
this.Canvas.fillStyle = item.TextColor;
this.Canvas.textAlign = "right";
if (y >= bottom - 2) this.Canvas.textBaseline = 'bottom';
else if (y <= top + 2) this.Canvas.textBaseline = 'top';
else this.Canvas.textBaseline = "middle";
var textObj = { X: right, Y: y, Text: { BaseLine: this.Canvas.textBaseline, TextAlign: this.Canvas.textAlign, Font: this.Canvas.font, Value: item.Message[1] } };
var textWidth = this.Canvas.measureText(item.Message[1]).width;
var textObj = { X: right - textWidth, Y: y, Text: { BaseLine: this.Canvas.textBaseline, TextAlign: this.Canvas.textAlign, Font: this.Canvas.font, Value: item.Message[1] } };
if (!this.IsOverlayMaxMin || !this.IsOverlayMaxMin(textObj))
this.Canvas.fillText(item.Message[1], right - 1, y);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册