Added tooltipTitleTemplate option.

This commit is contained in:
Nils Asmussen 2015-08-22 13:47:01 +02:00
parent ac360b8dd1
commit a14309d95f
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