Profile Picture

How to avoid overlapping on Label by NAxisCursor

Posted By shweta jain 3 Years Ago
Author
Message
shweta jain
Problem Posted 3 Years Ago
View Quick Profile
Junior Member

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
Last Active: 3 Years Ago
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
Posted 3 Years Ago
View Quick Profile
Supreme Being

Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)

Group: Forum Members
Last Active: Last Week
Posts: 3,054, Visits: 4,000
Hi Shweta,

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

Best Regards,
Nevron Support Team



shweta jain
Posted 3 Years Ago
View Quick Profile
Junior Member

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
Last Active: 3 Years Ago
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
Posted 3 Years Ago
View Quick Profile
Supreme Being

Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)

Group: Forum Members
Last Active: Last Week
Posts: 3,054, Visits: 4,000
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





Similar Topics


Reading This Topic