How to avoid overlapping on Label by NAxisCursor


Author
Message
shweta jain
shweta jain
Junior Member (21 reputation)Junior Member (21 reputation)Junior Member (21 reputation)Junior Member (21 reputation)Junior Member (21 reputation)Junior Member (21 reputation)Junior Member (21 reputation)Junior Member (21 reputation)Junior Member (21 reputation)
Group: Forum Members
Posts: 16, Visits: 192
Hello,

I am using NAxisCursor in the chart but it is overlapping on text like below image.
How can set NAxisCursor line in background of Label?
How can I avoid overlapping of line on Label ?

https://www.nevron.com/forum/uploads/images/aad90b68-c9de-4810-bf02-ed53.png

Nevron Support
Nevron Support
Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)
Group: Administrators
Posts: 3.1K, Visits: 4.2K
Hi Shweta,

How do you create the label that is overlapped by the cursors?

Best Regards,
Nevron Support Team


shweta jain
shweta jain
Junior Member (21 reputation)Junior Member (21 reputation)Junior Member (21 reputation)Junior Member (21 reputation)Junior Member (21 reputation)Junior Member (21 reputation)Junior Member (21 reputation)Junior Member (21 reputation)Junior Member (21 reputation)
Group: Forum Members
Posts: 16, Visits: 192
Hi,
I want to avoid overlapping on label by cursor line.
Is any way to avoid overlapping on text of label by any object?
In chart, I have first added label on point then created cursor using these below lines.
_verticalAxisCursor.BeginEndAxis = (int)StandardAxis.PrimaryY;
    _verticalAxisCursor.ValueSnapper = new NAxisRulerClampSnapper();
    _cartesianChart.Axis(StandardAxis.PrimaryX).Cursors.Add(this._verticalAxisCursor);
    _verticalAxisCursor.SynchronizeOnMouseAction = MouseAction.Move | MouseAction.Hover;
    _verticalAxisCursor.StrokeStyle = new NStrokeStyle((float) crossAxisLineStyle.Width, crossAxisLineStyle.Color.WindowsFormColor());
    _verticalAxisCursor.ValueChanged += new EventHandler(this.OnValueChanged);
    _horizontalAxisCursor.BeginEndAxis = (int)StandardAxis.PrimaryX;
    _horizontalAxisCursor.ValueSnapper = new NAxisRulerClampSnapper();
    _cartesianChart.Axis(StandardAxis.PrimaryY).Cursors.Add(this._horizontalAxisCursor);
    _horizontalAxisCursor.SynchronizeOnMouseAction = MouseAction.Move | MouseAction.Hover;
    _horizontalAxisCursor.StrokeStyle = new NStrokeStyle((float) crossAxisLineStyle.Width, crossAxisLineStyle.Color.WindowsFormColor());
    _horizontalAxisCursor.ValueChanged += new EventHandler(this.OnValueChanged);



Nevron Support
Nevron Support
Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)
Group: Administrators
Posts: 3.1K, Visits: 4.2K
Hi Shweta,

We did some additional investigation and currently, there is no way to render text above the cursors, because they are rendered in an overlay on top of the other chart elements. We modified the control to support chart cursors so that they can display attached texts and this feature will be available in the 2021 release coming out soon. For the time being, you can work around this issue using custom overlay painting - check out the following example:
All Examples \ Custom Painting \ Painting in Overlay

We hope this helps - let us know if you have any questions.


Best Regards,
Nevron Support Team


GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search