mirror of
https://github.com/chartjs/Chart.js.git
synced 2026-03-10 02:06:49 +01:00
Default multiTooltipTemplate now shows the dataset label + updated built files. Fixes #612
This commit is contained in:
8
Chart.js
vendored
8
Chart.js
vendored
@@ -168,7 +168,7 @@
|
||||
tooltipTemplate: "<%if (label){%><%=label%>: <%}%><%= value %>",
|
||||
|
||||
// String - Template string for single tooltips
|
||||
multiTooltipTemplate: "<%= value %>",
|
||||
multiTooltipTemplate: "<%= datasetLabel %>: <%= value %>",
|
||||
|
||||
// String - Colour behind the legend colour block
|
||||
multiTooltipKeyBackground: '#fff',
|
||||
@@ -839,13 +839,13 @@
|
||||
var container = domNode.parentNode,
|
||||
padding = parseInt(getStyle(container, 'padding-left')) + parseInt(getStyle(container, 'padding-right'));
|
||||
// TODO = check cross browser stuff with this.
|
||||
return container.clientWidth - padding;
|
||||
return container ? container.clientWidth - padding : 0;
|
||||
},
|
||||
getMaximumHeight = helpers.getMaximumHeight = function(domNode){
|
||||
var container = domNode.parentNode,
|
||||
padding = parseInt(getStyle(container, 'padding-bottom')) + parseInt(getStyle(container, 'padding-top'));
|
||||
// TODO = check cross browser stuff with this.
|
||||
return container.clientHeight - padding;
|
||||
return container ? container.clientHeight - padding : 0;
|
||||
},
|
||||
getStyle = helpers.getStyle = function (el, property) {
|
||||
return el.currentStyle ?
|
||||
@@ -2233,7 +2233,7 @@
|
||||
|
||||
|
||||
if (amd) {
|
||||
define(function(){
|
||||
define('Chart', [], function(){
|
||||
return Chart;
|
||||
});
|
||||
} else if (typeof module === 'object' && module.exports) {
|
||||
|
||||
2
Chart.min.js
vendored
2
Chart.min.js
vendored
File diff suppressed because one or more lines are too long
@@ -168,7 +168,7 @@
|
||||
tooltipTemplate: "<%if (label){%><%=label%>: <%}%><%= value %>",
|
||||
|
||||
// String - Template string for single tooltips
|
||||
multiTooltipTemplate: "<%= value %>",
|
||||
multiTooltipTemplate: "<%= datasetLabel %>: <%= value %>",
|
||||
|
||||
// String - Colour behind the legend colour block
|
||||
multiTooltipKeyBackground: '#fff',
|
||||
|
||||
Reference in New Issue
Block a user