relative time on x-axis

A forum dedicated to WinForms version of LightningChart Ultimate.

Moderator: Queue Moderators

Post Reply
Igor
Posts: 67
Joined: Mon Sep 28, 2015 1:14 pm

relative time on x-axis

Post by Igor » Tue Jan 19, 2016 8:45 am

Hi,

in my application i use a monotonic time to record the values.
The monotonic time variable has the datatype "ulong".
Series_Points.png
Series_Points.png (24.08 KiB) Viewed 5839 times
In the screenshot you can see that the text is too long for the X axis and is therefore not displayed.
chart_current_with_ulong_value_not_visible.png
chart_current_with_ulong_value_not_visible.png (20.93 KiB) Viewed 5839 times
I would like to show a relativ time on x-axis regardless of the x-axis value.
E.g.: values on the X-axis: "100 ... 0" or in the other case in the other direction "0 ... 100"
chart_relative_time_from_right_to_left.png
chart_relative_time_from_right_to_left.png (21.9 KiB) Viewed 5839 times
thank you very much
Igor

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

Re: relative time on x-axis

Post by ArctionPasi » Tue Jan 19, 2016 11:27 am

Hi Igor,

I think the easiest approach is to use two X axes.

xAxis1:
- attach your series to this axis.
- set Visible = false for the xAxis1

xAxis2:
- Set Reversed = True.
- axis2.SetRange(0, xAxis1.Maximum - xAxis1.Minimum);

You zoom your view, remember to update the axis2 range.

When you are monitoring your data, the xAxis2 will be static, and the data flows as xAxis1 scrolls.

Something like this ;)
LightningChart Support Team, PT

Igor
Posts: 67
Joined: Mon Sep 28, 2015 1:14 pm

Re: relative time on x-axis

Post by Igor » Wed Jan 20, 2016 2:49 pm

thank you. Works fine for me :-)

Post Reply