You must be logged in to post your query.
Home › Forums › Chart Support › Convert coordinates to pixels, and vice-versa
I want to overlay additional interactive elements on my chart using custom HTML. I want these elements to be positioned exactly as specific data values; similarly, given pixel coordinates within the chart container, I want to be able to determine the X/Y coordinate at that location.
At a minimum, is there any way to determine:
I’d love if the chart had a method like “pxToCoord()” that allowed sending in pixel values and getting back chart coordinates, a method like coordToPx() that allowed sending in X/Y value and getting back pixel offsets within the container. But I’m not sure how these would work with multiple axes.
coordToPx()
I’ve just discovered chart.plotArea which looks like it will do what I need.
chart.plotArea
@phrogz,
Glad that you figured it out, and that works for you.
— Ananya Deka Team CanvasJS
You must be logged in to reply to this topic. Login/Register