The following code works:
tooltipOpts: {
content: "%s : %y",
shifts: {
x: -30,
y: -50
}
}
I am trying to show some dynamically calculated data in the "content", so I am trying to use a function. Even my simplest example does not work, I get the error shown below:
tooltipOpts: {
content: function() {
return "%s : %y";
},
shifts: {
x: -30,
y: -50
}
}
Uncaught TypeError: Object function () {
return "%s : %y";
} has no method 'replace'
Chris source
share