Sha256: 2d2f7b1c92abd5617d74f524896a108e450544192424f3908ad87e028446eb15
Contents?: true
Size: 515 Bytes
Versions: 7
Compression:
Stored size: 515 Bytes
Contents
function renderCharts(animate) { const charts = document.querySelectorAll('.chart'); for (let i = 0; i < charts.length; i++) { const chartEl = charts[i]; const chartData = JSON.parse(chartEl.dataset.json); chartData.options ||= {}; chartData.options.animation = animate; chartData.options.responsive = true; chartData.options.maintainAspectRatio = false; const ctx = chartEl.getContext('2d'); const chart = new Chart(ctx, chartData); } } export { renderCharts as default };
Version data entries
7 entries across 7 versions & 1 rubygems