Hi,
I am using Motion Chart and for most browsers works just fine. I'm
having trouble when I try to use IE 9.

I'm loading my points from a CSV file. In Mozilla, Safari, Chrome
everything works, but when I try it in IE nothing... any ideas?

Thank you for your help.

-Cristian
------------------------------------------------------------------------------
THE BASICS OF MY CODE
-----------------------------------------------------------------------------
I CHECK FOR BROWSER, LOAD THE FILE, THEN I PARCED THE FILE, build an
ARRAY and then .DRAW IT
--------------

if (window.XMLHttpRequest)
     {
        // code for IE7+, Firefox, Chrome, Opera, Safari
        txtFile=new XMLHttpRequest();
     }
    else
    {   // code for IE6, IE5
        txtFile=new ActiveXObject("Microsoft.XMLHTTP");
    }
    txtFile.open("GET", "SomeFile.csv", true);
        txtFile.onreadystatechange = function()
        {
                if (txtFile.readyState == 4 && txtFile.status == 200)
                {  // Makes sure it's found the file.
                                allText = txtFile.responseText;
                                allTextLines = allText.split(/\r\n|\n|,|\r/);
                }
        }

        txtFile.send(null);
      google.load('visualization', '1', {'packages':['motionchart']});
      google.setOnLoadCallback(drawChart);

      function drawChart() {

        var data = new google.visualization.DataTable();
        data.addColumn('string', 'Indicator');
        data.addColumn('date', 'Date');
        data.addColumn('number', 'Value');

                var totalNumberOfLines = allTextLines.length;

                for (var i =0 ; i< totalNumberOfLines ; i=i+3)
                        {
                        data.addRows([[allTextLines[i].toString(),new Date 
(allTextLines[i
+1]),parseFloat(allTextLines[i+2])]]);
                        //document.write ("i = "+ i+ " " +allTextLines[i] +" "+ 
new Date
(allTextLines[i+1]) +" "+ allTextLines[i+2]+"<br /> ")
                        }


        var chart = new
google.visualization.MotionChart(document.getElementById('chart_div'));
        var options = {};

                options['width'] = 600;
                options['height'] = 300;
                chart.draw(data, options);

-- 
You received this message because you are subscribed to the Google Groups 
"Google Visualization API" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-visualization-api?hl=en.

Reply via email to