Hi guys,
I need Help!!
How can I show only subscribed channels on grid LightningChart?
For example, If I have 5 channels and I want to make one of the channels invisible!!. So, I would remove the Y-axis for the particular channel from the grid chart and make the grid fit only the 4 channels without the one which is invisible. Also when I want to make that channel visible, I would like to add it again to the grid chart.
I attached pictures may help to understand what I need.
Thanks!
how can I show only subscribed channels on grid LightningC?
Moderator: Queue Moderators
-
- Posts: 2
- Joined: Mon Jun 17, 2019 4:08 pm
how can I show only subscribed channels on grid LightningC?
- Attachments
-
- Ex2 >>need What I
- Example 2.PNG (87.22 KiB) Viewed 17293 times
-
- Ex1
- Example 1.PNG (80.51 KiB) Viewed 17293 times
-
- Posts: 557
- Joined: Mon Mar 14, 2016 9:22 am
Re: how can I show only subscribed channels on grid Lightni
Hi,
If you want to hide/collapse YAxis/segment, it is better to use Segmented layout. A segment has only one property, Height. It is a relational size versus other segments. It is not defined in screen pixels, as they need to rescale with the chart's size.
The Y axes can be assigned with a segment by setting yAxis.SegmentIndex property. The SegmentIndex is the index in the AxisLayout.Segments collection.
You can create segments with:
Then assign Y-axes to segments:
The height of the segments can be changed via their Height-property. Note that Height means relative Height to other segments. Setting it 0 will basically hide the segment and make the other segments larger.
If the hidden segment has some series in it, they might still be slightly visible even after hiding the segment. Therefore it might be a good idea to set the Visible -property of these series false in order to hide them as well.
There are several examples in our Demo App, which uses segmented layout: “Y axis layout”, “Segments with Splitters” etc.
All the best.
If you want to hide/collapse YAxis/segment, it is better to use Segmented layout. A segment has only one property, Height. It is a relational size versus other segments. It is not defined in screen pixels, as they need to rescale with the chart's size.
The Y axes can be assigned with a segment by setting yAxis.SegmentIndex property. The SegmentIndex is the index in the AxisLayout.Segments collection.
Code: Select all
_chart.ViewXY.AxisLayout.YAxesLayout = YAxesLayout.Segmented;
Code: Select all
_chart.ViewXY.AxisLayout.Segments.Add(new YAxisSegment());
_chart.ViewXY.AxisLayout.Segments.Add(new YAxisSegment());
Code: Select all
_chart.ViewXY.YAxes[0].SegmentIndex = 0;
_chart.ViewXY.YAxes[1].SegmentIndex = 1;
Code: Select all
_chart.ViewXY.AxisLayout.Segments[3].Height = 0;
There are several examples in our Demo App, which uses segmented layout: “Y axis layout”, “Segments with Splitters” etc.
All the best.