function showChart() {
let config = {
title: "Sample 08",
width: "800",
height: "600",
darkMode: true,
thousandsSeparator: ".",
decimalSeparator: ",",
transitionTime: 4,
measures: [
{ title: "Revenue", prefix: "$" },
{ title: "Profit", prefix: "$" },
{ title: "Avg. num of employees", decimalPlaces: 1 }
],
showNegativeY: true,
data: [
{ item: "Company A", period: "2020", val: 1000000, val2: 100000, val3: 8.341 },
{ item: "Company B", period: "2020", val: 450000, val2: 80000, val3: 6.431 },
{ item: "Company C", period: "2020", val: 650000, val2: 200000, val3: 14.123 },
{ item: "Company A", period: "2021", val: 1300000, val2: 134000, val3: 19.65 },
{ item: "Company B", period: "2021", val: 80000, val2: -30000, val3: 14.23 },
{ item: "Company C", period: "2021", val: 950000, val2: 250000, val3: 76.123 },
{ item: "Company A", period: "2022", val: 1550000, val2: 195000, val3: 56.567 },
{ item: "Company B", period: "2022", val: 800000, val2: -50000, val3: 4.1 },
{ item: "Company C", period: "2022", val: 1500000, val2: 300000, val3: 220.23 },
{ item: "Company A", period: "2023", val: 2230000, val2: 220000, val3: 90.47 },
{ item: "Company B", period: "2023", val: 1300000, val2: 20000, val3: 5.98 },
{ item: "Company C", period: "2023", val: 2800000, val2: 280000, val3: 385.76 },
]
}
kyubitTimeCharts.showBubbleChart("chartDiv", config);
}
Item;Group;Period;Measure;Measure;Measure
Company A;US;2020;1000000;100000;8
Company B;Europe;2020;450000;80000;6
Company C;US;2020;650000;200000;14
Company D;Europe;2020;650000;50000;10
Company A;US;2021;1300000;134000;19
Company B;Europe;2021;80000;180000;14
Company C;US;2021;950000;250000;76
Company D;Europe;2021;105000;80000;15
Company A;US;2022;1550000;195000;56
Company B;Europe;2022;800000;110000;4
Company C;US;2022;1500000;300000;220
Company D;Europe;2022;850000;90000;10
Company A;US;2023;2230000;220000;90
Company B;Europe;2023;1300000;125000;5
Company C;US;2023;2800000;280000;385
Company D;Europe;2023;950000;60000;60
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>Sample 08</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 08",
width: "800",
height: "600",
darkMode: true,
thousandsSeparator: ".",
decimalSeparator: ",",
transitionTime: 4,
measures: [
{ title: "Revenue", prefix: "$" },
{ title: "Profit", prefix: "$" },
{ title: "Avg. num of employees", decimalPlaces: 1 }
],
showNegativeY: true,
data: [
{ item: "Company A", period: "2020", val: 1000000, val2: 100000, val3: 8.341 },
{ item: "Company B", period: "2020", val: 450000, val2: 80000, val3: 6.431 },
{ item: "Company C", period: "2020", val: 650000, val2: 200000, val3: 14.123 },
{ item: "Company A", period: "2021", val: 1300000, val2: 134000, val3: 19.65 },
{ item: "Company B", period: "2021", val: 80000, val2: -30000, val3: 14.23 },
{ item: "Company C", period: "2021", val: 950000, val2: 250000, val3: 76.123 },
{ item: "Company A", period: "2022", val: 1550000, val2: 195000, val3: 56.567 },
{ item: "Company B", period: "2022", val: 800000, val2: -50000, val3: 4.1 },
{ item: "Company C", period: "2022", val: 1500000, val2: 300000, val3: 220.23 },
{ item: "Company A", period: "2023", val: 2230000, val2: 220000, val3: 90.47 },
{ item: "Company B", period: "2023", val: 1300000, val2: 20000, val3: 5.98 },
{ item: "Company C", period: "2023", val: 2800000, val2: 280000, val3: 385.76 },
]
}
kyubitTimeCharts.showBubbleChart("chartDiv", config);
}
</script>
</head>
<body>
<div id="chartDiv"></div>
</body>
</html>