Merge pull request #1040 from dima117/master

fix multiTooltip appearance with empty title
This commit is contained in:
Evert Timberg 2015-12-24 21:50:18 -05:00
commit f63debe2c7

View File

@ -1467,7 +1467,8 @@
this.titleFont = fontString(this.titleFontSize,this.titleFontStyle,this.titleFontFamily);
this.height = (this.labels.length * this.fontSize) + ((this.labels.length-1) * (this.fontSize/2)) + (this.yPadding*2) + this.titleFontSize *1.5;
this.titleHeight = this.title ? this.titleFontSize * 1.5 : 0;
this.height = (this.labels.length * this.fontSize) + ((this.labels.length-1) * (this.fontSize/2)) + (this.yPadding*2) + this.titleHeight;
this.ctx.font = this.titleFont;
@ -1503,9 +1504,9 @@
//If the index is zero, we're getting the title
if (index === 0){
return baseLineHeight + this.titleFontSize/2;
return baseLineHeight + this.titleHeight / 3;
} else{
return baseLineHeight + ((this.fontSize*1.5*afterTitleIndex) + this.fontSize/2) + this.titleFontSize * 1.5;
return baseLineHeight + ((this.fontSize * 1.5 * afterTitleIndex) + this.fontSize / 2) + this.titleHeight;
}
},