JSFiddle - React, Tailwind, and code Playground
US chart Start-1
by Karmik Patel
HTML
<!DOCTYPE html>
<html>
<head>
<!---- >
https://developers.google.com/chart/interactive/docs/gallery/geochart#full
<!---->
<script type="text/javascript" src="https://www.gstatic.com/charts/loader.js"></script>
<script type="text/javascript" src="https://www.google.com/jsapi"></script>
<script type="text/javascript">
google.charts.load('current', {'packages':['geochart']});
google.charts.setOnLoadCallback(drawRegionsMap);
function drawRegionsMap() {
var ar = [
['Code', 'Companies'],
['Illinois', 10],
['US-IN', 0],
['US-KS', 0],
['US-KY', 0],
['US-LA', 0],
['US-MA', 0],
['US-MD', 0],
['US-ME', 0],
['US-MI', 0],
['US-MN', 0],
['US-MO', 0],
['US-MS', 0],
['US-MT', 0],
['US-NC', 0],
['US-ND', 0],
['US-NE', 0],
['US-NH', 0],
['US-NJ', 0],
['US-NM', 0],
['US-NV', 0],
['US-NY', 0],
['US-OH', 0],
['US-OK', 0],
['US-OR', 0],
['US-PA', 0],
['US-RI', 0],
['US-SC', 0],
['US-SD', 10],
['US-TN', 5],
['US-TX', 15],
['US-UT', 200],
['US-VA', 0],
['US-VT', 0],
['US-WA', 0],
['US-WI', 0],
['US-WV', 0],
['US-WY', 0],
],
data = google.visualization.arrayToDataTable(ar);
var options = {
region: 'US',
displayMode: 'regions',
resolution: 'provinces', // 'metro'
// legend: 'none',
animation: {
easing: 'inAndOut',
startup: true,
duration: 2500,
},
//these are obtained from google's africa chart example
colorAxis: {colors: ['#00853f', 'black', '#e31b23']},
backgroundColor: '#81d4fa',
...