chartjs-plugin-labels icon indicating copy to clipboard operation
chartjs-plugin-labels copied to clipboard

Allow setting dynamic font size or array of font sizes

Open deanylev opened this issue 5 years ago • 0 comments

This allows you to scale the font size with the size of the chart, like so:

fontSize: ({ chart }) => {
  const { bottom, left, right, top } = chart.chartArea;
  const size = Math.round(Math.min(bottom - top, right - left) / 16);
  return size;
}

deanylev avatar Jul 22 '19 04:07 deanylev