Google charts You called the draw () method with the wrong datatype, not a DataTable or DataView

the code below is used to display a timeline graph and it worked fine but it is no longer the case.

We are currently getting the error "You called draw () with the wrong data type, not a DataTable or DataView", but I see no obvious reason for this.

I checked a similar question that suggested clearing the cache, but that didn't work in my case.

Does anyone have any ideas?

<script type="text/javascript" src="https://www.google.com/jsapi?autoload={'modules':[{'name':'visualization','version':'1','packages':['timeline']}]}">
</script>


<script type="text/javascript">
    google.setOnLoadCallback(drawChartViewOne);

    function drawChartViewOne() {
        var container = document.getElementById('viewExampleOne');   
        var chart = new google.visualization.Timeline(container);
        var dataTable = new google.visualization.DataTable();

        dataTable.addColumn({ type: 'string', id: 'Date' });
        dataTable.addColumn({ type: 'date', id: 'Start' });
        dataTable.addColumn({ type: 'date', id: 'End' });

                dataTable.addRows([

        [ 'Submission Date', new Date('2007-08-02'), new Date('2007-08-03') ],
        [ 'Priority Date',  new Date('2007-08-02'), new Date('2007-09-03') ],
        [ 'Classification Version D.',  new Date('2008-08-02'), new Date('2008-08-03') ],
        [ 'Classification Action D.',  new Date('2008-08-02'), new Date('2008-08-03') ],
        [ 'Production Date',  new Date('2008-07-02'), new Date('2008-08-03') ],
        [ 'Provisional Approval D.',  new Date('2009-08-12'), new Date('2009-09-03') ],
        [ 'Related Publication D.',  new Date('2009-08-12'), new Date('2009-10-03') ],
        [ 'Publication Date',  new Date('2009-08-12'), new Date('2009-08-23') ]

        ]);



        var options = {
            height:400
        };
        chart.draw(dataTable,options);
    }

</script>

      

+3
google-visualization


source to share


No one has answered this question yet

Check out similar questions:

nine
Drawing visual lines in Google charts
3
Add extra data to google chartTable
3
Create Rotary DataView from Existing Charts Google DataTable Object
3
Wrong type of Google Chart () method when using DataTable
2
Is Google drawing the wrong paint?
2
Google Chart, how can I customize the calculated view in the ChartWrapper?
2
Mistake. You called the draw () method with the wrong datatype, not a DataTable or DataView
1
Drawing multiple data tables in Google LineChart charts
1
How to draw Google charts like stacked columns
0
Google charts for all browsers but Internet Explorer



All Articles
Loading...
X
Show
Funny
Dev
Pics