Edge Drawing & X Axis Drawing and Moving

A forum dedicated to WPF version of LightningChart Ultimate.

Moderator: Queue Moderators

Post Reply
copilot90
Posts: 13
Joined: Mon Aug 22, 2016 2:46 am

Edge Drawing & X Axis Drawing and Moving

Post by copilot90 » Mon Feb 27, 2017 3:31 am

Hello !

1. How can I Edge drawing like a this image



2. I want to move the x axis in custom time

so I used the Pan function ( m_chart.ViewXY.Pan(m_PanTestVal, 0); )

for example , I want to move in X axis 10 second


3. Please, Look at image file 2


Thank you for always kind answers.
Have a good day!! :D
Attachments
Image2.png
Image2.png (66.55 KiB) Viewed 6175 times
Image1.png
Image1.png (80.79 KiB) Viewed 6175 times

ArctionKestutis
Posts: 555
Joined: Mon Mar 14, 2016 9:22 am

Re: Edge Drawing & X Axis Drawing and Moving

Post by ArctionKestutis » Mon Feb 27, 2017 3:01 pm

Hello,

1. I assume you want to have two charts side by side, without visible edge. You could start with changing AxisLayout for each Chart. For example, for the left chart you set _chart.ViewXY.AxisLayout.YAxisAutoPlacement=AllLeft, while for right chart you set _chart.ViewXY.AxisLayout.YAxisAutoPlacement=AllRight. If margins are too big you could set your own with ViewXY.AxisLayout.AutoAdjustMargins=False and set new values useing _chart.ViewXY.Margins = new System.Windows.Thickness(); // new Padding()

2. Instead of Pan method, please use _chart.ViewXY.XAxes[0].SetRange(Xmin, Xmax), or corresponding for YAxes. The method SetRange is self explanatory and you will avoid extra steps as compare to Pan method.
If you have scrolling x-axis (i.e. ScrollMode==Scrolling), when you can set ScrollPosition to the latest x value (i.e. Xmax). You can learn more about it from our Demo app example series ViewXY -> RealTimeMonitoring.

3. Please check our Demo example "Historical data review" (ViewXY -> RealTimeMonitoring). It shows how to use scrolling mode and how to review data outside of view. However, if you have other usage in mind, you maybe interested in calling _chart.ViewXY.ZoomToFit() method to fit your points.

Hope this helps.
All the best,
Kestutis

copilot90
Posts: 13
Joined: Mon Aug 22, 2016 2:46 am

Re: Edge Drawing & X Axis Drawing and Moving

Post by copilot90 » Tue Feb 28, 2017 8:29 am

I still wonder.

First question.

My first question is not to draw two graphs.

I hope the upward and downward angles will be expressed at right angles like the graph on the left.

Thank you for always kind answers.

Have a nice day.

ArctionKestutis
Posts: 555
Joined: Mon Mar 14, 2016 9:22 am

Re: Edge Drawing & X Axis Drawing and Moving

Post by ArctionKestutis » Tue Feb 28, 2017 1:36 pm

If you have set x-coordinates to be the same, then it will be drawn at right angle.

Please check "Stair/Step" example in our Demo (ViewXY -> Others) as it features similar image.

Post Reply