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

Adding Labels to RangeBarSeries

3 Answers 60 Views
Chart
This is a migrated thread and some comments may be shown as answers.
Federico
Top achievements
Rank 1
Federico asked on 03 Jun 2011, 02:43 AM
I am manually binding datasource to a rangebar, and trying to bind data to the labels but they will not show up. The following code works for a regular barseries.

 

 

SeriesMapping series = new SeriesMapping (); 
series.SeriesDefinition = new RangeBarSeriesDefinition() 
 {
    AxisName = "MyAxis",
};
series.LegendLabel = "MyRange";
series.ItemMappings.Add(new ItemMapping()
{
   DataPointMember = DataPointMember.Label, 
   FieldName = "LabelField"
});
series.ItemMappings.Add(new ItemMapping ()  
{
    DataPointMember = DataPointMember.High,  
    FieldName = "HighField"
});
series.ItemMappings.Add(new ItemMapping()  
{
    DataPointMember = DataPointMember.Low,  
    FieldName = "LowField"
});
series.ItemMappings.Add(new ItemMapping ()  
{
    DataPointMember = DataPointMember.XCategory,  
    FieldName = "CatField"
});

any help would be appreciated.

 

 

 

 

 

 

3 Answers, 1 is accepted

Sort by
0
Evgenia
Telerik team
answered on 07 Jun 2011, 03:45 PM
Hi Federico,

To be able to see the Labels you should turn on the SeriesItemLabels property of the RangeBarSeriesDefinition.

Best wishes,
Evgenia
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Federico
Top achievements
Rank 1
answered on 07 Jun 2011, 05:59 PM
thanks, I set ShowItemLabels="True" and that took care of it.
I guess i assumed it defaulted to true, like the BarSeries.
0
Evgenia
Telerik team
answered on 10 Jun 2011, 09:13 AM
Hi Federico,

I'm glad you made it. Let us know if you need further assistance.

Greetings,
Evgenia
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
Chart
Asked by
Federico
Top achievements
Rank 1
Answers by
Evgenia
Telerik team
Federico
Top achievements
Rank 1
Share this question
or