JSFiddle - React, Tailwind, and code Playground
HTML
<script src="http://www.google.com/jsapi?dummy=.js"></script>
<div id="chart_div"></div>
JavaScript
google.load('visualization', '1.1', {
'packages': ['corechart']
});
google.setOnLoadCallback(drawStuff);
function drawStuff() {
var data = new google.visualization.arrayToDataTable([
['Galaxy', 'V1', {label: 'T1', role: 'tooltip'}, 'V2', {label: 'T2', role: 'tooltip'}],
['Canis Major Dwarf', 8000, '23.3', 8000, '23.3'],
['Sagittarius Dwarf', 24000, '4.5', 24000, '4.5'],
['Ursa Major II Dwarf', 30000, '14.3', 30000, '14.3'],
['Lg. Magellanic Cloud', 50000, '0.9', 50000, '0.9'],
['Bootes I', 60000, '13.1', 60000, '13.1']
]);
var options = {
width: 900,
chart: {
title: 'Tooltip Demo',
subtitle: 'every data column having a tooltip of its own'
}
};
// Instantiate and draw our chart, passing in some options.
var chart = new google.visualization.ColumnChart(document.getElementById('chart_div'));
chart.draw(data, options);
};