How to Highlight a particular DataItem Bar at run time

2 posts, 0 answers
  1. chandra
    chandra avatar
    21 posts
    Member since:
    Apr 2008

    Posted 05 Jun 2008 Link to this post

    hi,

    I have drawn a Bar chart with Date on X-axis and number(0-120) on Y-axis.

    I have a combo box with list of dates which i have used in the bar chart.

    if i select a single date/ Multiple dates in comboBox , then i need to highlight (Or) change the color of  the particular date(s) DataItem(s) Bar(s) in the chart.

    is there any way to do this? If so please share sample code.

    Help is highly appreciated.

    Thanks and Regards,
    Chandra.
  2. Dwight
    Admin
    Dwight avatar
    475 posts

    Posted 09 Jun 2008 Link to this post

    Hello chandra,

    You can modify the appearance of each item, after its creation, either through design-time, data-binding, or by code. Here is a sample code:
    1 protected override void OnLoad(EventArgs e) 
    2
    3     base.OnLoad(e); 
    4  
    5     InitChartItems(); 
    6  
    7     this.radChart1.Series[0].Items[0].Appearance.FillStyle.MainColor = Color.Red; 
    8     this.radChart1.Series[0].Items[0].Appearance.FillStyle.SecondColor = Color.DarkRed; 
    9     this.radChart1.Series[0].Items[0].Appearance.Border.Visible = false
    10

    We have noticed you are quite active in the forums and like to know how is the evaluation of our controls going. Does this product cover the needs of your projects? Any improvement suggestions will be appreciated.

    Regards,
    Evtim
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  3. UI for WinForms is Visual Studio 2017 Ready
Back to Top