Came a cross this fiddle in the Highcharts API doc: http://jsfiddle.net/gh/get/jquery/1.7.2/highslide-software/highcharts.com/tree/master/samples/highcharts/exporting/buttons-text/
printButton: {
text: 'Print',
onclick: function () {
this.print();
}
}
As you can see from hovering over "print" or "download", the tooltip is undefined.
So, my question, simply, where do I define it?
Best regards :)
If you want to add custom tooltip text for a button, you must add a 'lang' object in the chart's options, and define a key with some text.
Then use that key in the custom button's definition.
var chart = new Highcharts.Chart({
chart: {
// your chart options
},
lang: {
yourKey: "Custom button tooltip text"
},
exporting: {
buttons: {
yourCustomButton: {
text: "Click me",
_titleKey: "yourKey",
onclick: function() {
// button functionality goes here
}
}
}
}
});
See http://jsfiddle.net/7wEEj/
Add directly _titleKey
, see: http://jsfiddle.net/x36qR/1/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With