How to apply aggregate functions on ChartSeries values?

Thread is closed for posting
2 posts, 0 answers
  1. Andreas
    Andreas avatar
    1 posts
    Member since:
    May 2011

    Posted 23 May 2011 Link to this post


    I need to apply generic aggregate functions like sum, min, max or average on ChartSeries. 

    The Chart data binding is done by assign series, columns and datasource:

    Dim vChartSeries = New ChartSeries("Series 1", ChartSeriesType.Bar)
    vChartSeries.YAxisType = ChartYAxisType.Primary
    Dim vChartSeries2 = New ChartSeries("Series 2", ChartSeriesType.Bar)
    vChartSeries2.YAxisType = ChartYAxisType.Secondary
    RadChart2.PlotArea.XAxis.AxisLabel.TextBlock.Text =
    RadChart2.PlotArea.YAxis.AxisLabel.TextBlock.Text "BBB"
    RadChart2.Series(0).DataYColumn = "value_column_left"
    RadChart2.Series(1).DataYColumn = "value_column_right"
    RadChart2.PlotArea.XAxis.DataLabelsColumn = "groupby_column"
    RadChart2.DataSource = getDataSource()

    How can I apply such aggregate functions? Or can it be done during DataBinding, ItemDataBound or DataBound events "by hand"?

    Many thanks for some help,
  2. Evgenia
    Evgenia avatar
    1437 posts

    Posted 26 May 2011 Link to this post

    Hello Andreas,

    Unfortunately our RadChart for ASP.NET AJAX does not support Aggregate functions. What I can suggest is that you are using the LINQ Aggregator operators and query the collection that the chart is populated from before databinding. For help on LINQ Aggregator operators you may refer to the 101 LINQ Samples topic.

    All the best,
    the Telerik team

    Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.

Back to Top