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

Alignment and offset aren't enough for label positioning

Open alexcroox opened this issue 6 months ago • 0 comments

I have a challange where a data point is on the top right of the graph. I need to prevent the label from cutting off with 2 challenges:

  1. Multiple lines in the label so I need to offset the vertical position to stop it clipping the top
  2. Wide label so I need to offset the horizontal position to stop it clipping the right

I can do 1. but not combined with 2.

Especially if the dynamic data is a tall wide line, I can have a large offset at 240degrees to solve the horizontal clipping, but then the top of the label is too far away from the point.

image

Ideally we'd have an offset top,right,left,bottom to have more flexibility.

Thanks!

alexcroox avatar Aug 07 '24 10:08 alexcroox