Chartjs-Using string list as Chart.js label

0👍

After a deep research:

    var model = @Html.Raw(Json.Serialize(interventionCounter));
    var monthlyData = [];
    $.each(model, function (index, item) {
        monthlyData .push(item.toString());
    });

then at the Chartjs script:

data: monthlyData,

solved my question. I’m marking this answer in order to help others in the future.

Leave a comment