I have a chart named Chart1 and default series Series1. The chart is displayed as required but when click on show button again it shows the error message "An unhandled exception of type 'System.ArgumentException' occurred in System.Windows.Forms.DataVisualization.dll
Additional information: A chart element with the name 'Series1' could not be found in the 'SeriesCollection'. " Any idea please?
Chart1.DataSource = ds.Tables("tblABC")
Dim Series1 As Series = Chart1.Series("Series1")
Series1.Name = "Customer Collection"
Chart1.Series(Series1.Name).XValueMember = "remarks"
Chart1.Series(Series1.Name).YValueMembers = "Total"
Chart1.Series(Series1.Name).IsValueShownAsLabel = True