Multiple X-Axis on one chart

A forum dedicated to WPF version of LightningChart Ultimate.

Moderator: Queue Moderators

Post Reply
hallo888
Posts: 43
Joined: Wed Mar 26, 2014 10:56 am

Multiple X-Axis on one chart

Post by hallo888 » Tue Sep 16, 2014 8:54 am

Hi,

Currently my chart has an X-axis in DateTime format. The chart is used to represents the on/off time of machines. Therefore X-axis is to indicate the absolute start and end operation time of each machines. I would like to have another x-axis (black axis in the attachment), where time is represented time in ms. The earliest machine start time (time x) of all machine's will be 0ms. All other time will reference to this time x, in ms.

I have added another XAxis to ViewXY.XAxes. Is this correct? How do i set the range of my 2nd axis? Is there a way to convert from the first axis or do i have to re-compute the start and end range of the 2nd x-axis (as in rebuild the segment line/line collection for the 2nd x-axis)?

Please advise.

Thanks!
Attachments
multiple-axis.png
multiple-axis.png (7.78 KiB) Viewed 4943 times

ArctionJari

Re: Multiple X-Axis on one chart

Post by ArctionJari » Tue Sep 16, 2014 12:46 pm

You can access the second X axis this way: ViewXY.XAxes[1]

Or you can add a AxisX variable into your class and set it to point to your second X axis when you create it.

Range can be set by using AxisX.SetRange method (or setting Minimum and Maximum properties).

You need to configure your second X axis independently since there's no copy constructor.

Post Reply