Databound line series has empty SeriesItems

6 posts, 0 answers
  1. Alvin
    Alvin avatar
    3 posts
    Member since:
    Dec 2014

    Posted 31 Dec 2014 Link to this post

    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

  2. Alvin
    Alvin avatar
    3 posts
    Member since:
    Dec 2014

    Posted 31 Dec 2014 in reply to Alvin Link to this post

    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
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Danail Vasilev
    Admin
    Danail Vasilev avatar
    1492 posts

    Posted 05 Jan 2015 Link to this post

    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.

     
  5. Alvin
    Alvin avatar
    3 posts
    Member since:
    Dec 2014

    Posted 06 Jan 2015 in reply to Danail Vasilev Link to this post

    Thanks.

    The current solution I'm using (binding to ColorField) only supports changing the border color of the marker. Is there any way I can change other marker attributes (i.e. size, fill, etc.) based on the bound value?
  6. Alvin
    Alvin avatar
    3 posts
    Member since:
    Dec 2014

    Posted 06 Jan 2015 in reply to Danail Vasilev Link to this post

    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?
  7. Danail Vasilev
    Admin
    Danail Vasilev avatar
    1492 posts

    Posted 07 Jan 2015 Link to this post

    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.

     
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017