Do you know how can I extend this to a Sankey diagram? I did change the 
element name to my sankey div; but it does not seem to work for that.

On Thursday, 7 August 2014 02:22:34 UTC-7, Ishwar wrote:
>
> Thanks a lot @Andrew, it worked like a charm
>
> var chart = new 
> google.visualization.ScatterChart(document.getElementById('chart_div'));
>
> google.visualization.events.addOneTimeListener(chart, 'ready', function () 
> {
>     var container = document.querySelector('#chart_div > div:last-child');
>     function setPosition () {
>         var tooltip = 
> container.querySelector('.google-visualization-tooltip');
>         tooltip.style.top = parseFloat(tooltip.style.top) + 15;
>         tooltip.style.left = parseFloat(tooltip.style.left) - 15;
>     }
>     if (typeof MutationObserver === 'function') {
>         var observer = new MutationObserver(function (m) {
>             for (var i = 0; i < m.length; i++) {
>                 if (m[i].addedNodes.length) {
>                     setPosition();
>                     break; // once we find the added node, we shouldn't 
> need to look any further
>                 }
>             }
>         });
>         observer.observe(container, {
>             childList: true
>         });
>     }
>     else if (document.addEventListener) {
>         container.addEventListener('DOMNodeInserted', setPosition);
>     }
>     else {
>         container.attachEvent('onDOMNodeInserted', setPosition);
>     }
> });
> chart.draw(data, options);
> ----------------------------------------------------
>
> On Wednesday, August 6, 2014 5:04:40 PM UTC+5:30, Ishwar wrote:
>>
>> I am implementing html tooltip in scatter chart. Is there any way to 
>> define tooltip position in scatter chart, i.e. near to cursor ?
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google Visualization API" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/google-visualization-api.
For more options, visit https://groups.google.com/d/optout.

Reply via email to