Until the feature becomes available use the following workaround:
MyPivotGridChartDataProvider chartProvider = new MyPivotGridChartDataProvider(this.radPivotGrid1.PivotGridElement);
this.radPivotGrid1.ChartDataProvider = chartProvider;
this.radChartView1.DataSource = this.radPivotGrid1;
this.radChartView1.ShowLegend = true;
this.radPivotGrid1.ChartDataProvider.SeriesAxis = Telerik.Pivot.Core.PivotAxis.Rows;
this.radPivotGrid1.ChartDataProvider.GeneratedSeriesType = Telerik.WinControls.UI.GeneratedSeriesType.Line;
public class MyPivotGridChartDataProvider : PivotGridChartDataProvider
{
public MyPivotGridChartDataProvider(RadPivotGridElement pivotGridElement)
: base(pivotGridElement) { }
public override void UpdateChartData()
{
base.UpdateChartData();
foreach (ChartSeries series in this.ChartView.Series)
{
CartesianSeries cartesianSeries = series as CartesianSeries;
if (cartesianSeries == null)
{
continue;
}
cartesianSeries.PointSize = new SizeF(7, 7);
BindingList<PivotChartModelPoint> newData = new BindingList<PivotChartModelPoint>();
BindingList<PivotDataPoint> points = cartesianSeries.DataSource as BindingList<PivotDataPoint>;
foreach (PivotDataPoint point in points)
{
PivotChartModelPoint current = new PivotChartModelPoint() { Group = point.PivotGroup };
if (point.Value != 0)
{
current.Value = point.Value;
}
else
{
current.Value = null;
}
newData.Add(current);
}
cartesianSeries.DataSource = null;
cartesianSeries.CategoryMember = "Group";
cartesianSeries.ValueMember = "Value";
cartesianSeries.DataSource = newData;
}
}
}
public class PivotChartModelPoint
{
public string Group{ get; set; }
public double? Value { get; set; }
}