A CHART ELEMENT COULD NOT BE FOUND IN THE SERIES COLLECTION

Samuel Fernandes

Total Post:159

Points:1117
Posted by  Samuel Fernandes
VB.Net 
 5625  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. AVADHESH PATEL

    Post:604

    Points:4228
    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

NEWSLETTER

Enter your email address here always to be updated. We promise not to spam!