• Hello and welcome to our new forums. We upgraded our forum sites to a more robust and modern system which we hope you will enjoy. Be sure to check out your profile by clicking the button on the top right and configure your preferences, signature, time zone, avatar, etc. as you wish. If you need help with using this new forum'ware try the help link on the bottom right.

    Click here to review your account now.

datavisualization charting functions


Well-known member
Aug 23, 2014
Programming Experience
Select Case True
                Case RBtnPort1.Checked = True
                    Chart1.Series(0).ChartType = DataVisualization.Charting.SeriesChartType.Spline
                    For Count As Integer = 0 To DataGridView1.Rows.Count - 2
                        Chart1.Series(0).Points.AddXY(DataGridView1.Item(0, Count).Value, DataGridView1.Item(2, Count).Value)
            End Select
            Select Case True
                Case RBtnPort2.Checked = True
                    Chart1.Series(1).ChartType = DataVisualization.Charting.SeriesChartType.Spline
                    For Count As Integer = 0 To DataGridView1.Rows.Count - 2
                        Chart1.Series(1).Points.AddY(DataGridView1.Item(2, Count).Value)
Currently I'm calling the chart type as Spline. I would like to make chart type an option selected from a combobox containing several chart types. I see a potential problem as there are actually 6 series that get charted.

a] can I declare the chart type globally for this sub instead doing it for each series individually? How would I go about it ?

b] if it is possible, then does my concept of the selectable chart type list make sense?
Top Bottom