DataPointMember.Lable

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

    Posted 30 May 2011 Link to this post

    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;
  2. Yavor
    Admin
    Yavor avatar
    11 posts

    Posted 01 Jun 2011 Link to this post

    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
Back to Top