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

How to Highlight a particular DataItem Bar at run time

1 Answer 46 Views
Chart (obsolete as of Q1 2013)
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
chandra
Top achievements
Rank 1
chandra asked on 05 Jun 2008, 12:57 PM
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.

1 Answer, 1 is accepted

Sort by
0
Dwight
Telerik team
answered on 09 Jun 2008, 07:27 AM
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:
protected override void OnLoad(EventArgs e) 
    base.OnLoad(e); 
 
    InitChartItems(); 
 
    this.radChart1.Series[0].Items[0].Appearance.FillStyle.MainColor = Color.Red; 
    this.radChart1.Series[0].Items[0].Appearance.FillStyle.SecondColor = Color.DarkRed; 
    this.radChart1.Series[0].Items[0].Appearance.Border.Visible = false

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
Tags
Chart (obsolete as of Q1 2013)
Asked by
chandra
Top achievements
Rank 1
Answers by
Dwight
Telerik team
Share this question
or