am5.ready(function() {
	var div_array = [...document.querySelectorAll(".jad-micro-usage-chart")];
	div_array.forEach(div => {

		var usageChart = new DateXYChart(div.id, {
			refresh: div.dataset.microUsageChartRefresh,
			legends: false,
			themeKey: div.dataset.microUsageChartName,
			numberFormat: "#,###.00",
			timeUnit: div.dataset.microUsageChartTimeUnit 
				? div.dataset.microUsageChartTimeUnit 
				: "minute"
		});
		
		var series_array = [...div.querySelectorAll(".jad-micro-usage-series")];
		series_array.forEach(series_div => {
			usageChart.add(new JsonLineSeries(() =>
				series_div.dataset.microUsageChartUrl,
				series_div.dataset.microUsageSeriesName 
					? series_div.dataset.microUsageSeriesName 
					: "Usage", 
				{
					filled: true
				}
			));
		});
	});
});