GWT - Adding a button to HighCharts

388 Views Asked by At

Quick question.

Is it possible to add a simple button somewhere on the graph (preferably to the bottom of the legend) I can always just create a simple GWT button, and either overlay it or place it to the side, but I was wondering if it was possible to do this somehow in HighCharts.

Thank you.

2

There are 2 best solutions below

0
On

I'm not sure how to to this in GWT wrapper, but in Highcharts, you can create buttons using renderer, see in source code:

/**
 * Create a button with preset states
 * @param {String} text
 * @param {Number} x
 * @param {Number} y
 * @param {Function} callback
 * @param {Object} normalState
 * @param {Object} hoverState
 * @param {Object} pressedState
 */
button: function(...) { }
0
On

I cannot find the exact api for it. However the Highchart Demo shows a menu dropdown on top right corner of a Chart. You would need to investigate in their source code for the same and try out your solution.

enter image description here