[Chartjs]-Line ChartJs would not display โ€“ Date format issue

1๐Ÿ‘

I found a way to resolve my list issue. Here is the code:

<script>
var ctx = document.getElementById('myChart').getContext('2d');
var myChart = new Chart(ctx, {
    type: 'line',
    data: {
        labels: [{% for Date in Date %}"{{ Date }}",{%endfor%}],
        datasets: [{
            label: 'SAFRAN',
            data: {{ Close }},
            borderColor: 'rgba(255, 99, 132, 1)',
        }]
    },
});
</script>

Leave a comment