I'm getting my data for the chart from a linq query
And setting the data in NeedDataSource
where chartColumn is OrderTotal, Profit, Costs, or Orders depending on the chart. The DefaultLabelValue I understand is getting ignored because of the DataLabelsColumn. Is there a way to supply the "#Y - #%" to the chart along with the DataLabelsColumn as it would be needed for the label as well?
| var reportData = from a in data |
| group a by a.OrderType |
| into b |
| select new |
| { |
| OrderType = b.Key, |
| Orders = b.Count(), |
| OrderTotal = b.Sum(p => p.OrderTotal), |
| Tax = b.Sum(p => p.Tax), |
| Costs = b.Sum(p => p.ActualCost), |
| Profit = b.Sum(p => p.Profit) |
| }; |
And setting the data in NeedDataSource
| var procChart = (Telerik.Reporting.Processing.Chart)sender; |
| var defChart = (Telerik.Reporting.Chart)procChart.ItemDefinition; |
| defChart.Series.Clear(); |
| var series = new ChartSeries |
| { |
| Type = ChartSeriesType.Pie, |
| DataYColumn = chartColumn, |
| DataLabelsColumn = "OrderType", |
| DefaultLabelValue = "#Y - #%" |
| }; |
| defChart.Series.Add(series); |
| procChart.DataSource = DataSource; |
where chartColumn is OrderTotal, Profit, Costs, or Orders depending on the chart. The DefaultLabelValue I understand is getting ignored because of the DataLabelsColumn. Is there a way to supply the "#Y - #%" to the chart along with the DataLabelsColumn as it would be needed for the label as well?