09-29-2009 04:37 PM
I am trying in C# to create a WaveformGraph with 2 y axis with different ranges.
On the first Y Axis I have a range from 0 to 80 and on the second I have a range from -127 to 127.
I created the two different Y Axis and set the range accordingly and they show up correctly next to the plot.
Then I created two waveformPlots. One I set the waveformPlot.YAxis.Range to (-127,127) and the other waveformPlot to (0, 80). The problem is when I draw the plot the total range for the plot gets change to (-127, 127) and my (0, 80) plot gets shifted up to be in the center of the waveform. I would like this plot to stay down at the bottom of the graph to match the Axis that I created.
I can normalize the values but my users use the Tool tips to get the measurement results and those would no longer be valid if I subtracted 127 from the values in the second waveform.
Solved! Go to Solution.
09-30-2009 10:14 AM
Okay I managed to figure this out for myself. In error I had the following code:
waveformPlot1.Yaxis.Range = new Range(0, 80);
waveformPlot2.Yaxis.Range = new Range(-127, 127);
Instead I used the two y axis I already had used.
waveformPlot1.Yaxis = yAxis1
waveformPlot2.Yaxis = yAxis2
09-30-2009 10:17 AM
Hi UmmGooD,
I was able to build something similar to what you are describing, and I think you just need to make sure you set both of your yaxis objects to have a fixed range. If this is not set, then the axis will change depending on the data in the graph. Please see the attached example to look at my implementation.