07-19-2010 02:50 AM
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.
08-15-2010 05:46 AM
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).
Hope this helps.
Vijet Patankar
National Instruments