A chart element could not be found in the series collection

Total Post:159

Points:1117

VB.Net 
 7082  View(s)
Ratings:
Rate this:
Hi Developers,

I'm implementing a chart element in my VB aspx application but it return as error. 

A chart element with the name 'test1' could not be found in the 'SeriesCollection'.

I'm trying as following

    'Create chart series
    Dim AnnualSeries As New Series
    AnnualSeries.Name = "test1"
    AnnualSeries.Points.DataBindXY(MonthArray, GraphVectorY)
    AnnualChart.Series("test1")("DrawingStyle") = "Emboss"

Thanks in advance for any recommendations or solutions.
 
  1. Re: A chart element could not be found in the series collection

    Hi Samuel,


    You need to add the Series to the Chart.

    AnnualChart.Series.Add(AnnualSeries)

    My VB might be a bit rusty, but hopefully you get the idea.

Answer

Please check, If you want to make this post sponsored

You are not a Sponsored Member. Click Here to Subscribe the Membership.