Search code examples
c#winformsmschart

C# WindowsForms - How to rotate Chart Graph/Axis


My question is: How can I change the normal graph(left one) to the graph I want(right one)? I cant find it anywhere.

enter image description here

enter image description here

I want the full yellow square to be 1,1. How can I see the BackImage size so I can make the background image compatible? I only want the graph size not the actual chart.


Solution

    • You need to reverse the Y-Axis

    yourChart.Chartareas[0].AxisY.IsReversed = true;
    
    • Your other question is just as simple: You can set an BackImage for your ChartArea and if you set the BackImageWrapMode = ChartImageWrapMode.Scaled it will always nicely fill the ChartArea even when you resize the chart or when the Labels or the Legend grows or shrinks..