There are a large number of AddDataPointForXXXSeries methods on IChartDataPointCollection. From their documentation it looks as though you need to have a series of if statements using ChartTypeCharacterizer.IsChartTypeXXX(ChartType) to determine which one to use.
Is there any existing method that would mean I do not have to maintain a method similar to this ?
private static void AddSeriesDataPoint(IChartDataPointCollection dataPoints, ChartType chartType, IChartDataCell datacell) {
if (ChartTypeCharacterizer.IsChartTypeColumn(chartType) || ChartTypeCharacterizer.IsChartTypeBar(chartType) ) {
dataPoints.AddDataPointForBarSeries(datacell);
}
…