How fix miniscales in a multi-stacked Y axis

Need help in implementing some specific function to your LightningChart Ultimate powered application? Post a question and get code snippets from other LightningChart Ultimate community members.

Moderator: Queue Moderators

Post Reply
aemontero7
Posts: 4
Joined: Tue Oct 21, 2014 2:14 pm

How fix miniscales in a multi-stacked Y axis

Post by aemontero7 » Wed Feb 18, 2015 4:53 pm

I have a multi-stacked Y axis in a real-time monitoring. In the left of each axis is the axis's label and in the right is a axis's miniscale that just shows the Y axis (the miniscale's X axis is hidden). When I do zooming to the chart, the miniscale change his value and his Y axis's height but I just want that can change his value. In other words, I just want that the graphic zooming can change the miniscale's value but the Y axis's miniscale remains to the same height. This is a requisite for my application.
Is there any way to do this?

User avatar
ArctionPasi
Posts: 1367
Joined: Tue Mar 26, 2013 10:57 pm
Location: Finland
Contact:

Re: How fix miniscales in a multi-stacked Y axis

Post by ArctionPasi » Wed Feb 18, 2015 7:46 pm

MiniScale adjusts its size automatically and there's no way to change value of it.

You can achieve your goal with an annotation
Annotation scale
Annotation scale
MiniScaleMadeWithAnnotation.png (2.02 KiB) Viewed 7318 times

Code: Select all

 Arction.LightningChartUltimate.Annotations.AnnotationXY annot = new Arction.LightningChartUltimate.Annotations.AnnotationXY(m_chart.ViewXY, m_chart.ViewXY.XAxes[0], m_chart.ViewXY.YAxes[0]);
            annot.Style = AnnotationStyle.Arrow;
            annot.LocationCoordinateSystem = CoordinateSystem.AxisValues;
            annot.LocationAxisValues.X = 30;
            annot.LocationAxisValues.Y = 100;
            annot.TargetCoordinateSystem = AnnotationTargetCoordinates.AxisValues;
            annot.TargetAxisValues.X = 30;
            annot.TargetAxisValues.Y = 0;
            annot.Text = "100 nV";
            annot.ArrowStyleEnd = ArrowStyle.Caliper;
            annot.ArrowStyleBegin = ArrowStyle.Caliper;
            annot.TextStyle.Color = Color.Transparent; 
            annot.TextStyle.Shadow.Style = TextShadowStyle.DropShadow;
            annot.TextStyle.Shadow.DropColor = Color.White;
            annot.TextStyle.Shadow.DropOffset.X = 20;
            annot.TextStyle.Shadow.DropOffset.Y = 60;
            annot.MouseInteraction = false; 
            m_chart.ViewXY.Annotations.Add(annot); 


Note that the line ends can be either attached to screen coordinates or axis values. Here, axis values are used. You might want to use TargetCoordinateSystem = ScreenCoordinates and LocationCoordinateSystem = ScreenCoordinates instead.

If you need to convert other axis value to screen coordinate, you can use axis.ValueToCoord. Or vice versa, axis.CoordToValue.

I hope this helps :)
LightningChart Support Team, PT

Post Reply