mirror of
https://github.com/chartjs/Chart.js.git
synced 2025-12-08 20:36:08 +00:00
Merge pull request #1402 from hrniels/tooltip
Added tooltipTitleTemplate option.
This commit is contained in:
commit
1ae2884a04
@ -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,
|
||||
|
||||
|
||||
@ -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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user