Possible Duplicate:
How to change tooltip text for google chart api?
I am using Google Charts to create a line chart: http://code.google.com/apis/chart/interactive/docs/gallery/linechart.html
I would like to control the text displayed when the user clicks or hovers over a datapoint. Currently the hover only shows the dataset name and value (same a Y-axis). I would like to display additional meta-data. Is this possible? Does someone have an example?
Layout > Labels > Data Labels > More Data Label Options. You can now apply specific label type to selected point only. points you want labeled?
In Chart Properties, click Hover Text Settings. Enter the desired text in the Text field. You can insert macros here by clicking the "+" button and selecting the desired macro. For more information about macros, see Hover text macros.
You could use "tooltip" in the dataTable roles:
data.addColumn('number', 'Abscisses');
data.addColumn('number', 'Warior');
data.addColumn({type:'number', role:'tooltip'});
data.addColumn({type:'string', role:'tooltip'});
data.addRow([2,3,4,'a']);
data.addRow([3,4,2,'b']);
Refers to:DataTable roles
Yes you do this by using the following code -
<code>
data.setFormattedValue(<your custom hover lable>);
</code>
Refer here:
http://code.google.com/apis/chart/interactive/docs/reference.html#DataTable_setFormattedValue
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