我應該有5列堆積第二和第三個值。堆棧圖格式Syncfusion
相反,我得到兩列:
第一疊合第二每一列的值。
第二列堆疊最後4個值。
我不確定我做錯了什麼。在過去的一週裏,我一直在與Syncfusion鬥爭,試圖獲得我本來認爲是爲客戶建立的相當基本的幻燈片。然而,迄今爲止這一直是一場噩夢。
// Creates the two charts that go on the presentation
IPresentationChart chart = slide.Charts.AddChart(150, 100, 300, 125);
// Set data values
chart.ChartData.SetValue(1, 1, date1);
chart.ChartData.SetValue(2, 1, date2);
chart.ChartData.SetValue(3, 1, date3);
chart.ChartData.SetValue(4, 1, date4);
chart.ChartData.SetValue(5, 1, date5);
chart.ChartData.SetValue(1, 2, mains1);
chart.ChartData.SetValue(2, 2, mains2);
chart.ChartData.SetValue(3, 2, mains3);
chart.ChartData.SetValue(4, 2, mains4);
chart.ChartData.SetValue(5, 2, mains5);
chart.ChartData.SetValue(1, 3, variance1);
chart.ChartData.SetValue(2, 3, variance2);
chart.ChartData.SetValue(3, 3, variance3);
chart.ChartData.SetValue(4, 3, variance4);
chart.ChartData.SetValue(5, 3, variance5);
// Chart 1
// Set data range, Title and Category settings
chart.PrimaryCategoryAxis.CategoryType = OfficeCategoryType.Category;
chart.ChartTitle = "";
chart.ChartArea.Fill.Transparency = 0.5;
IOfficeChartSerie serie= chart.Series.Add(date1);
serie.Values = chart.ChartData[1, 2, 1, 3];
serie.SerieType = OfficeChartType.Column_Stacked;
IOfficeChartSerie serie2 = chart.Series.Add(date2);
serie2.Values = chart.ChartData[2, 2, 2, 3];
serie2.SerieType = OfficeChartType.Column_Stacked;
IOfficeChartSerie serie3 = chart.Series.Add(date3);
serie3.Values = chart.ChartData[3, 2, 3, 3];
serie3.SerieType = OfficeChartType.Column_Stacked;
IOfficeChartSerie serie4 = chart.Series.Add(date4);
serie4.Values = chart.ChartData[4, 2, 4, 3];
serie4.SerieType = OfficeChartType.Column_Stacked;
IOfficeChartSerie serie5 = chart.Series.Add(date5);
serie5.Values = chart.ChartData[5, 2, 5, 3];
serie5.SerieType = OfficeChartType.Column_Stacked;
chart.PlotArea.Layout.ManualLayout.Height = 0.9;
chart.PlotArea.Layout.ManualLayout.Width = 1;
chart.PlotArea.Layout.ManualLayout.Left = 0;
chart.PlotArea.Layout.ManualLayout.Top = 0;
chart.PrimaryCategoryAxis.CategoryLabels = chart.ChartData[1, 1, 5, 1];
chart.Legend.IncludeInLayout = false;
chart.HasLegend = false;