This is a migrated thread and some comments may be shown as answers.
How to apply aggregate functions on ChartSeries values?
1 Answer 26 Views
This is a migrated thread and some comments may be shown as answers.
Andreas
Top achievements
Rank 1
Andreas asked on 23 May 2011, 05:06 PM
Hi, 

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.AddChartSeries(vChartSeries)
RadChart2.AddChartSeries(vChartSeries2)
RadChart2.PlotArea.XAxis.AxisLabel.TextBlock.Text =
"AAA"
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()
RadChart2.DataBind()



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,
Andreas

1 Answer, 1 is accepted

Sort by
0
Evgenia
Telerik team
answered on 26 May 2011, 02:06 PM
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,
Evgenia
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.

Asked by
Andreas
Top achievements
Rank 1
Answers by
Evgenia
Telerik team
Share this question
or