How can I set my axis to be equally long in my QChart plot? I want to have my axis to form a square instead of a rectangle so that my contents are not distorted.
I want to change the left example image to look like the right. The axis should have equal length.
Ok, there are two different approaches. Based on how you painted your images, I think the scales have already the same range, so you have to change the layout of the QChartView (the widget which holds the QChart). Do this by using the usual setters like: 'setMinimumSize(width, height)' and 'setMaximumSize(width, height)'.
If you want to achieve the same scale, then set on QAxis 'setRange(min, max)' with min any max being the computed minimum of (xMin, yMin) and 'max = std::max(xMax, yMax)'.