Skip to content

Commit

Permalink
ver 10723
Browse files Browse the repository at this point in the history
10723 修正小程序K线标题字体间隔计算错误
  • Loading branch information
jones2000 committed Feb 28, 2022
1 parent 4fb6929 commit f50b801
Showing 1 changed file with 18 additions and 5 deletions.
23 changes: 18 additions & 5 deletions wechathqchart/umychart.charttitle.wechat.js
Original file line number Diff line number Diff line change
Expand Up @@ -207,9 +207,15 @@ function DynamicKLineTitlePainting()
return;
}

if (this.TextSpace>=0) this.SpaceWidth=this.TextSpace;
else this.SpaceWidth = this.Canvas.measureText(' ').width;

if (this.TextSpace>=0)
{
this.SpaceWidth=this.TextSpace;
}
else
{
this.Canvas.font = this.Font;
this.SpaceWidth = this.Canvas.measureText(' ').width;
}
var index = this.CursorIndex;
index = parseInt(index.toFixed(0));
var dataIndex = this.Data.DataOffset + index;
Expand Down Expand Up @@ -938,8 +944,15 @@ function DynamicMinuteTitlePainting()
return;
}

if (this.TextSpace>=0) this.SpaceWidth=this.TextSpace;
else this.SpaceWidth = this.Canvas.measureText(' ').width;
if (this.TextSpace>=0)
{
this.SpaceWidth=this.TextSpace;
}
else
{
this.Canvas.font = this.Font;
this.SpaceWidth = this.Canvas.measureText(' ').width;
}

var index = this.CursorIndex;
index = parseInt(index.toFixed(0));
Expand Down

0 comments on commit f50b801

Please sign in to comment.