Measurement Studio for .NET Languages

cancel
Showing results for 
Search instead for 
Did you mean: 

Yaxis interval visible

Hello!

 

  I have one tricky problem. On one waveform chart I have 5 continues plots with 5 different y axes and common x axis. Plots are not overlapped - each has its own space on chart. I would like to make visible only interval of y Axis where corresponding plot has a values. Is there any trick to do that? If this is not possible to do, any suggestion for alternative solution will be very helpful. Development environment is C#  VS2005. Thanks you very much in advance. 

0 Kudos
Message 1 of 2
(3,277 Views)

Hi there,

You could try this.


1) Create a new UserControl.

1) Drag and drop (say 3) waveform graphs in a user control. Aligned one above the other.
2) Set YAxis.MinimumWidth to some good value (for all graphs) so that even though the range on yaxes are different, they have same width.
3) Hide the x-axis on the first two graphs.
4) Adjust the width of the 3rd graph (that has the xaxis visible) so that the plot area widths are matched for all graphs.

5) Optionally you could do the followings,

a) Handle the SizeChanged of the user control and resize the graphs accordingly.

b) Handle the OnPaint of each waveform graph and draw rectangle to fill the gaps between the plot areas so that it looks like you are using a single graph!

 

Here is what I got (a design time screen shot).

21451i97671E11033BE3CB

 

Hope this helps.

 

Vijet Patankar
National Instruments

0 Kudos
Message 2 of 2
(3,176 Views)