Public Class frmCompass Dim mAngle As Double Dim WithEvents m_DataPointDragTool As NDataPointDragTool = Nothing Sub New(Angle As Double) ' This call is required by the designer. InitializeComponent() ' Add any initialization after the InitializeComponent() call. Try Call setupPolarChart() Me.txtAngle.MaxLength = 3 Me.txtAngle.Text = Angle Curve1(Angle) Catch ex As Exception End Try End Sub Sub setupPolarChart() Try Dim polar As NPolarChart = New NPolarChart() polar.InnerRadius = New NLength(0) NPolarChartControl.Charts.Clear() NPolarChartControl.Charts.Add(polar) polar.Projection.SetPredefinedProjection(PredefinedProjection.Orthogonal) polar.BeginAngle = 0 Dim angleAxis As NAxis = polar.Axis(StandardAxis.Polar) angleAxis.Visible = False angleAxis.View = New NRangeAxisView(New NRange1DD(0, 100), True, True) NPolarChartControl.Legends(0).Visible = False Catch ex As Exception End Try Dim chart As NPolarChart = CType(NPolarChartControl.Charts(0), NPolarChart) Try NPolarChartControl.Controller.Tools.Add(New NSelectorTool()) m_DataPointDragTool = New NDataPointDragTool() m_DataPointDragTool.DepthAxisValue = 0 'm_DataPointDragTool.VerticalAxisId = StandardAxis.Polar m_DataPointDragTool.AllowHorizontalDragging = True m_DataPointDragTool.AllowVerticalDragging = True NPolarChartControl.Controller.Tools.Add(m_DataPointDragTool) NPolarChartControl.Controller.Selection.Add(chart) m_DataPointDragTool.DragOutsideAxisRangeMode = True Catch ex As Exception MsgBox(ex.Message) End Try End Sub Friend Sub Curve1(angle As Double) Dim chart As NPolarChart = NPolarChartControl.Charts(0) Dim series1 As NPolarLineSeries = New NPolarLineSeries() Try chart.Series.Clear() chart.Series.Add(series1) series1.Name = "Angle" series1.CloseContour = True series1.DataLabelStyle.Visible = False series1.MarkerStyle.Visible = True series1.MarkerStyle.Width = New NLength(6, NRelativeUnit.ParentPercentage) series1.MarkerStyle.Height = New NLength(6, NRelativeUnit.ParentPercentage) 'series1.Values.Clear() 'series1.Angles.Clear() series1.BorderStyle.Width = New NLength(2, NRelativeUnit.ParentPercentage) series1.BorderStyle.Color = Color.FromArgb(128, 0, 0) Catch ex As Exception End Try Try Dim radius As Double = 100 series1.Values.Add(0) series1.Angles.Add(angle) series1.Values.Add(radius) series1.Angles.Add(angle) Catch ex As Exception End Try Try NPolarChartControl.Refresh() Catch ex As Exception End Try End Sub Private Sub txtAngle_TextChanged(sender As Object, e As EventArgs) Handles txtAngle.TextChanged Try Curve1(Val(Me.txtAngle.Text)) Catch ex As Exception End Try End Sub End Class