function showChart(){
let config = {
title: "Sample 04",
width: "800",
height: "600",
thousandsSeparator: ".",
decimalSeparator: ",",
transitionTime: 4,
logarithmicXaxis: true,
measures: [{ title: "Revenue", prefix: "$" }],
data: [
{ item: "Company A", period: "2020", val: 1000000000 },
{ item: "Company B", period: "2020", val: 450000 },
{ item: "Company C", period: "2020", val: 650000000000 },
{ item: "Company A", period: "2021", val: 1300000000 },
{ item: "Company B", period: "2021", val: 80000 },
{ item: "Company C", period: "2021", val: 9500000000000 },
{ item: "Company A", period: "2022", val: 1550000000 },
{ item: "Company B", period: "2022", val: 800000 },
{ item: "Company C", period: "2022", val: 15000000000000 },
{ item: "Company A", period: "2023", val: 2230000000 },
{ item: "Company B", period: "2023", val: 1300000 },
{ item: "Company C", period: "2023", val: 28000000000000 },
]
}
kyubitTimeCharts.showBarChart("chartDiv", config);
}
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>Sample 04</title>
<script type="text/javascript" src="KyubitTimeCharts.js"></script>
<script type="text/javascript">
document.addEventListener("DOMContentLoaded", function (event) {
showChart();
});
function showChart() {
let config = {
title: "Sample 04",
width: "800",
height: "600",
thousandsSeparator: ".",
decimalSeparator: ",",
transitionTime: 4,
logarithmicXaxis: true,
measures: [{ title: "Revenue", prefix: "$" }],
data: [
{ item: "Company A", period: "2020", val: 1000000000 },
{ item: "Company B", period: "2020", val: 450000 },
{ item: "Company C", period: "2020", val: 650000000000 },
{ item: "Company A", period: "2021", val: 1300000000 },
{ item: "Company B", period: "2021", val: 80000 },
{ item: "Company C", period: "2021", val: 9500000000000 },
{ item: "Company A", period: "2022", val: 1550000000 },
{ item: "Company B", period: "2022", val: 800000 },
{ item: "Company C", period: "2022", val: 15000000000000 },
{ item: "Company A", period: "2023", val: 2230000000 },
{ item: "Company B", period: "2023", val: 1300000 },
{ item: "Company C", period: "2023", val: 28000000000000 },
]
}
kyubitTimeCharts.showBarChart("chartDiv", config);
}
</script>
</head>
<body>
<div id="chartDiv"></div>
</body>
</html>