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;
}
}