Hello SciChart Team,
I’m experiencing an unexpected behavior when using a BoxAnnotation with a LogarithmicAxis on the Y axis.
When I drag the annotation by its body, it does move across the chart as expected. However, at the same time, the annotation also changes its size (it increases or decreases while being dragged).
This behavior does not occur when using a NumericAxis. With NumericAxis, dragging the body moves the annotation without altering its dimensions.
I Use the official BoxAnnotation example as reference:
https://www.scichart.com/documentation/js/v5/2d-charts/annotations-api/box-annotation/
Change only the Y axis from NumericAxis to LogarithmicAxis.
Drag the annotation by its body.
Observe that while the annotation moves, its height changes simultaneously.
Here is a minimal CodePen demonstrating the issue:
https://codepen.io/gaulions/pen/jErgZmL
The only changes from the official example are:
Switching the Y axis to LogarithmicAxis
Adding isEditable: true
Could you please confirm whether this is the expected behavior when using a LogarithmicAxis, or if this might be a bug?
Thank you.
- Julio Soares asked 2 months ago
- last edited 2 months ago
- You must login to post comments
Hello, SciChart annotations have different coordinate modes defined by ECoordinate mode.
The default one is DataValue, which uses the data coordinate space to position an annotation based on the provided x1, y1, x2, and y2. Then, while dragging, it shifts each pair of x and y coordinates by the same diff.
I’d say this is an expected behaviour.
If you want it to behave differently, you can try using other coordinate modes.
But, if you still want to position an annotation on a specific set of data coordinates and keep its visual width when dragging it, that’s a bit more complicated.
Still, it is possible to implement by overriding an annotation class with a combination of coordinate transformation logic between pixel coordinate space and data value coordinate space.
I’m afraid this may require some understanding of internal logic.
So, if this is what you need, please provide us with more details, and we can try to make it at some point.
- Jim Risen answered 2 months ago
- You must login to post comments
Please login first to submit.

