开发者

Google Visualization API (Charts) tooltips not working in Firefox

A google.visualization.BarChart will not show tooltips for me in Firefox, but shows th开发者_JS百科em in Chrome.

I am using Firefox 4.0.1 on Linux.


This might be related to issue 598 "Google Chart Tools: tooltip/line not shown on firefox using base tag" at google-visualization-api-issues which is reproduced when a base tag differs from a page location.

A possible solution could be to use jQuery to change the href attr of the tag.

jQuery("base").attr('href', document.location);
chart.draw(data, options);


I think that it will be better to add base-tag in frame-drawing, like that

chart.draw(data, options);

     jQuery(document).ready
     (
      function()
      {
       jQuery('iframe[name^=Drawing_Frame]').contents().find('head').append('<base href="'+document.location+'"></base>')
      }
     );

It works for me

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜