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

DataPointMember.Lable

1 Answer 66 Views
Chart
This is a migrated thread and some comments may be shown as answers.
Divyang
Top achievements
Rank 1
Divyang asked on 30 May 2011, 06:59 AM
Hi,

I am displaying total for particular stack series using following code. I want two extra functionality for below code.
1) i want click able total link so that once can redirect to drill down to child report.
2) i want to change the format of displaying numeric value in total. exp. from 1000 to 1,000.

Please note that i have displayed total in DataPointMember.Lable instead of DataPointMember.YValue.
Could you please suggest which api's are available for this.

BarSeriesDefinition
 seriesDefinition1 = CreateStackedBarSeriesDefinition(orientation, chartType);                     seriesDefinition1.Appearance.Foreground = new SolidColorBrush(Colors.White);                     seriesDefinition1.Appearance.Fill = new SolidColorBrush(Colors.Orange);                     var style = new Style(typeof(SeriesItemLabel));                     style.Setters.Add(new Setter(SeriesItemLabel.FontFamilyProperty, new FontFamily(ARIAL_FONT)));                     style.Setters.Add(new Setter(SeriesItemLabel.FontWeightProperty, FontWeights.Bold));                     style.Setters.Add(new Setter(SeriesItemLabel.FontSizeProperty, 20));                     style.Setters.Add(new Setter(Border.BackgroundProperty, new SolidColorBrush(Colors.Transparent)));                     seriesDefinition1.SeriesItemLabelStyle = style;                     seriesDefinition1.LabelSettings.Distance = -20;                     SeriesMapping seriesMapping1 = new SeriesMapping                                                        {                                                            LegendLabel = TOTAL,                                                            SeriesDefinition = seriesDefinition1                                                        };                     seriesMapping1.ItemMappings.Add(new ItemMapping(chartXDisplayValue, DataPointMember.XCategory));                     seriesMapping1.ItemMappings.Add(new ItemMapping(OVER_ALL_TOTAL, DataPointMember.Label, ChartAggregateFunction.Min));                     seriesMapping1.GroupingSettings.GroupDescriptors.Add(new ChartGroupDescriptor(chartXDisplayValue));                     seriesMapping1.GroupingSettings.ShouldFlattenSeries = true;

1 Answer, 1 is accepted

Sort by
0
Yavor
Telerik team
answered on 01 Jun 2011, 07:01 AM
Hi Divyang,

To handle the first requirement, you can use the selection changed event handler, and rebind the control:

RadChart1.DefaultView.ChartArea.SelectionChanged

Another option is to use a hierarchical drilldown, as shown in this example:

http://demos.telerik.com/silverlight/#Chart/FirstLook

Further, you can yse a format string, to show the value which you need. More information on this is available in the following topic:

http://www.telerik.com/help/silverlight/radchart-features-format-expressions.html

I hope this information helps.

Greetings,
Yavor
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
Divyang
Top achievements
Rank 1
Answers by
Yavor
Telerik team
Share this question
or