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

Scriptable yAdjust and chartjs-plugin-zoom

Open knap1930 opened this issue 9 months ago • 0 comments

I am using yAdjust to avoid line labels from overlapping, and this is working well until I enable the zoom plugin.

The issue I am running in to is that the Scriptable function is receiving the label's position before the zoom not after. I added console.log(definition.properties); to this part of the code, and it is the x, y value that I need access to.. but this doesn't match the x,y value in to the function context.element.label.x and context.element.label.y

https://github.com/chartjs/chartjs-plugin-annotation/blob/1e95744fb98e6fe9426f8b6a7bd17b1fcdee2f42/src/elements.js#L93-L104

Image

Is there any way to get access to this value? I see it looks like it is overriding the label on the resolver here? but I can't figure out how to get this value... resolver[definition.optionScope].override(definition);

knap1930 avatar Apr 24 '25 07:04 knap1930