HTML/JavaScript Code
The HTML elements and JavaScript code used in this example.
...
<div id="chartDiv"></div>
...
function showChart() {
let config = {
title: "NASDAQ, Maket Cap, Top 15 Companies Historical 2021 - 2023",
width: "800",
height: "600",
darkMode: true,
numberOfDecimals: 2,
thousandsSeparator: ".",
decimalSeparator: ",",
transitionTime: 4,
maxItemsPerTransition: 15,
measures: [{ title: "Market Cap", prefix: "$" }],
dataCSVURL: "/charts/examples/NASDAQ-historical-market-cap.csv",
}
config.width = document.getElementById("chartDiv").clientWidth;
config.height = document.getElementById("chartDiv").clientWidth * 0.6;
kyubitTimeCharts.showBarChart("chartDiv", config);
}
Learn more about
Animated Bar Chart API.