Hi together,
my XValues = e.g [1,2,3,4,5]
im currently using a VerticalSliceModifier with UseInterpolation set to false but the VerticalLine Label still displays values like 1.22.
When using a rollover modifier with UseInterpolation set to false i only get the expected dataValue e.g 1.
Why is the verticalSlice modifier ignoring this and how do i fix this.
ps: I´ve attached an screenshot from an sample project.
Thank you in advance.
Best regards,
Armin
- Armin Wild asked 1 month ago
-
Hi Armin, Thanks for your inquiry. Please accept my apologies for the late response. I am going to discuss this with our team and will get back to you as soon as I have an update. Kind regards, Lex, SciChart Technical Support Engineer
-
Hi Lex, i accepted your answer but it only works on double values how about Datetime objects too.
- You must login to post comments
Hi Armin,
Hope you are doing well.
We discussed your inquiry.
VerticalSliceModifier doesn’t support moving Vertical Lines between data points because it uses VerticalLineAnnotations under the hood. The Modifier itself just adds these annotations to the SciChartSurface.
However, there is a workaround.
You can create a custom VerticalLineAnnotation and override the FromCoordinate method there.
You just need to return an appropriate value where the Annotation should be placed.
For example, the following code sample allows to drag annotation between points that are divisible by 0.2:
public class CustomHorizontalLine : HorizontalLineAnnotation
{
protected override IComparable FromCoordinate(double coord, IAxis axis)
{
if (axis.IsXAxis)
{
return base.FromCoordinate(coord, axis);
}
else
{
var data = (double) base.FromCoordinate(coord, axis);
data -= data%0.2;
return data;
}
}
}
Hope this helps.
Kind regards,
Lex
- Lex answered 3 weeks ago
- last edited 3 weeks ago
- You must login to post comments
Please login first to submit.