RadHtml Chart

Thread is closed for posting
3 posts, 1 answers
  1. Kyle
    Kyle avatar
    10 posts
    Member since:
    Apr 2013

    Posted 07 Aug 2013 Link to this post

    Hi. I am using RadHTML charts to display some data which is being populated from a stored procedure using the SqlDataSource.
    Here i have my x-axis being populated from a column which is in minutes.  All is fine, though i want to change the color of the bars that are shown above the 30min mark and again above the 45min mark.  How can i achieve this please?

    I understand that i first must retrieve the data (i can do that with the code behind separately), though i cannot seem to manage to figure out how the bar color can be changed.

  2. Answer
    Danail Vasilev
    Danail Vasilev avatar
    1502 posts

    Posted 08 Aug 2013 Link to this post

    Hello Kyle,

    For a databound chart you can use the ColorField property of the series in order to reference a field from the datasource that contains the colors. Therefore you can create such a 'color column' in your datasource that contains colors based on particular condition.

    Such an example is illustrated in HtmlChart - Conditional Item Colorization online demo.

    Danail Vasilev
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
  3. Kyle
    Kyle avatar
    10 posts
    Member since:
    Apr 2013

    Posted 09 Aug 2013 Link to this post

    Thank you very much. Followed the example you linked me too... Matched it and amended my code and its working perfectly :) thanks a lot!!
Back to Top