Table title not showing up

Skip to first unread message

Millie Allen

Jun 21, 2021, 3:53:03 PMJun 21
to Google Visualization API

Hello, I am trying to create a table but I am using a title and it is not appearing above the table, am I missing something?
Here is my current code:

<script type="text/javascript" src=""></script>
<script type="text/javascript">
    google.charts.load('current', {'packages':['table']});

    function drawTable() {
    var data = new google.visualization.DataTable();
    data.addColumn('string', 'Term');
    data.addColumn('number', 'Frequency');
        ['Car', 5],
        ['Bike', 3]

    var options = {
        "title":"Most Popular Vehicles",
        showRowNumber: true

    var table = new google.visualization.Table(document.getElementById('graph'));

    table.draw(data, {"title":"Most Popular Vehicles", width:"100%", height:"100%", showRowNumber: true});

<div id = "graph"> 

As you can see, I have tried both
table.draw(data, {"title":"Most Popular Vehicles", width:"100%", height:"100%", showRowNumber: true});
and table.draw(data, options);
And neither are working.

Any help is appreciated, thanks
Reply all
Reply to author
0 new messages