Reputation:
I am using highcharts and I've added exporting.js so I can export data.
This makes a menu appear which has a title of "Chart context menu".
See image attached:
You can also see it here:
$(function () {
Highcharts.chart('container', {
chart: {
type: 'column'
},
title: {
text: 'Total fruit consumtion, grouped by gender'
},
xAxis: {
categories: ['Apples', 'Oranges', 'Pears', 'Grapes', 'Bananas']
},
yAxis: {
allowDecimals: false,
min: 0,
title: {
text: 'Number of fruits'
}
},
tooltip: {
formatter: function () {
return '<b>' + this.x + '</b><br/>' +
this.series.name + ': ' + this.y + '<br/>' +
'Total: ' + this.point.stackTotal;
}
},
plotOptions: {
column: {
stacking: 'normal'
}
},
series: [{
name: 'John',
data: [5, 3, 4, 7, 2],
stack: 'male'
}, {
name: 'Joe',
data: [3, 4, 4, 2, 5],
stack: 'male'
}, {
name: 'Jane',
data: [2, 5, 6, 2, 1],
stack: 'female'
}, {
name: 'Janet',
data: [3, 0, 4, 4, 3],
stack: 'female'
}]
});
});
My question is..How can I change the title text so it says something else?
Upvotes: 3
Views: 1661
Reputation: 12472
Actually, there is an option to change the title via API but you need to set it in the global options - lang.contextMenuTitle
Highcharts.setOptions({
lang: {
contextButtonTitle: 'custom text'
}
});
example: http://jsfiddle.net/1zmwjskz/
Upvotes: 5
Reputation: 1087
According to the documentation there is currently no option to do that - details of the available options are listed here. But you can always use jQuery:
$(document).ready(function(){
$("g.highcharts-contextbutton > title").text("Something else");
});
Working fiddle.
Upvotes: 1