Don't have tooltips and events in candlestick

32 views
Skip to first unread message

Mandete

unread,
Oct 6, 2011, 3:52:28 AM10/6/11
to google-visua...@googlegroups.com
I've a candlestick graphic and it works perfectly in chrome, but in forefox it hasn't tooltips when i put the mouse over the candle. In fact, i've no events in firefox, i cant use ready event or onmouseover event from google.visualization. What's happend?

asgallant

unread,
Oct 6, 2011, 11:30:47 AM10/6/11
to google-visua...@googlegroups.com
Can you post a link to your page or post your code?

Mandete

unread,
Oct 7, 2011, 10:21:03 AM10/7/11
to google-visua...@googlegroups.com
I try this simple and static example and it works succefully in firefox putting all in a php/html file directy, but when i do the same in joomla component (putting the js in the view.html.php file and the html code in default.php, or also both in the default.php, the same example doesn't have tooltips. And in more complex examples happens the same thing...

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
   <head>
     <script type="text/javascript" src="https://www.google.com/jsapi"></script>
     <script type="text/javascript">
       google.load('visualization', '1', {packages: ['corechart']});
     </script>
     <script type="text/javascript">
       function drawVisualization() {
         // Some raw data (not necessarily accurate)
         var data = google.visualization.arrayToDataTable([
           ['Month', 'Bolivia', 'Ecuador', 'Madagascar', 'Papua  Guinea','Rwanda', 'Average'],
           ['2004/05', 165, 938, 522, 998, 450, 614.6],
           ['2005/06', 135, 1120, 599, 1268, 288, 682],
           ['2006/07', 157, 1167, 587, 807, 397, 623],
           ['2007/08', 139, 1110, 615, 968, 215, 609.4],
           ['2008/09', 136, 691, 629, 1026, 366, 569.6]*/
         ]);
         // Create and draw the visualization.
         var comboChart = new google.visualization.ComboChart(document.getElementById('chart_div'));
         comboChart.draw(data, {
           title : 'Prueba',
           seriesType: "bars",
           series: {2: {type: "line"}}
         });
         
         var candleChart = new google.visualization.CandlestickChart(document.getElementById('chart_div2'));
         candleChart.draw(data);
       }
       google.setOnLoadCallback(drawVisualization);
     </script>
   </head>
   <body style="font-family: Arial;border: 0 none;">
     <div id="chart_div" style="width: 700px; height: 400px;"></div>
     <div id="chart_div2" style="width: 700px; height: 400px;"></div>
   </body>
 </html>

Mandete

unread,
Oct 7, 2011, 10:22:02 AM10/7/11
to google-visua...@googlegroups.com
Its a modified code for show here, in really values are ok for the candlestick...

asgallant

unread,
Oct 7, 2011, 10:45:30 AM10/7/11
to google-visua...@googlegroups.com
Ahh, you might want to ask a joomla expert about this.  If your code runs fine outside the confines of your CMS, then there isn't much we can help you with.  If you have a live page you can post a link to, I'll take a look at it and see if I can figure out why it isn't working right.
Reply all
Reply to author
Forward
0 new messages