Page 1 of 1

Swap X and Y axes

Posted: Thu May 02, 2013 8:51 am
by vifani
Hi all,

I need to show an FFT graph in a way similar to the "Audio L+R,area,spectrograms" demo, but in an horizontal way.
I have already rotated the AreaSpectrumMonitor, but I need to show the Spectrogram2D chart in horizontal orientation. Rotating the whole graph is not a good choice because all labels are also rotated and are not readable.

Is there a way to swap X and Y axes ?

Re: Swap X and Y axes

Posted: Thu May 02, 2013 3:10 pm
by ArctionPasi
Hello!

set View3D.Camera.RotationZ = 0, and set the View3D.Dimensions in the other way. See also 3D examples / Advanced / Spectrogram example. :freak:

Re: Swap X and Y axes

Posted: Thu May 02, 2013 3:17 pm
by vifani
I am sorry, but I made a mistake in my first post.

I have already rotated the Spectrogram2D using the camera rotation, but how I can swap axes for AreaSpectrumMonitor that is a 2D chart?

Re: Swap X and Y axes

Posted: Fri May 03, 2013 6:45 am
by ArctionPasi
Ok... If you are using WPF, apply RotationTransform of 90 degrees to chart's RenderTransform or LayoutTransform property.

If using WinForms, you'll need to replace AreaSeries with PolygonSeries, and set the series Y values as PolygonSeries X values and X valus as PolygonSeries Y values. Then add points to the base level X = 0 and connect last series point with the first.