How to insert title to a Table Charts from the google Chart API

Asked

Viewed 316 times

2

In the Google Chart documentation there is the possibility to insert titles for a specific chart. But for Table Chart it does not work. Would anyone have an idea of how to pass to the component the display information of the title?

Below is an example for graphics:

 var options = {'title':'How Much Pizza I Ate Last Night',
                     'width':400,
                     'height':300};

      // Instantiate and draw our chart, passing in some options.
      var chart = new google.visualization.PieChart(document.getElementById('chart_div'));
      chart.draw(data, options);

It seems to me that Table Visualization does not support title!! It would have some form to include without being direct in html?

1 answer

1


In accordance with the Documentation, does not have this option for tables. What you can do is put the title above the div table:

   <h3>How Much Pizza I Ate Last Night</h3>
   <div id="table_div"></div>

Jsfiddle

In that link have other examples of customizing tables, using CSS.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.