<div class="row">

    <#list charts as chart>
    <div class="col-lg-${chart.chartSize!}">
        <div class="card">
            <div class="card-header">
                <h4>${chart.chartName!}</h4>
            </div>
            <div class="card-body">
                <canvas id="id_chart_${chart.chartId!}"></canvas>
            </div>
        </div>
    </div>
</#list>
</div>
<!--图表插件-->
<script type="text/javascript" src="https://oss.tcjskd.com/delivery/upload/js/Chart.js"></script>
<script type="text/javascript">
    /*$(function () {
        $('select').selectpicker();
    });*/
    $(document).ready(function(e) {
    <#list charts as chart>
        let chart${chart.chartId!}=jQuery("#id_chart_${chart.chartId!}")[0].getContext( '2d' );
        let data${chart.chartId!}=JSON.parse('${chart.chartJson}');
        data${chart.chartId!}.labels=JSON.parse('${chart.value}').dates;
        data${chart.chartId!}.datasets[0].data=JSON.parse('${chart.value}').values;
        new Chart(chart${chart.chartId!}, {
            type: '${chart.chartType}',
                data: data${chart.chartId!}
        });
    </#list>
    });
</script>