JS Google Chart
Google Charts uses its own loader and chart classes. Keep a text data alternative and review the external service requirements.
Where to run this
Use a local browser project for this example. It needs browser permissions, additional files, a server endpoint, or a library as described below. The restricted playground cannot provide those dependencies.
A practical example
// HTML: <div id="chart"></div>
// Load https://www.gstatic.com/charts/loader.js in your local page.
google.charts.load("current", {packages: ["corechart"]});
google.charts.setOnLoadCallback(() => {
const data = google.visualization.arrayToDataTable([["Session", "Bookings"], ["Repair", 8], ["Wood", 5]]);
new google.visualization.ColumnChart(document.getElementById("chart")).draw(data, {});
});
What happens
A network-enabled local page draws the chart after the external library loads.