Pre loader

Fixed aspect ratio for 2D chart?



I am trying to show a 2D Scatter series having 4 points that form a square. Like (0;0), (1;0), (1;1) and (0;1). Is there a way to tell the chart to keep this thing square when I resize the surface, use zoom extent, rubber zoom etc? I basically need X/Y ratio to be fixed.


  • You must to post comments
Best Answer

There are now two related answers for this question on the forums. Please find them below

1/ Maintaining aspect ratio of the SciChartSurface panel itself

2/ Manipulating VisibleRange to maintain aspect ratio

  • You must to post comments

Hi Andrew, thank you for your answer, but what I am trying to achieve is different. I am displaying a simple 4-point scatter series.

Currently, if I resize the window, it behaves like this:
Currently, if I resize the window, it behaves like this:

What I want to achieve is this:
What I want ti achieve is this:

So that square stays square when I resize the surface or use rubber band to zoom a part of it. ZoomExtents should also keep the X/Y ratio while also respecting GrowBy etc. Just like when you zoom a drawing in autocad or any other editor. I.e, 0 to 1 by X should have the same pixel size as 0 to 1 by Y.

I could of course bind Surface’s Width and Height together, as you suggested but this is not what desired. Either cropping or letterboxing would occur in this case, which I am trying to avoid.

Thanks for your help!

  • Tobias
    I need the same behavior. Please support it in e.g. Chart Zoom-Modifier.
  • You must to post comments
Showing 2 results
Your Answer

Please first to submit.

Try SciChart Today

Start a trial and discover why we are the choice
of demanding developers worldwide

Start TrialCase Studies