Home > DeveloperSection > Forums > A chart element could not be found in the series collection
Samuel Fernandes
Samuel Fernandes

Total Post:154

Points:1082
Posted on    June-11-2013 7:21 AM

 VB.Net VB.Net 
Ratings:


 1 Reply(s)
 3906  View(s)
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.
 


AVADHESH PATEL

Total Post:604

Points:4228
Posted on    June-12-2013 7:55 AM

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.

Don't want to miss updates? Please click the below button!

Follow MindStick