Quantcast
Channel: Measurement Studio for .NET Languages topics
Viewing all articles
Browse latest Browse all 1999

wpf square graph axes

$
0
0

I need to make ScatterGraph with perfectly square axes, which also should fill its container. It will display the unit circle (radius 1, positioned at 0), so non-square axes are very annoying.

 

What I do now, is something li this, but it doesn't make perfectly square axes.

 

private void graphWrapper_SizeChanged(object sender, SizeChangedEventArgs e)
{
 if (squareArea)
 {
  int size = (int)Math.Max(0, Math.Min(graphWrapper.ActualWidth, graphWrapper.ActualHeight) - 10); 
  graph.Width = size + 35;
  graph.Height = size;
  graph.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
 }
}


Viewing all articles
Browse latest Browse all 1999

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>