Conditional Display Bar Chart Series

2 posts, 0 answers
  1. Divyang
    Divyang avatar
    13 posts
    Member since:
    Dec 2010

    Posted 31 Mar 2011 Link to this post


    I have data in following format which has a day and profit on that day in lac.

    {1 May 2001 Sunday,10},
    {2 May 2001 Monday,20},
    {3 May 2001 Tuesday,30},
    {4 May 2001 Wednesday,25},
    {5 May 2001 Thursday,15},
    {6 May 2001 Friday,30},
    {7 May 2001 Saturday,25},
    {8 May 2001 Sunday,10},
    {9 May 2001 Monday,15},
    {10 May 2001 Tuesday,25},

    I want to show day in x axis and profit on y axis on the basis of following condition.

    if profit is 15 display bar in blue color.
    if profit is 10 display bar in red color.
    else display bar in green color.

    I also want three legends with red,blue,green color titled "Loss","NL","Profit".

    Please help me on this.
  2. Evgenia
    Evgenia avatar
    1437 posts

    Posted 01 Apr 2011 Link to this post

    Hello Divyang,

    You can follow our demo with full source code that demonstrates how to set custom colors according to the YValue of the Chart. For detailed explanation - take a look at our help topic.

    the Telerik team
Back to Top