Chartjs response size
P粉321584263
P粉321584263 2023-09-15 13:28:07
0
1
567

I want to adjust the font size when my character width is smaller. I'm using ChartJs and Line type. When the canvas width is 100% (1500px) I have this: But when I change the canvas size to 50% (750px) I get the following result:

The text is too small to read, I want the font size not to change. Can this be done?

P粉321584263
P粉321584263

reply all(1)
P粉392861047

Add the font size in the chart configuration and that's it.

var options = {
   scales: {
    x: {
        ticks: {
            font: {
                size: 12,
            }
        }
     }
   }
};
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template