This is a migrated thread and some comments may be shown as answers.

Databound line series has empty SeriesItems

4 Answers 62 Views
Chart (HTML5)
This is a migrated thread and some comments may be shown as answers.
Alvin
Top achievements
Rank 1
Alvin asked on 31 Dec 2014, 10:43 PM
Hi,

I have a set of 3 line series on my chart which is databound using a datatable. This works well and I have the 3 line series displayed as expected. 

What I'm trying to do now is to introduce new columns in my datatable which will inform if a given point in a series is special, in which case I want to highlight it (i.e. change the color of that point). I was thinking I can achieve this by adjusting the color while looping through SeriesItems. However, SeriesItems is empty.

Right after binding, I inspect the series and I see 3 series as expected. But when I inspect the SeriesItems (or Items), they are empty.

Both object below are empty after binding, yet the chart displays fine.
Chart.PlotArea.Series[0].Items

(Chart.PlotArea.Series[0] as LineSeries).SeriesItems

Any ideas?

Thanks,
A

4 Answers, 1 is accepted

Sort by
0
Alvin
Top achievements
Rank 1
answered on 01 Jan 2015, 12:05 AM
I realized I can accomplish this by binding to ColorField according to this article. This should suffice for my needs.
http://demos.telerik.com/aspnet-ajax/htmlchart/examples/functionality/custombarcolor/defaultcs.aspx

I'm still curious why items are empty for my series though.

Thanks,
A
0
Danail Vasilev
Telerik team
answered on 05 Jan 2015, 09:03 AM
Hi Alvin,

The RadHtmlChart is created entirely on the client-side and therefore its items are not available on the server. The exception are items declared in the markup. More information is available in the Known Limitations help article.

Regards,
Danail Vasilev
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
0
Alvin
Top achievements
Rank 1
answered on 06 Jan 2015, 10:07 PM
Thanks.

The current solution I'm using (binding to ColorField) only supports changing the border color of the marker, are there any way I can change other attributes of the markers (i.e. size, fill, etc.) based on the bound value?
0
Danail Vasilev
Telerik team
answered on 07 Jan 2015, 09:04 AM
Hi Alvin,

I am sorry to say that the desired feature is not supported by the RadHtmlChart.

Regards,
Danail Vasilev
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
Tags
Chart (HTML5)
Asked by
Alvin
Top achievements
Rank 1
Answers by
Alvin
Top achievements
Rank 1
Danail Vasilev
Telerik team
Share this question
or