Merge pull request #1402 from hrniels/tooltip

Added tooltipTitleTemplate option.
This commit is contained in:
Tanner Linsley 2015-08-28 16:28:11 -06:00
commit 1ae2884a04
2 changed files with 7 additions and 1 deletions

View File

@ -177,6 +177,9 @@ Chart.defaults.global = {
// String - Tooltip title font colour
tooltipTitleFontColor: "#fff",
// String - Tooltip title template
tooltipTitleTemplate: "<%= label%>",
// Number - pixel width of padding around tooltip text
tooltipYPadding: 6,

View File

@ -150,6 +150,9 @@
// String - Tooltip title font colour
tooltipTitleFontColor: "#fff",
// String - Tooltip title template
tooltipTitleTemplate: "<%= label%>",
// Number - pixel width of padding around tooltip text
tooltipYPadding: 6,
@ -1097,7 +1100,7 @@
labels: tooltipLabels,
legendColors: tooltipColors,
legendColorBackground : this.options.multiTooltipKeyBackground,
title: ChartElements[0].label,
title: template(this.options.tooltipTitleTemplate,ChartElements[0]),
chart: this.chart,
ctx: this.chart.ctx,
custom: this.options.customTooltips