I have an array of charts on the page called charts. This is the code I tried to run to make the font change:
for(var x in charts){
charts[x].options.scales.yAxes[0].ticks.fontSize = 20;
charts[x].options.scales.xAxes[0].ticks.fontSize = 20;
charts[x].update();
}
I know that I am correctly reaching the fontSize attribute because in the console it returns the right font size to me. After I change the fontSize, it returns the correct one. For some reason, however, the actual charts aren't updating. Is the chart.update command only made for updating data?
Note: This question is not a duplicate of the other question that exists about dynamically updating charts with JS because the ChartJS version I am using is 2.7.