Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

geochart: Adding html annotation to it or other any other alternative charts

I am trying to Add a text overlay on the geochart. I could add the text only in the tooltip but its visible only when mouse hover/selection. But I wanted it to be always visible.

Below is the fiddle link. When I try to add annotation geochart is giving an error.

http://jsfiddle.net/aSrVH/ Car data = new google. visualization. DataTable ();

Data. addColumn ('string', 'Country');
data.addColumn('number', 'Value');
data.addColumn({
    type: 'string',
    role: 'tooltip'
});

I couldn't change above to:

   data.addColumn({
        type: 'string',
        role: 'annotation'
    });

Please let me know if this is possible in geochart or suggest me any alternative.

follow up question: 1. If text is possible can I add animation to it?( like fadein/out)

like image 840
neoahead Avatar asked Jan 19 '26 05:01

neoahead


1 Answers

You can use a fixed text with the option displayMode: 'text' and when hovered shows your customized box.

See example from developers.google.com/chart/ by clicking here.

like image 128
Developer Ph2 Avatar answered Jan 21 '26 18:01

Developer Ph2



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!