locked
How to change Polar Chart Orientation? RRS feed

  • Question

  • The default polar chart puts 0 degrees at the top of the chart.

    Is there anyway to rotate the chart 90 degrees?  I want 0 degrees to show up on the right side of the circle (and 180 degrees on the left).

    Thursday, July 21, 2011 9:00 PM

All replies

  • I found the solution.

    Need to set the following property:  AxisX.Crossing;

     

    Now the only remaining problem is:  I want to reverse the angles to plot in the reverse direction (anti-clockwise).  Unfortunately, it looks like that feature is not supported!

    Wednesday, July 27, 2011 6:15 PM
  • Now the only remaining problem is: I want to reverse the angles to plot in the reverse direction (anti-clockwise). Unfortunately, it looks like that feature is not supported!

    Looks like AxisX.IsReversed does not work with the polar chart. One way to hack this is by setting all the x values in your data to negative:

    	For Each dp As DataPoint In Chart1.Series(0).Points
    		dp.XValue *= -1
    	Next
    

    Then change the x axis labels in the customize event to look like the axis is reversed:

    	Private Sub Chart1_Customize(ByVal sender As Object, ByVal e As System.EventArgs) Handles Chart1.Customize
    
    		Dim labels As CustomLabelsCollection = Chart1.ChartAreas(0).AxisX.CustomLabels
    
    		For i As Integer = 1 To labels.Count - 1
    			labels(i).Text = (360 - CInt(labels(i).Text)).ToString()
    		Next
    
    	End Sub
    
    Monday, August 1, 2011 11:04 AM
    Moderator