none
Draw Circle on Polar Chart using vb .net RRS feed

  • Question

  • Hello

    I have made windows application. I have taken chart control with chart type polar and plot the 360 values on it, now i want plot the circle on the polar chart.

    For eg if i want to plot the circle of 100 on polar chart, then it will draw the circle on polar chart.

    Please do needful.

    Thanks & Regards

    MTrush

    Monday, July 4, 2016 4:25 AM

Answers

  • Just add a flat line series.

    Public Class Form9
    
        Private Sub Form9_Load(sender As Object, e As EventArgs) Handles MyBase.Load
            Chart1.ChartAreas.Clear()
            Chart1.ChartAreas.Add("Default")
            With Chart1.ChartAreas("Default")
                .AxisX.Title = ""
                .AxisX.Interval = 20
                .AxisX.IsMarginVisible = True
                .AxisX.MajorGrid.LineColor = Color.SkyBlue
                .AxisY.MajorGrid.LineColor = Color.SkyBlue
                .AxisY.Title = ""
                .AxisY.Interval = 50
                .AxisY.Maximum = 200
            End With
    
            Chart1.Series.Clear()
            Chart1.Series.Add("Spiral")
    
            With Chart1.Series(0)
                .BorderWidth = 3
                .Color = Color.Red
                .IsVisibleInLegend = False
                .ChartType = DataVisualization.Charting.SeriesChartType.Polar
            End With
    
            For i = 360 To 0 Step -20
                Chart1.Series(0).Points.AddXY(i, 100)
            Next
    
        End Sub
    End Class

    • Proposed as answer by Mr. Monkeyboy Monday, July 4, 2016 4:01 PM
    • Marked as answer by rushuMT Wednesday, July 6, 2016 12:37 PM
    Monday, July 4, 2016 11:53 AM