I want to add commas to the Y labels however nothing seems to be working. I've tried a bunch of answers from the community such as this one however nothing changes. Maybe it's due to version differences? My full chart code below:
<div class="ct-chart ct-major-eleventh graph"></div>
<script>
new Chartist.Line('.ct-chart', {
labels: {{ chart_labels }},
series: [{{ chart_values }}, {{ chart_values }} ]
}, {
low: {{ chart_low }},
showArea: true,
axisX: {
labelInterpolationFnc: function skipLabels(value, index) {
return index % 3 === 0 ? value : null;
}
},
ticks: {
beginAtZero: true,
callback: function(label, index, labels) {
return Intl.NumberFormat('hi', { style: 'currency', currency: 'USD', minimumFractionDigits: 2 } )
.format(label).replace(/^(\D+)/, '$1 ');
},
}
});
</script>