public static void UpdateChart(ChartPart chartPart, ChartData chartData) { if (chartData.Values.Length != chartData.SeriesNames.Length) throw new ArgumentException("Invalid chart data"); foreach (var ser in chartData.Values) { if (ser.Length != chartData.CategoryNames.Length) throw new ArgumentException("Invalid chart data"); } UpdateSeries(chartPart, chartData); }
public static void LoadChartData(ChartPart chartPart, System.Data.DataTable dataTable) { Chart chart = chartPart.ChartSpace.Elements<Chart>().First(); BarChart bc = chart.Descendants<BarChart>().FirstOrDefault(); if (bc != null) { BarChartSeries bcs1 = bc.Elements<BarChartSeries>().FirstOrDefault(); BarChartSeries bcs2 = bc.Elements<BarChartSeries>().ElementAt(1); if (bcs1 != null && bcs2 != null) { var categories = bcs1.Descendants<DocumentFormat.OpenXml.Drawing.Charts.CategoryAxisData>().First(); StringReference csr = categories.Descendants<StringReference>().First(); csr.Formula.Text = String.Format("Sheet1!$A$2:$A${0}", dataTable.Rows.Count + 1); StringCache sc = categories.Descendants<StringCache>().First(); CreateStringPoints(sc, dataTable.Rows.Count - 1); //Series 1 var values1 = bcs1.Descendants<DocumentFormat.OpenXml.Drawing.Charts.Values>().First(); NumberReference vnr1 = values1.Descendants<NumberReference>().First(); vnr1.Formula.Text = String.Format("Sheet1!$B$2:$B${0}", dataTable.Rows.Count + 1); NumberingCache nc1 = values1.Descendants<NumberingCache>().First(); CreateNumericPoints(nc1, dataTable.Rows.Count - 1); //Series 2 var values2 = bcs2.Descendants<DocumentFormat.OpenXml.Drawing.Charts.Values>().First(); NumberReference vnr2 = values2.Descendants<NumberReference>().First(); vnr2.Formula.Text = String.Format("Sheet1!$C$2:$C${0}", dataTable.Rows.Count + 1); NumberingCache nc2 = values2.Descendants<NumberingCache>().First(); CreateNumericPoints(nc2, dataTable.Rows.Count - 1); for (int i = 0; i < dataTable.Rows.Count; i++) { NumericValue sv = sc.Elements<StringPoint>().ElementAt(i).Elements<NumericValue>().FirstOrDefault(); sv.Text = dataTable.Rows[i][0].ToString(); NumericValue nv1 = nc1.Elements<NumericPoint>().ElementAt(i).Elements<NumericValue>().FirstOrDefault(); nv1.Text = ((DateTime)dataTable.Rows[i][1]).ToOADate().ToString(); NumericValue nv2 = nc2.Elements<NumericPoint>().ElementAt(i).Elements<NumericValue>().FirstOrDefault(); nv2.Text = "10"; } } } }
private static void CopyChartObjects(ChartPart oldChart, ChartPart newChart) { foreach (XElement dataReference in newChart.GetXDocument().Descendants(ns_c + "externalData")) { string relId = dataReference.Attribute(ns_r + "id").Value; EmbeddedPackagePart oldPart = (EmbeddedPackagePart)oldChart.GetPartById(relId); EmbeddedPackagePart newPart = newChart.AddEmbeddedPackagePart(oldPart.ContentType); using (Stream oldObject = oldPart.GetStream(FileMode.Open, FileAccess.Read)) using (Stream newObject = newPart.GetStream(FileMode.Create, FileAccess.ReadWrite)) { int byteCount; byte[] buffer = new byte[65536]; while ((byteCount = oldObject.Read(buffer, 0, 65536)) != 0) newObject.Write(buffer, 0, byteCount); } dataReference.Attribute(ns_r + "id").Value = newChart.GetIdOfPart(newPart); } }
private static void UpdateSeries(ChartPart chartPart, ChartData chartData) { UpdateEmbeddedWorkbook(chartPart, chartData); XDocument cpXDoc = chartPart.GetXDocument(); XElement root = cpXDoc.Root; var firstSeries = root.Descendants(C.ser).FirstOrDefault(); var numRef = firstSeries.Elements(C.val).Elements(C.numRef).FirstOrDefault(); string sheetName = null; var f = (string)firstSeries.Descendants(C.f).FirstOrDefault(); if (f != null) sheetName = f.Split('!')[0]; // remove all but first series XName chartType = firstSeries.Parent.Name; firstSeries.Parent.Elements(C.ser).Skip(1).Remove(); var newSetOfSeries = chartData.SeriesNames .Select((string sn, int si) => { XElement cat = null; var oldCat = firstSeries.Elements(C.cat).FirstOrDefault(); if (oldCat == null) throw new OpenXmlPowerToolsException("Invalid chart markup"); var catHasFormula = oldCat.Descendants(C.f).Any(); if (catHasFormula) { XElement newFormula = null; if (sheetName != null) newFormula = new XElement(C.f, string.Format("{0}!$A$2:$A${1}", sheetName, chartData.CategoryNames.Length + 1)); if (chartData.CategoryDataType == ChartDataType.String) { cat = new XElement(C.cat, new XElement(C.strRef, newFormula, new XElement(C.strCache, new XElement(C.ptCount, new XAttribute("val", chartData.CategoryNames.Length)), chartData.CategoryNames.Select((string cn, int ci) => { var newPt = new XElement(C.pt, new XAttribute("idx", ci), new XElement(C.v, chartData.CategoryNames[ci])); return newPt; })))); } else { cat = new XElement(C.cat, new XElement(C.numRef, newFormula, new XElement(C.numCache, new XElement(C.formatCode, FormatCodes[chartData.CategoryFormatCode]), new XElement(C.ptCount, new XAttribute("val", chartData.CategoryNames.Length)), chartData.CategoryNames.Select((string cn, int ci) => { var newPt = new XElement(C.pt, new XAttribute("idx", ci), new XElement(C.v, chartData.CategoryNames[ci])); return newPt; })))); } } else { if (chartData.CategoryDataType == ChartDataType.String) { cat = new XElement(C.cat, new XElement(C.strLit, new XElement(C.ptCount, new XAttribute("val", chartData.CategoryNames.Length)), chartData.CategoryNames.Select((string cn, int ci) => { var newPt = new XElement(C.pt, new XAttribute("idx", ci), new XElement(C.v, chartData.CategoryNames[ci])); return newPt; }))); } else { cat = new XElement(C.cat, new XElement(C.numLit, new XElement(C.ptCount, new XAttribute("val", chartData.CategoryNames.Length)), chartData.CategoryNames.Select((string cn, int ci) => { var newPt = new XElement(C.pt, new XAttribute("idx", ci), new XElement(C.v, chartData.CategoryNames[ci])); return newPt; }))); } } XElement newCval = null; if (sheetName == null) { newCval = new XElement(C.val, new XElement(C.numLit, new XElement(C.ptCount, new XAttribute("val", chartData.CategoryNames.Length)), chartData.CategoryNames.Select((string cn, int ci) => { var newPt = new XElement(C.pt, new XAttribute("idx", ci), new XElement(C.v, chartData.Values[si][ci])); return newPt; }))); } else { newCval = new XElement(C.val, new XElement(C.numRef, sheetName != null ? new XElement(C.f, string.Format("{0}!${2}$2:${2}${1}", sheetName, chartData.CategoryNames.Length + 1, SpreadsheetMLUtil.IntToColumnId(si + 1))) : null, new XElement(C.numCache, sheetName != null ? numRef.Descendants(C.formatCode) : null, new XElement(C.ptCount, new XAttribute("val", chartData.CategoryNames.Length)), chartData.CategoryNames.Select((string cn, int ci) => { var newPt = new XElement(C.pt, new XAttribute("idx", ci), new XElement(C.v, chartData.Values[si][ci])); return newPt; })))); } var serHasFormula = firstSeries.Descendants(C.f).Any(); XElement tx = null; if (serHasFormula) { XElement newFormula = null; if (sheetName != null) newFormula = new XElement(C.f, string.Format("{0}!${1}$1", sheetName, SpreadsheetMLUtil.IntToColumnId(si + 1))); tx = new XElement(C.tx, new XElement(C.strRef, newFormula, new XElement(C.strCache, new XElement(C.ptCount, new XAttribute("val", 1)), new XElement(C.pt, new XAttribute("idx", 0), new XElement(C.v, chartData.SeriesNames[si]))))); } else { tx = new XElement(C.tx, new XElement(C.v, chartData.SeriesNames[si])); } XElement newSer = null; if (chartType == C.area3DChart || chartType == C.areaChart) { newSer = new XElement(C.ser, // common new XElement(C.idx, new XAttribute("val", si)), new XElement(C.order, new XAttribute("val", si)), tx, firstSeries.Elements(C.spPr), // CT_AreaSer firstSeries.Elements(C.pictureOptions), firstSeries.Elements(C.dPt), firstSeries.Elements(C.dLbls), firstSeries.Elements(C.trendline), firstSeries.Elements(C.errBars), cat, newCval, firstSeries.Elements(C.extLst)); } else if (chartType == C.bar3DChart || chartType == C.barChart) { newSer = new XElement(C.ser, // common new XElement(C.idx, new XAttribute("val", si)), new XElement(C.order, new XAttribute("val", si)), tx, firstSeries.Elements(C.spPr), // CT_BarSer firstSeries.Elements(C.invertIfNegative), firstSeries.Elements(C.pictureOptions), firstSeries.Elements(C.dPt), firstSeries.Elements(C.dLbls), firstSeries.Elements(C.trendline), firstSeries.Elements(C.errBars), cat, newCval, firstSeries.Elements(C.shape), firstSeries.Elements(C.extLst)); } else if (chartType == C.line3DChart || chartType == C.lineChart || chartType == C.stockChart) { newSer = new XElement(C.ser, // common new XElement(C.idx, new XAttribute("val", si)), new XElement(C.order, new XAttribute("val", si)), tx, firstSeries.Elements(C.spPr), // CT_LineSer firstSeries.Elements(C.marker), firstSeries.Elements(C.dPt), firstSeries.Elements(C.dLbls), firstSeries.Elements(C.trendline), firstSeries.Elements(C.errBars), cat, newCval, firstSeries.Elements(C.smooth), firstSeries.Elements(C.extLst)); } else if (chartType == C.doughnutChart || chartType == C.ofPieChart || chartType == C.pie3DChart || chartType == C.pieChart) { newSer = new XElement(C.ser, // common new XElement(C.idx, new XAttribute("val", si)), new XElement(C.order, new XAttribute("val", si)), tx, firstSeries.Elements(C.spPr), // CT_PieSer firstSeries.Elements(C.explosion), firstSeries.Elements(C.dPt), firstSeries.Elements(C.dLbls), cat, newCval, firstSeries.Elements(C.extLst)); } else if (chartType == C.surface3DChart || chartType == C.surfaceChart) { newSer = new XElement(C.ser, // common new XElement(C.idx, new XAttribute("val", si)), new XElement(C.order, new XAttribute("val", si)), tx, firstSeries.Elements(C.spPr), // CT_SurfaceSer cat, newCval, firstSeries.Elements(C.extLst)); } if (newSer == null) throw new OpenXmlPowerToolsException("Unsupported chart type"); int accentNumber = (si % 6) + 1; newSer = (XElement)UpdateAccentTransform(newSer, accentNumber); return newSer; }); firstSeries.ReplaceWith(newSetOfSeries); chartPart.PutXDocument(); }
/// <summary> /// Loads the DOM from the ChartPart. /// </summary> /// <param name="openXmlPart">Specifies the part to be loaded.</param> public void Load(ChartPart openXmlPart) { LoadFromPart(openXmlPart); }
/// <summary> /// Removes charts in a excel sheet. /// </summary> /// <param name="worksheetPart">WorksheetPart</param> private static void RemoveCharts(WorksheetPart worksheetPart) { DrawingsPart drawingsPart = worksheetPart.DrawingsPart; if (drawingsPart != null) { ChartPart[] chartParts = new ChartPart[drawingsPart.ChartParts.Count()]; drawingsPart.ChartParts.ToList().CopyTo(chartParts); foreach (ChartPart chartPart in chartParts) { drawingsPart.DeletePart(chartPart); } foreach (GraphicFrame graphicFrame in drawingsPart.WorksheetDrawing.Descendants<GraphicFrame>()) { graphicFrame.Parent.Remove(); } } }
internal static void LoadChartData(ChartPart chartPart, List<GraphDataGroup> list) { Repository.Utility.WriteLog("LoadChartData started", System.Diagnostics.EventLogEntryType.Information); Chart chart = chartPart.ChartSpace.Elements<Chart>().First(); BarChart bc = chart.Descendants<BarChart>().FirstOrDefault(); LineChart lc = chart.Descendants<LineChart>().FirstOrDefault(); BarChartSeries bcs1 = null; BarChartSeries bcs2 = null; BarChartSeries bcs3 = null; BarChartSeries bcs4 = null; NumberingCache nc1 = null; NumberingCache nc2 = null; NumberingCache nc3 = null; NumberingCache nc4 = null; NumberingCache nc5 = null; NumberingCache nc6 = null; StringCache sc = null; if (bc != null) { bcs1 = bc.Elements<BarChartSeries>().ElementAt(0); bcs2 = bc.Elements<BarChartSeries>().ElementAt(1); bcs3 = bc.Elements<BarChartSeries>().ElementAt(2); bcs4 = bc.Elements<BarChartSeries>().ElementAt(3); } LineChartSeries lcs1 = lc.Elements<LineChartSeries>().ElementAt(0); LineChartSeries lcs2 = lc.Elements<LineChartSeries>().ElementAt(1); LineChartSeries lcs3=null; if(lc.Elements<LineChartSeries>().Count() > 2) lcs3 = lc.Elements<LineChartSeries>().ElementAt(2); LineChartSeries lcs4=null; if (lc.Elements<LineChartSeries>().Count() > 3) lcs4 = lc.Elements<LineChartSeries>().ElementAt(3); int count = 0; for (int j = 0; j < list.Count; j++) { try { GraphDataGroup graphGroup = list[j]; DocumentFormat.OpenXml.Drawing.Charts.CategoryAxisData categories; if (graphGroup.Type == "BES" || graphGroup.Type == "BEFS" || graphGroup.Type == "BEFF" || graphGroup.Type == "BEF") { categories = lcs1.Descendants<DocumentFormat.OpenXml.Drawing.Charts.CategoryAxisData>().ToList()[count]; } else { categories = bcs1.Descendants<DocumentFormat.OpenXml.Drawing.Charts.CategoryAxisData>().ToList()[count]; } if (graphGroup.Type == "CS" || graphGroup.Type == "CF" || graphGroup.Type == "BES") { StringReference csr = categories.Descendants<StringReference>().First(); //csr.Formula.Text = String.Format("Sheet1!$A$2:$A${0}", list[j].Data.Count - 1); sc = categories.Descendants<StringCache>().First(); CreateStringPoints(sc, list[j].Data.Count,true); } //Series 1 DocumentFormat.OpenXml.Drawing.Charts.Values values1; if (graphGroup.Type == "BES" || graphGroup.Type == "BEFS" || graphGroup.Type == "BEFF" || graphGroup.Type == "BEF") { values1 = lcs1.Descendants<DocumentFormat.OpenXml.Drawing.Charts.Values>().First(); } else { values1 = bcs1.Descendants<DocumentFormat.OpenXml.Drawing.Charts.Values>().First(); } if (graphGroup.Type == "CS" || graphGroup.Type == "CF" || graphGroup.Type == "BES" ) { NumberReference vnr1 = values1.Descendants<NumberReference>().First(); //vnr1.Formula.Text = String.Format("Sheet1!$B$2:$B${0}", list[j].Data.Count - 1); nc1 = values1.Descendants<NumberingCache>().First(); CreateNumericPoints(nc1, list[j].Data.Count,true); } //Series 2 DocumentFormat.OpenXml.Drawing.Charts.Values values2; if (graphGroup.Type == "BES" || graphGroup.Type == "BEFS" || graphGroup.Type == "BEFF" || graphGroup.Type == "BEF") { values2 = lcs2.Descendants<DocumentFormat.OpenXml.Drawing.Charts.Values>().First(); } else { values2 = bcs2.Descendants<DocumentFormat.OpenXml.Drawing.Charts.Values>().First(); } if (graphGroup.Type == "FCS" || graphGroup.Type == "FCF" || graphGroup.Type == "BEF") { nc2 = values2.Descendants<NumberingCache>().First(); NumberReference vnr2 = values2.Descendants<NumberReference>().First(); //vnr2.Formula.Text = String.Format("Sheet1!$C$2:$C${0}", list[j].Data.Count - 1 + 1); CreateNumericPoints(nc2, list[j].Data.Count,true); } //Series 3 DocumentFormat.OpenXml.Drawing.Charts.Values values3; if (graphGroup.Type == "BES" || graphGroup.Type == "BEFS" || graphGroup.Type == "BEFF" || graphGroup.Type == "BEF") { values3 = lcs3.Descendants<DocumentFormat.OpenXml.Drawing.Charts.Values>().First(); } else { values3 = bcs3.Descendants<DocumentFormat.OpenXml.Drawing.Charts.Values>().First(); } if (graphGroup.Type == "DQ" || graphGroup.Type == "DQF" || graphGroup.Type == "BEFS") { NumberReference vnr3 = values3.Descendants<NumberReference>().First(); //vnr3.Formula.Text = String.Format("Sheet1!$D$2:$D${0}", list[j].Data.Count); nc3 = values3.Descendants<NumberingCache>().First(); CreateNumericPoints(nc3, list[j].Data.Count,true); } //Series 4 DocumentFormat.OpenXml.Drawing.Charts.Values values4; if (graphGroup.Type == "BES" || graphGroup.Type == "BEFS" || graphGroup.Type == "BEFF" || graphGroup.Type == "BEF") { values4 = lcs4.Descendants<DocumentFormat.OpenXml.Drawing.Charts.Values>().First(); } else { values4 = bcs4.Descendants<DocumentFormat.OpenXml.Drawing.Charts.Values>().First(); } if (graphGroup.Type == "FDQ" || graphGroup.Type == "FDQF" || graphGroup.Type == "BEFS") { NumberReference vnr4 = values4.Descendants<NumberReference>().First(); //vnr4.Formula.Text = String.Format("Sheet1!$E$2:$E${0}", list[j].Data.Count); nc4 = values4.Descendants<NumberingCache>().First(); CreateNumericPoints(nc4, list[j].Data.Count,true); } if (graphGroup.Type == "BES" || graphGroup.Type == "BEFS" || graphGroup.Type == "BEFF" || graphGroup.Type == "BEF") { goto xy; } if (graphGroup.Type == "CDQ" || graphGroup.Type == "CDQF") { //Series 5 var values5 = lcs1.Descendants<DocumentFormat.OpenXml.Drawing.Charts.Values>().First(); NumberReference vnr5 = values5.Descendants<NumberReference>().First(); //vnr5.Formula.Text = String.Format("Sheet1!$F$2:$F${0}", list[j].Data.Count); nc5 = values5.Descendants<NumberingCache>().First(); CreateNumericPoints(nc5, list[j].Data.Count, true); } if (graphGroup.Type == "FCDQ" || graphGroup.Type == "FCDQF") { //Series 6 var values6 = lcs2.Descendants<DocumentFormat.OpenXml.Drawing.Charts.Values>().First(); NumberReference vnr6 = values6.Descendants<NumberReference>().First(); //vnr6.Formula.Text = String.Format("Sheet1!$G$2:$G${0}", list[j].Data.Count); nc6 = values6.Descendants<NumberingCache>().First(); CreateNumericPoints(nc6, list[j].Data.Count, true); } xy: for (int i = 0; i < graphGroup.Data.Count; i++) { try { switch (graphGroup.Type) { case "CF": case "CS": case "BES": NumericValue nv1 = nc1.Elements<NumericPoint>().ElementAt(i).Elements<NumericValue>().FirstOrDefault(); nv1.Text = graphGroup.Data[i].Count.ToString(); NumericValue sv = sc.Elements<StringPoint>().ElementAt(i).Elements<NumericValue>().FirstOrDefault(); sv.Text = graphGroup.Data[i].Title.ToString(); break; case "FCF": case "FCS": case "BEF": NumericValue nv2 = nc2.Elements<NumericPoint>().ElementAt(i).Elements<NumericValue>().FirstOrDefault(); nv2.Text = graphGroup.Data[i].Count.ToString(); break; case "DQF": case "DQ": case "BEFS": NumericValue nv3 = nc3.Elements<NumericPoint>().ElementAt(i).Elements<NumericValue>().FirstOrDefault(); nv3.Text = graphGroup.Data[i].Count.ToString(); break; case "FDQF": case "FDQ": case "BEFF": NumericValue nv4 = nc4.Elements<NumericPoint>().ElementAt(i).Elements<NumericValue>().FirstOrDefault(); nv4.Text = graphGroup.Data[i].Count.ToString(); break; case "CDQF": case "CDQ": NumericValue nv5 = nc5.Elements<NumericPoint>().ElementAt(i).Elements<NumericValue>().FirstOrDefault(); nv5.Text = graphGroup.Data[i].Count.ToString(); break; case "FCDQF": case "FCDQ": NumericValue nv6 = nc6.Elements<NumericPoint>().ElementAt(i).Elements<NumericValue>().FirstOrDefault(); nv6.Text = graphGroup.Data[i].Count.ToString(); break; } } catch { continue; } } } catch { continue; } } Repository.Utility.WriteLog("LoadChartData completed successfully", System.Diagnostics.EventLogEntryType.Information); }
/// <summary> /// Creates a chartsheet part from given data /// </summary> /// <param name="chartType">Type of chart to generate</param> /// <param name="values">Values to represent in the chart</param> /// <param name="headerReference">Columns to be used as series</param> /// <param name="categoryReference">Column to be used as category</param> /// <returns>Chartsheet part with contents related</returns> public OpenXmlSDK.ChartsheetPart Create(ChartType chartType, List <string> values, List <string> headerReference, string categoryReference) { //Creates base content and associates it to a new chartsheet part XDocument chartsheet = CreateEmptyChartsheet(); OpenXmlSDK.WorkbookPart workbook = ((OpenXmlSDK.SpreadsheetDocument)parentDocument.Document).WorkbookPart; OpenXmlSDK.ChartsheetPart chartsheetPart = workbook.AddNewPart <OpenXmlSDK.ChartsheetPart>(); XDocument chartsheetDocument = parentDocument.GetXDocument(chartsheetPart); XDocument newChartsheetDocument = CreateEmptyChartsheet(); if (chartsheetDocument.Root == null) { chartsheetDocument.Add( newChartsheetDocument.Root ); } else { chartsheetDocument.Root.ReplaceWith(newChartsheetDocument.Root); } //Creates a base drawings part and associates it to the chartsheet part OpenXmlSDK.DrawingsPart drawingsPart = chartsheetPart.AddNewPart <OpenXmlSDK.DrawingsPart>(); XDocument drawingsDocument = parentDocument.GetXDocument(drawingsPart); XDocument newDrawingDocument = CreateEmptyDrawing(); if (drawingsDocument.Root == null) { drawingsDocument.Add( newDrawingDocument.Root ); } else { drawingsDocument.Root.ReplaceWith(newDrawingDocument.Root); } //Adds content to chartsheet document to reference drawing document chartsheetDocument .Element(ns + "chartsheet") .Add( new XElement(ns + "drawing", new XAttribute(relationshipsns + "id", chartsheetPart.GetIdOfPart(drawingsPart)) ) ); //creates the chart part and associates it to the drawings part OpenXmlSDK.ChartPart chartPart = drawingsPart.AddNewPart <OpenXmlSDK.ChartPart>(); XDocument chartDocument = parentDocument.GetXDocument(chartPart); XDocument newChartDocument = CreateChart(chartType, values, headerReference, categoryReference);// CreateEmptyChart(); if (chartDocument.Root == null) { chartDocument.Add( newChartDocument.Root ); } else { chartDocument.Root.ReplaceWith(newChartDocument.Root); } //Adds content to drawing document to reference chart document drawingsDocument .Descendants(drawingns + "graphicData") .First() .Add( new XAttribute("uri", chartns), new XElement(chartns + "chart", new XAttribute(XNamespace.Xmlns + "c", chartns), new XAttribute(XNamespace.Xmlns + "r", relationshipsns), new XAttribute(relationshipsns + "id", drawingsPart.GetIdOfPart(chartPart)) ) ); //Associates the chartsheet part to the workbook part XDocument document = parentDocument.GetXDocument(((OpenXmlSDK.SpreadsheetDocument)parentDocument.Document).WorkbookPart); int sheetId = document.Root.Element(ns + "sheets").Elements(ns + "sheet").Count() + 1; int chartsheetCount = document.Root .Element(ns + "sheets") .Elements(ns + "sheet") .Where( t => t.Attribute("name").Value.StartsWith("chart") ) .Count() + 1; //Adds content to workbook document to reference chartsheet document document.Root .Element(ns + "sheets") .Add( new XElement(ns + "sheet", new XAttribute("name", string.Format("chart{0}", chartsheetCount)), new XAttribute("sheetId", sheetId), new XAttribute(relationshipsns + "id", workbook.GetIdOfPart(chartsheetPart)) ) ); return(chartsheetPart); }
// Generates content of chartPart6. private void GenerateChartPart6Content(ChartPart chartPart6) { C.ChartSpace chartSpace6 = new C.ChartSpace(); chartSpace6.AddNamespaceDeclaration("c", "http://schemas.openxmlformats.org/drawingml/2006/chart"); chartSpace6.AddNamespaceDeclaration("a", "http://schemas.openxmlformats.org/drawingml/2006/main"); chartSpace6.AddNamespaceDeclaration("r", "http://schemas.openxmlformats.org/officeDocument/2006/relationships"); C.Date1904 date19046 = new C.Date1904(){ Val = false }; C.EditingLanguage editingLanguage6 = new C.EditingLanguage(){ Val = "en-US" }; C.RoundedCorners roundedCorners6 = new C.RoundedCorners(){ Val = false }; AlternateContent alternateContent13 = new AlternateContent(); alternateContent13.AddNamespaceDeclaration("mc", "http://schemas.openxmlformats.org/markup-compatibility/2006"); AlternateContentChoice alternateContentChoice13 = new AlternateContentChoice(){ Requires = "c14" }; alternateContentChoice13.AddNamespaceDeclaration("c14", "http://schemas.microsoft.com/office/drawing/2007/8/2/chart"); C14.Style style11 = new C14.Style(){ Val = 101 }; alternateContentChoice13.Append(style11); AlternateContentFallback alternateContentFallback12 = new AlternateContentFallback(); C.Style style12 = new C.Style(){ Val = 1 }; alternateContentFallback12.Append(style12); alternateContent13.Append(alternateContentChoice13); alternateContent13.Append(alternateContentFallback12); C.PivotSource pivotSource6 = new C.PivotSource(); C.PivotTableName pivotTableName6 = new C.PivotTableName(); pivotTableName6.Text = "[GeneratedDocument.xlsx]ShowSelectionLabel!PivotTable1"; C.FormatId formatId6 = new C.FormatId(){ Val = (UInt32Value)11U }; pivotSource6.Append(pivotTableName6); pivotSource6.Append(formatId6); C.Chart chart6 = new C.Chart(); C.Title title6 = new C.Title(); C.Overlay overlay11 = new C.Overlay(){ Val = false }; title6.Append(overlay11); C.AutoTitleDeleted autoTitleDeleted6 = new C.AutoTitleDeleted(){ Val = false }; C.PivotFormats pivotFormats6 = new C.PivotFormats(); C.PivotFormat pivotFormat30 = new C.PivotFormat(); C.Index index35 = new C.Index(){ Val = (UInt32Value)0U }; C.ShapeProperties shapeProperties15 = new C.ShapeProperties(); A.SolidFill solidFill27 = new A.SolidFill(); A.SchemeColor schemeColor15 = new A.SchemeColor(){ Val = A.SchemeColorValues.Accent1 }; A.Tint tint8 = new A.Tint(){ Val = 100000 }; schemeColor15.Append(tint8); solidFill27.Append(schemeColor15); A.Outline outline20 = new A.Outline(); A.NoFill noFill15 = new A.NoFill(); outline20.Append(noFill15); A.EffectList effectList14 = new A.EffectList(); shapeProperties15.Append(solidFill27); shapeProperties15.Append(outline20); shapeProperties15.Append(effectList14); C.Marker marker30 = new C.Marker(); C.Symbol symbol30 = new C.Symbol(){ Val = C.MarkerStyleValues.None }; marker30.Append(symbol30); pivotFormat30.Append(index35); pivotFormat30.Append(shapeProperties15); pivotFormat30.Append(marker30); C.PivotFormat pivotFormat31 = new C.PivotFormat(); C.Index index36 = new C.Index(){ Val = (UInt32Value)1U }; C.ShapeProperties shapeProperties16 = new C.ShapeProperties(); A.SolidFill solidFill28 = new A.SolidFill(); A.SchemeColor schemeColor16 = new A.SchemeColor(){ Val = A.SchemeColorValues.Accent2 }; A.Tint tint9 = new A.Tint(){ Val = 100000 }; schemeColor16.Append(tint9); solidFill28.Append(schemeColor16); A.Outline outline21 = new A.Outline(); A.NoFill noFill16 = new A.NoFill(); outline21.Append(noFill16); A.EffectList effectList15 = new A.EffectList(); shapeProperties16.Append(solidFill28); shapeProperties16.Append(outline21); shapeProperties16.Append(effectList15); C.Marker marker31 = new C.Marker(); C.Symbol symbol31 = new C.Symbol(){ Val = C.MarkerStyleValues.None }; marker31.Append(symbol31); pivotFormat31.Append(index36); pivotFormat31.Append(shapeProperties16); pivotFormat31.Append(marker31); C.PivotFormat pivotFormat32 = new C.PivotFormat(); C.Index index37 = new C.Index(){ Val = (UInt32Value)2U }; C.Marker marker32 = new C.Marker(); C.Symbol symbol32 = new C.Symbol(){ Val = C.MarkerStyleValues.None }; marker32.Append(symbol32); pivotFormat32.Append(index37); pivotFormat32.Append(marker32); C.PivotFormat pivotFormat33 = new C.PivotFormat(); C.Index index38 = new C.Index(){ Val = (UInt32Value)3U }; C.Marker marker33 = new C.Marker(); C.Symbol symbol33 = new C.Symbol(){ Val = C.MarkerStyleValues.None }; marker33.Append(symbol33); pivotFormat33.Append(index38); pivotFormat33.Append(marker33); C.PivotFormat pivotFormat34 = new C.PivotFormat(); C.Index index39 = new C.Index(){ Val = (UInt32Value)4U }; C.Marker marker34 = new C.Marker(); C.Symbol symbol34 = new C.Symbol(){ Val = C.MarkerStyleValues.None }; marker34.Append(symbol34); pivotFormat34.Append(index39); pivotFormat34.Append(marker34); C.PivotFormat pivotFormat35 = new C.PivotFormat(); C.Index index40 = new C.Index(){ Val = (UInt32Value)5U }; C.Marker marker35 = new C.Marker(); C.Symbol symbol35 = new C.Symbol(){ Val = C.MarkerStyleValues.None }; marker35.Append(symbol35); pivotFormat35.Append(index40); pivotFormat35.Append(marker35); C.PivotFormat pivotFormat36 = new C.PivotFormat(); C.Index index41 = new C.Index(){ Val = (UInt32Value)6U }; C.Marker marker36 = new C.Marker(); C.Symbol symbol36 = new C.Symbol(){ Val = C.MarkerStyleValues.None }; marker36.Append(symbol36); pivotFormat36.Append(index41); pivotFormat36.Append(marker36); C.PivotFormat pivotFormat37 = new C.PivotFormat(); C.Index index42 = new C.Index(){ Val = (UInt32Value)7U }; C.Marker marker37 = new C.Marker(); C.Symbol symbol37 = new C.Symbol(){ Val = C.MarkerStyleValues.None }; marker37.Append(symbol37); pivotFormat37.Append(index42); pivotFormat37.Append(marker37); C.PivotFormat pivotFormat38 = new C.PivotFormat(); C.Index index43 = new C.Index(){ Val = (UInt32Value)8U }; C.Marker marker38 = new C.Marker(); C.Symbol symbol38 = new C.Symbol(){ Val = C.MarkerStyleValues.None }; marker38.Append(symbol38); pivotFormat38.Append(index43); pivotFormat38.Append(marker38); C.PivotFormat pivotFormat39 = new C.PivotFormat(); C.Index index44 = new C.Index(){ Val = (UInt32Value)9U }; C.Marker marker39 = new C.Marker(); C.Symbol symbol39 = new C.Symbol(){ Val = C.MarkerStyleValues.None }; marker39.Append(symbol39); pivotFormat39.Append(index44); pivotFormat39.Append(marker39); C.PivotFormat pivotFormat40 = new C.PivotFormat(); C.Index index45 = new C.Index(){ Val = (UInt32Value)10U }; C.Marker marker40 = new C.Marker(); C.Symbol symbol40 = new C.Symbol(){ Val = C.MarkerStyleValues.None }; marker40.Append(symbol40); pivotFormat40.Append(index45); pivotFormat40.Append(marker40); C.PivotFormat pivotFormat41 = new C.PivotFormat(); C.Index index46 = new C.Index(){ Val = (UInt32Value)11U }; C.Marker marker41 = new C.Marker(); C.Symbol symbol41 = new C.Symbol(){ Val = C.MarkerStyleValues.None }; marker41.Append(symbol41); pivotFormat41.Append(index46); pivotFormat41.Append(marker41); C.PivotFormat pivotFormat42 = new C.PivotFormat(); C.Index index47 = new C.Index(){ Val = (UInt32Value)12U }; C.Marker marker42 = new C.Marker(); C.Symbol symbol42 = new C.Symbol(){ Val = C.MarkerStyleValues.None }; marker42.Append(symbol42); pivotFormat42.Append(index47); pivotFormat42.Append(marker42); C.PivotFormat pivotFormat43 = new C.PivotFormat(); C.Index index48 = new C.Index(){ Val = (UInt32Value)13U }; C.Marker marker43 = new C.Marker(); C.Symbol symbol43 = new C.Symbol(){ Val = C.MarkerStyleValues.None }; marker43.Append(symbol43); pivotFormat43.Append(index48); pivotFormat43.Append(marker43); C.PivotFormat pivotFormat44 = new C.PivotFormat(); C.Index index49 = new C.Index(){ Val = (UInt32Value)14U }; C.ShapeProperties shapeProperties17 = new C.ShapeProperties(); A.SolidFill solidFill29 = new A.SolidFill(); A.SchemeColor schemeColor17 = new A.SchemeColor(){ Val = A.SchemeColorValues.Accent1 }; A.Tint tint10 = new A.Tint(){ Val = 100000 }; schemeColor17.Append(tint10); solidFill29.Append(schemeColor17); A.Outline outline22 = new A.Outline(); A.NoFill noFill17 = new A.NoFill(); outline22.Append(noFill17); A.EffectList effectList16 = new A.EffectList(); shapeProperties17.Append(solidFill29); shapeProperties17.Append(outline22); shapeProperties17.Append(effectList16); C.Marker marker44 = new C.Marker(); C.Symbol symbol44 = new C.Symbol(){ Val = C.MarkerStyleValues.None }; marker44.Append(symbol44); pivotFormat44.Append(index49); pivotFormat44.Append(shapeProperties17); pivotFormat44.Append(marker44); C.PivotFormat pivotFormat45 = new C.PivotFormat(); C.Index index50 = new C.Index(){ Val = (UInt32Value)15U }; C.ShapeProperties shapeProperties18 = new C.ShapeProperties(); A.SolidFill solidFill30 = new A.SolidFill(); A.SchemeColor schemeColor18 = new A.SchemeColor(){ Val = A.SchemeColorValues.Accent1 }; A.Tint tint11 = new A.Tint(){ Val = 100000 }; schemeColor18.Append(tint11); solidFill30.Append(schemeColor18); A.Outline outline23 = new A.Outline(); A.NoFill noFill18 = new A.NoFill(); outline23.Append(noFill18); A.EffectList effectList17 = new A.EffectList(); shapeProperties18.Append(solidFill30); shapeProperties18.Append(outline23); shapeProperties18.Append(effectList17); C.Marker marker45 = new C.Marker(); C.Symbol symbol45 = new C.Symbol(){ Val = C.MarkerStyleValues.None }; marker45.Append(symbol45); pivotFormat45.Append(index50); pivotFormat45.Append(shapeProperties18); pivotFormat45.Append(marker45); C.PivotFormat pivotFormat46 = new C.PivotFormat(); C.Index index51 = new C.Index(){ Val = (UInt32Value)16U }; C.ShapeProperties shapeProperties19 = new C.ShapeProperties(); A.SolidFill solidFill31 = new A.SolidFill(); A.SchemeColor schemeColor19 = new A.SchemeColor(){ Val = A.SchemeColorValues.Accent1 }; A.Tint tint12 = new A.Tint(){ Val = 100000 }; schemeColor19.Append(tint12); solidFill31.Append(schemeColor19); A.Outline outline24 = new A.Outline(); A.NoFill noFill19 = new A.NoFill(); outline24.Append(noFill19); A.EffectList effectList18 = new A.EffectList(); shapeProperties19.Append(solidFill31); shapeProperties19.Append(outline24); shapeProperties19.Append(effectList18); C.Marker marker46 = new C.Marker(); C.Symbol symbol46 = new C.Symbol(){ Val = C.MarkerStyleValues.None }; marker46.Append(symbol46); pivotFormat46.Append(index51); pivotFormat46.Append(shapeProperties19); pivotFormat46.Append(marker46); pivotFormats6.Append(pivotFormat30); pivotFormats6.Append(pivotFormat31); pivotFormats6.Append(pivotFormat32); pivotFormats6.Append(pivotFormat33); pivotFormats6.Append(pivotFormat34); pivotFormats6.Append(pivotFormat35); pivotFormats6.Append(pivotFormat36); pivotFormats6.Append(pivotFormat37); pivotFormats6.Append(pivotFormat38); pivotFormats6.Append(pivotFormat39); pivotFormats6.Append(pivotFormat40); pivotFormats6.Append(pivotFormat41); pivotFormats6.Append(pivotFormat42); pivotFormats6.Append(pivotFormat43); pivotFormats6.Append(pivotFormat44); pivotFormats6.Append(pivotFormat45); pivotFormats6.Append(pivotFormat46); C.PlotArea plotArea6 = new C.PlotArea(); C.Layout layout6 = new C.Layout(); C.BarChart barChart3 = new C.BarChart(); C.BarDirection barDirection3 = new C.BarDirection(){ Val = C.BarDirectionValues.Column }; C.BarGrouping barGrouping3 = new C.BarGrouping(){ Val = C.BarGroupingValues.Clustered }; C.VaryColors varyColors6 = new C.VaryColors(){ Val = false }; C.BarChartSeries barChartSeries3 = new C.BarChartSeries(); C.Index index52 = new C.Index(){ Val = (UInt32Value)0U }; C.Order order6 = new C.Order(){ Val = (UInt32Value)0U }; C.SeriesText seriesText6 = new C.SeriesText(); C.StringReference stringReference11 = new C.StringReference(); C.Formula formula16 = new C.Formula(); formula16.Text = "ShowSelectionLabel!$B$1"; C.StringCache stringCache11 = new C.StringCache(); C.PointCount pointCount16 = new C.PointCount(){ Val = (UInt32Value)1U }; C.StringPoint stringPoint21 = new C.StringPoint(){ Index = (UInt32Value)0U }; C.NumericValue numericValue36 = new C.NumericValue(); numericValue36.Text = "Total"; stringPoint21.Append(numericValue36); stringCache11.Append(pointCount16); stringCache11.Append(stringPoint21); stringReference11.Append(formula16); stringReference11.Append(stringCache11); seriesText6.Append(stringReference11); C.ChartShapeProperties chartShapeProperties6 = new C.ChartShapeProperties(); A.SolidFill solidFill32 = new A.SolidFill(); A.SchemeColor schemeColor20 = new A.SchemeColor(){ Val = A.SchemeColorValues.Accent1 }; A.Tint tint13 = new A.Tint(){ Val = 100000 }; schemeColor20.Append(tint13); solidFill32.Append(schemeColor20); A.Outline outline25 = new A.Outline(); A.NoFill noFill20 = new A.NoFill(); outline25.Append(noFill20); A.EffectList effectList19 = new A.EffectList(); chartShapeProperties6.Append(solidFill32); chartShapeProperties6.Append(outline25); chartShapeProperties6.Append(effectList19); C.InvertIfNegative invertIfNegative3 = new C.InvertIfNegative(){ Val = false }; C.CategoryAxisData categoryAxisData6 = new C.CategoryAxisData(); C.StringReference stringReference12 = new C.StringReference(); C.Formula formula17 = new C.Formula(); formula17.Text = "ShowSelectionLabel!$A$2:$A$5"; C.StringCache stringCache12 = new C.StringCache(); C.PointCount pointCount17 = new C.PointCount(){ Val = (UInt32Value)3U }; C.StringPoint stringPoint22 = new C.StringPoint(){ Index = (UInt32Value)0U }; C.NumericValue numericValue37 = new C.NumericValue(); numericValue37.Text = "product_A"; stringPoint22.Append(numericValue37); C.StringPoint stringPoint23 = new C.StringPoint(){ Index = (UInt32Value)1U }; C.NumericValue numericValue38 = new C.NumericValue(); numericValue38.Text = "product_D"; stringPoint23.Append(numericValue38); C.StringPoint stringPoint24 = new C.StringPoint(){ Index = (UInt32Value)2U }; C.NumericValue numericValue39 = new C.NumericValue(); numericValue39.Text = "product_E"; stringPoint24.Append(numericValue39); stringCache12.Append(pointCount17); stringCache12.Append(stringPoint22); stringCache12.Append(stringPoint23); stringCache12.Append(stringPoint24); stringReference12.Append(formula17); stringReference12.Append(stringCache12); categoryAxisData6.Append(stringReference12); C.Values values6 = new C.Values(); C.NumberReference numberReference6 = new C.NumberReference(); C.Formula formula18 = new C.Formula(); formula18.Text = "ShowSelectionLabel!$B$2:$B$5"; C.NumberingCache numberingCache6 = new C.NumberingCache(); C.FormatCode formatCode6 = new C.FormatCode(); formatCode6.Text = "General"; C.PointCount pointCount18 = new C.PointCount(){ Val = (UInt32Value)3U }; C.NumericPoint numericPoint16 = new C.NumericPoint(){ Index = (UInt32Value)0U }; C.NumericValue numericValue40 = new C.NumericValue(); numericValue40.Text = "19"; numericPoint16.Append(numericValue40); C.NumericPoint numericPoint17 = new C.NumericPoint(){ Index = (UInt32Value)1U }; C.NumericValue numericValue41 = new C.NumericValue(); numericValue41.Text = "13"; numericPoint17.Append(numericValue41); C.NumericPoint numericPoint18 = new C.NumericPoint(){ Index = (UInt32Value)2U }; C.NumericValue numericValue42 = new C.NumericValue(); numericValue42.Text = "33"; numericPoint18.Append(numericValue42); numberingCache6.Append(formatCode6); numberingCache6.Append(pointCount18); numberingCache6.Append(numericPoint16); numberingCache6.Append(numericPoint17); numberingCache6.Append(numericPoint18); numberReference6.Append(formula18); numberReference6.Append(numberingCache6); values6.Append(numberReference6); barChartSeries3.Append(index52); barChartSeries3.Append(order6); barChartSeries3.Append(seriesText6); barChartSeries3.Append(chartShapeProperties6); barChartSeries3.Append(invertIfNegative3); barChartSeries3.Append(categoryAxisData6); barChartSeries3.Append(values6); C.DataLabels dataLabels6 = new C.DataLabels(); C.ShowLegendKey showLegendKey6 = new C.ShowLegendKey(){ Val = false }; C.ShowValue showValue6 = new C.ShowValue(){ Val = false }; C.ShowCategoryName showCategoryName6 = new C.ShowCategoryName(){ Val = false }; C.ShowSeriesName showSeriesName6 = new C.ShowSeriesName(){ Val = false }; C.ShowPercent showPercent6 = new C.ShowPercent(){ Val = false }; C.ShowBubbleSize showBubbleSize6 = new C.ShowBubbleSize(){ Val = false }; dataLabels6.Append(showLegendKey6); dataLabels6.Append(showValue6); dataLabels6.Append(showCategoryName6); dataLabels6.Append(showSeriesName6); dataLabels6.Append(showPercent6); dataLabels6.Append(showBubbleSize6); C.GapWidth gapWidth3 = new C.GapWidth(){ Val = (UInt16Value)219U }; C.Overlap overlap2 = new C.Overlap(){ Val = -27 }; C.AxisId axisId9 = new C.AxisId(){ Val = (UInt32Value)209979552U }; C.AxisId axisId10 = new C.AxisId(){ Val = (UInt32Value)209979944U }; barChart3.Append(barDirection3); barChart3.Append(barGrouping3); barChart3.Append(varyColors6); barChart3.Append(barChartSeries3); barChart3.Append(dataLabels6); barChart3.Append(gapWidth3); barChart3.Append(overlap2); barChart3.Append(axisId9); barChart3.Append(axisId10); C.CategoryAxis categoryAxis3 = new C.CategoryAxis(); C.AxisId axisId11 = new C.AxisId(){ Val = (UInt32Value)209979552U }; C.Scaling scaling5 = new C.Scaling(); C.Orientation orientation5 = new C.Orientation(){ Val = C.OrientationValues.MinMax }; scaling5.Append(orientation5); C.Delete delete5 = new C.Delete(){ Val = false }; C.AxisPosition axisPosition5 = new C.AxisPosition(){ Val = C.AxisPositionValues.Bottom }; C.NumberingFormat numberingFormat5 = new C.NumberingFormat(){ FormatCode = "General", SourceLinked = false }; C.MajorTickMark majorTickMark5 = new C.MajorTickMark(){ Val = C.TickMarkValues.None }; C.MinorTickMark minorTickMark5 = new C.MinorTickMark(){ Val = C.TickMarkValues.None }; C.TickLabelPosition tickLabelPosition5 = new C.TickLabelPosition(){ Val = C.TickLabelPositionValues.NextTo }; C.ChartShapeProperties chartShapeProperties7 = new C.ChartShapeProperties(); A.NoFill noFill21 = new A.NoFill(); A.Outline outline26 = new A.Outline(); A.NoFill noFill22 = new A.NoFill(); outline26.Append(noFill22); A.EffectList effectList20 = new A.EffectList(); chartShapeProperties7.Append(noFill21); chartShapeProperties7.Append(outline26); chartShapeProperties7.Append(effectList20); C.TextProperties textProperties5 = new C.TextProperties(); A.BodyProperties bodyProperties11 = new A.BodyProperties(){ Rotation = -60000000, UseParagraphSpacing = true, VerticalOverflow = A.TextVerticalOverflowValues.Ellipsis, Vertical = A.TextVerticalValues.Horizontal, Wrap = A.TextWrappingValues.Square, Anchor = A.TextAnchoringTypeValues.Center, AnchorCenter = true }; A.ListStyle listStyle11 = new A.ListStyle(); A.Paragraph paragraph11 = new A.Paragraph(); A.ParagraphProperties paragraphProperties5 = new A.ParagraphProperties(); A.DefaultRunProperties defaultRunProperties5 = new A.DefaultRunProperties(){ FontSize = 900, Kerning = 1200 }; A.SolidFill solidFill33 = new A.SolidFill(); A.SchemeColor schemeColor21 = new A.SchemeColor(){ Val = A.SchemeColorValues.Text1 }; A.LuminanceModulation luminanceModulation6 = new A.LuminanceModulation(){ Val = 65000 }; A.LuminanceOffset luminanceOffset6 = new A.LuminanceOffset(){ Val = 35000 }; schemeColor21.Append(luminanceModulation6); schemeColor21.Append(luminanceOffset6); solidFill33.Append(schemeColor21); A.LatinFont latinFont4 = new A.LatinFont(){ Typeface = "+mn-lt" }; A.EastAsianFont eastAsianFont4 = new A.EastAsianFont(){ Typeface = "+mn-ea" }; A.ComplexScriptFont complexScriptFont4 = new A.ComplexScriptFont(){ Typeface = "+mn-cs" }; defaultRunProperties5.Append(solidFill33); defaultRunProperties5.Append(latinFont4); defaultRunProperties5.Append(eastAsianFont4); defaultRunProperties5.Append(complexScriptFont4); paragraphProperties5.Append(defaultRunProperties5); A.EndParagraphRunProperties endParagraphRunProperties5 = new A.EndParagraphRunProperties(){ Language = "en-US" }; paragraph11.Append(paragraphProperties5); paragraph11.Append(endParagraphRunProperties5); textProperties5.Append(bodyProperties11); textProperties5.Append(listStyle11); textProperties5.Append(paragraph11); C.CrossingAxis crossingAxis5 = new C.CrossingAxis(){ Val = (UInt32Value)209979944U }; C.Crosses crosses5 = new C.Crosses(){ Val = C.CrossesValues.AutoZero }; C.AutoLabeled autoLabeled3 = new C.AutoLabeled(){ Val = true }; C.LabelAlignment labelAlignment3 = new C.LabelAlignment(){ Val = C.LabelAlignmentValues.Center }; C.LabelOffset labelOffset3 = new C.LabelOffset(){ Val = (UInt16Value)100U }; C.NoMultiLevelLabels noMultiLevelLabels3 = new C.NoMultiLevelLabels(){ Val = false }; categoryAxis3.Append(axisId11); categoryAxis3.Append(scaling5); categoryAxis3.Append(delete5); categoryAxis3.Append(axisPosition5); categoryAxis3.Append(numberingFormat5); categoryAxis3.Append(majorTickMark5); categoryAxis3.Append(minorTickMark5); categoryAxis3.Append(tickLabelPosition5); categoryAxis3.Append(chartShapeProperties7); categoryAxis3.Append(textProperties5); categoryAxis3.Append(crossingAxis5); categoryAxis3.Append(crosses5); categoryAxis3.Append(autoLabeled3); categoryAxis3.Append(labelAlignment3); categoryAxis3.Append(labelOffset3); categoryAxis3.Append(noMultiLevelLabels3); C.ValueAxis valueAxis3 = new C.ValueAxis(); C.AxisId axisId12 = new C.AxisId(){ Val = (UInt32Value)209979944U }; C.Scaling scaling6 = new C.Scaling(); C.Orientation orientation6 = new C.Orientation(){ Val = C.OrientationValues.MinMax }; scaling6.Append(orientation6); C.Delete delete6 = new C.Delete(){ Val = false }; C.AxisPosition axisPosition6 = new C.AxisPosition(){ Val = C.AxisPositionValues.Left }; C.MajorGridlines majorGridlines3 = new C.MajorGridlines(); C.ChartShapeProperties chartShapeProperties8 = new C.ChartShapeProperties(); A.Outline outline27 = new A.Outline(){ Width = 9525, CapType = A.LineCapValues.Flat, CompoundLineType = A.CompoundLineValues.Single, Alignment = A.PenAlignmentValues.Center }; A.SolidFill solidFill34 = new A.SolidFill(); A.SchemeColor schemeColor22 = new A.SchemeColor(){ Val = A.SchemeColorValues.Text1 }; A.LuminanceModulation luminanceModulation7 = new A.LuminanceModulation(){ Val = 15000 }; A.LuminanceOffset luminanceOffset7 = new A.LuminanceOffset(){ Val = 85000 }; schemeColor22.Append(luminanceModulation7); schemeColor22.Append(luminanceOffset7); solidFill34.Append(schemeColor22); A.Round round3 = new A.Round(); outline27.Append(solidFill34); outline27.Append(round3); A.EffectList effectList21 = new A.EffectList(); chartShapeProperties8.Append(outline27); chartShapeProperties8.Append(effectList21); majorGridlines3.Append(chartShapeProperties8); C.NumberingFormat numberingFormat6 = new C.NumberingFormat(){ FormatCode = "General", SourceLinked = true }; C.MajorTickMark majorTickMark6 = new C.MajorTickMark(){ Val = C.TickMarkValues.None }; C.MinorTickMark minorTickMark6 = new C.MinorTickMark(){ Val = C.TickMarkValues.None }; C.TickLabelPosition tickLabelPosition6 = new C.TickLabelPosition(){ Val = C.TickLabelPositionValues.NextTo }; C.ChartShapeProperties chartShapeProperties9 = new C.ChartShapeProperties(); A.NoFill noFill23 = new A.NoFill(); A.Outline outline28 = new A.Outline(); A.NoFill noFill24 = new A.NoFill(); outline28.Append(noFill24); A.EffectList effectList22 = new A.EffectList(); chartShapeProperties9.Append(noFill23); chartShapeProperties9.Append(outline28); chartShapeProperties9.Append(effectList22); C.TextProperties textProperties6 = new C.TextProperties(); A.BodyProperties bodyProperties12 = new A.BodyProperties(){ Rotation = -60000000, UseParagraphSpacing = true, VerticalOverflow = A.TextVerticalOverflowValues.Ellipsis, Vertical = A.TextVerticalValues.Horizontal, Wrap = A.TextWrappingValues.Square, Anchor = A.TextAnchoringTypeValues.Center, AnchorCenter = true }; A.ListStyle listStyle12 = new A.ListStyle(); A.Paragraph paragraph12 = new A.Paragraph(); A.ParagraphProperties paragraphProperties6 = new A.ParagraphProperties(); A.DefaultRunProperties defaultRunProperties6 = new A.DefaultRunProperties(){ FontSize = 900, Kerning = 1200 }; A.SolidFill solidFill35 = new A.SolidFill(); A.SchemeColor schemeColor23 = new A.SchemeColor(){ Val = A.SchemeColorValues.Text1 }; A.LuminanceModulation luminanceModulation8 = new A.LuminanceModulation(){ Val = 65000 }; A.LuminanceOffset luminanceOffset8 = new A.LuminanceOffset(){ Val = 35000 }; schemeColor23.Append(luminanceModulation8); schemeColor23.Append(luminanceOffset8); solidFill35.Append(schemeColor23); A.LatinFont latinFont5 = new A.LatinFont(){ Typeface = "+mn-lt" }; A.EastAsianFont eastAsianFont5 = new A.EastAsianFont(){ Typeface = "+mn-ea" }; A.ComplexScriptFont complexScriptFont5 = new A.ComplexScriptFont(){ Typeface = "+mn-cs" }; defaultRunProperties6.Append(solidFill35); defaultRunProperties6.Append(latinFont5); defaultRunProperties6.Append(eastAsianFont5); defaultRunProperties6.Append(complexScriptFont5); paragraphProperties6.Append(defaultRunProperties6); A.EndParagraphRunProperties endParagraphRunProperties6 = new A.EndParagraphRunProperties(){ Language = "en-US" }; paragraph12.Append(paragraphProperties6); paragraph12.Append(endParagraphRunProperties6); textProperties6.Append(bodyProperties12); textProperties6.Append(listStyle12); textProperties6.Append(paragraph12); C.CrossingAxis crossingAxis6 = new C.CrossingAxis(){ Val = (UInt32Value)209979552U }; C.Crosses crosses6 = new C.Crosses(){ Val = C.CrossesValues.AutoZero }; C.CrossBetween crossBetween3 = new C.CrossBetween(){ Val = C.CrossBetweenValues.Between }; valueAxis3.Append(axisId12); valueAxis3.Append(scaling6); valueAxis3.Append(delete6); valueAxis3.Append(axisPosition6); valueAxis3.Append(majorGridlines3); valueAxis3.Append(numberingFormat6); valueAxis3.Append(majorTickMark6); valueAxis3.Append(minorTickMark6); valueAxis3.Append(tickLabelPosition6); valueAxis3.Append(chartShapeProperties9); valueAxis3.Append(textProperties6); valueAxis3.Append(crossingAxis6); valueAxis3.Append(crosses6); valueAxis3.Append(crossBetween3); C.ShapeProperties shapeProperties20 = new C.ShapeProperties(); A.SolidFill solidFill36 = new A.SolidFill(); A.SchemeColor schemeColor24 = new A.SchemeColor(){ Val = A.SchemeColorValues.Background1 }; solidFill36.Append(schemeColor24); A.Outline outline29 = new A.Outline(); A.NoFill noFill25 = new A.NoFill(); outline29.Append(noFill25); A.EffectList effectList23 = new A.EffectList(); shapeProperties20.Append(solidFill36); shapeProperties20.Append(outline29); shapeProperties20.Append(effectList23); plotArea6.Append(layout6); plotArea6.Append(barChart3); plotArea6.Append(categoryAxis3); plotArea6.Append(valueAxis3); plotArea6.Append(shapeProperties20); C.Legend legend6 = new C.Legend(); C.LegendPosition legendPosition6 = new C.LegendPosition(){ Val = C.LegendPositionValues.Bottom }; C.Overlay overlay12 = new C.Overlay(){ Val = false }; C.ChartShapeProperties chartShapeProperties10 = new C.ChartShapeProperties(); A.NoFill noFill26 = new A.NoFill(); A.Outline outline30 = new A.Outline(); A.NoFill noFill27 = new A.NoFill(); outline30.Append(noFill27); A.EffectList effectList24 = new A.EffectList(); chartShapeProperties10.Append(noFill26); chartShapeProperties10.Append(outline30); chartShapeProperties10.Append(effectList24); C.TextProperties textProperties7 = new C.TextProperties(); A.BodyProperties bodyProperties13 = new A.BodyProperties(){ Rotation = 0, UseParagraphSpacing = true, VerticalOverflow = A.TextVerticalOverflowValues.Ellipsis, Vertical = A.TextVerticalValues.Horizontal, Wrap = A.TextWrappingValues.Square, Anchor = A.TextAnchoringTypeValues.Center, AnchorCenter = true }; A.ListStyle listStyle13 = new A.ListStyle(); A.Paragraph paragraph13 = new A.Paragraph(); A.ParagraphProperties paragraphProperties7 = new A.ParagraphProperties(); A.DefaultRunProperties defaultRunProperties7 = new A.DefaultRunProperties(){ FontSize = 900, Kerning = 1200 }; A.SolidFill solidFill37 = new A.SolidFill(); A.SchemeColor schemeColor25 = new A.SchemeColor(){ Val = A.SchemeColorValues.Text1 }; A.LuminanceModulation luminanceModulation9 = new A.LuminanceModulation(){ Val = 65000 }; A.LuminanceOffset luminanceOffset9 = new A.LuminanceOffset(){ Val = 35000 }; schemeColor25.Append(luminanceModulation9); schemeColor25.Append(luminanceOffset9); solidFill37.Append(schemeColor25); A.LatinFont latinFont6 = new A.LatinFont(){ Typeface = "+mn-lt" }; A.EastAsianFont eastAsianFont6 = new A.EastAsianFont(){ Typeface = "+mn-ea" }; A.ComplexScriptFont complexScriptFont6 = new A.ComplexScriptFont(){ Typeface = "+mn-cs" }; defaultRunProperties7.Append(solidFill37); defaultRunProperties7.Append(latinFont6); defaultRunProperties7.Append(eastAsianFont6); defaultRunProperties7.Append(complexScriptFont6); paragraphProperties7.Append(defaultRunProperties7); A.EndParagraphRunProperties endParagraphRunProperties7 = new A.EndParagraphRunProperties(){ Language = "en-US" }; paragraph13.Append(paragraphProperties7); paragraph13.Append(endParagraphRunProperties7); textProperties7.Append(bodyProperties13); textProperties7.Append(listStyle13); textProperties7.Append(paragraph13); legend6.Append(legendPosition6); legend6.Append(overlay12); legend6.Append(chartShapeProperties10); legend6.Append(textProperties7); C.PlotVisibleOnly plotVisibleOnly6 = new C.PlotVisibleOnly(){ Val = true }; C.DisplayBlanksAs displayBlanksAs6 = new C.DisplayBlanksAs(){ Val = C.DisplayBlanksAsValues.Gap }; C.ShowDataLabelsOverMaximum showDataLabelsOverMaximum6 = new C.ShowDataLabelsOverMaximum(){ Val = false }; chart6.Append(title6); chart6.Append(autoTitleDeleted6); chart6.Append(pivotFormats6); chart6.Append(plotArea6); chart6.Append(legend6); chart6.Append(plotVisibleOnly6); chart6.Append(displayBlanksAs6); chart6.Append(showDataLabelsOverMaximum6); C.ShapeProperties shapeProperties21 = new C.ShapeProperties(); A.SolidFill solidFill38 = new A.SolidFill(); A.SchemeColor schemeColor26 = new A.SchemeColor(){ Val = A.SchemeColorValues.Background1 }; solidFill38.Append(schemeColor26); A.Outline outline31 = new A.Outline(){ Width = 9525, CapType = A.LineCapValues.Flat, CompoundLineType = A.CompoundLineValues.Single, Alignment = A.PenAlignmentValues.Center }; A.SolidFill solidFill39 = new A.SolidFill(); A.SchemeColor schemeColor27 = new A.SchemeColor(){ Val = A.SchemeColorValues.Text1 }; A.LuminanceModulation luminanceModulation10 = new A.LuminanceModulation(){ Val = 15000 }; A.LuminanceOffset luminanceOffset10 = new A.LuminanceOffset(){ Val = 85000 }; schemeColor27.Append(luminanceModulation10); schemeColor27.Append(luminanceOffset10); solidFill39.Append(schemeColor27); A.Round round4 = new A.Round(); outline31.Append(solidFill39); outline31.Append(round4); A.EffectList effectList25 = new A.EffectList(); shapeProperties21.Append(solidFill38); shapeProperties21.Append(outline31); shapeProperties21.Append(effectList25); C.TextProperties textProperties8 = new C.TextProperties(); A.BodyProperties bodyProperties14 = new A.BodyProperties(); A.ListStyle listStyle14 = new A.ListStyle(); A.Paragraph paragraph14 = new A.Paragraph(); A.ParagraphProperties paragraphProperties8 = new A.ParagraphProperties(); A.DefaultRunProperties defaultRunProperties8 = new A.DefaultRunProperties(); paragraphProperties8.Append(defaultRunProperties8); A.EndParagraphRunProperties endParagraphRunProperties8 = new A.EndParagraphRunProperties(){ Language = "en-US" }; paragraph14.Append(paragraphProperties8); paragraph14.Append(endParagraphRunProperties8); textProperties8.Append(bodyProperties14); textProperties8.Append(listStyle14); textProperties8.Append(paragraph14); C.PrintSettings printSettings6 = new C.PrintSettings(); C.HeaderFooter headerFooter6 = new C.HeaderFooter(); C.PageMargins pageMargins9 = new C.PageMargins(){ Left = 0.7D, Right = 0.7D, Top = 0.75D, Bottom = 0.75D, Header = 0.3D, Footer = 0.3D }; C.PageSetup pageSetup6 = new C.PageSetup(); printSettings6.Append(headerFooter6); printSettings6.Append(pageMargins9); printSettings6.Append(pageSetup6); C.ChartSpaceExtensionList chartSpaceExtensionList6 = new C.ChartSpaceExtensionList(); chartSpaceExtensionList6.AddNamespaceDeclaration("c14", "http://schemas.microsoft.com/office/drawing/2007/8/2/chart"); chartSpaceExtensionList6.AddNamespaceDeclaration("mc", "http://schemas.openxmlformats.org/markup-compatibility/2006"); C.ChartSpaceExtension chartSpaceExtension6 = new C.ChartSpaceExtension(){ Uri = "{781A3756-C4B2-4CAC-9D66-4F8BD8637D16}" }; chartSpaceExtension6.AddNamespaceDeclaration("c14", "http://schemas.microsoft.com/office/drawing/2007/8/2/chart"); C14.PivotOptions pivotOptions6 = new C14.PivotOptions(); C14.DropZoneFilter dropZoneFilter6 = new C14.DropZoneFilter(){ Val = true }; C14.DropZoneCategories dropZoneCategories6 = new C14.DropZoneCategories(){ Val = true }; C14.DropZoneData dropZoneData6 = new C14.DropZoneData(){ Val = true }; C14.DropZoneSeries dropZoneSeries6 = new C14.DropZoneSeries(){ Val = true }; C14.DropZonesVisible dropZonesVisible6 = new C14.DropZonesVisible(){ Val = true }; pivotOptions6.Append(dropZoneFilter6); pivotOptions6.Append(dropZoneCategories6); pivotOptions6.Append(dropZoneData6); pivotOptions6.Append(dropZoneSeries6); pivotOptions6.Append(dropZonesVisible6); chartSpaceExtension6.Append(pivotOptions6); chartSpaceExtensionList6.Append(chartSpaceExtension6); chartSpace6.Append(date19046); chartSpace6.Append(editingLanguage6); chartSpace6.Append(roundedCorners6); chartSpace6.Append(alternateContent13); chartSpace6.Append(pivotSource6); chartSpace6.Append(chart6); chartSpace6.Append(shapeProperties21); chartSpace6.Append(textProperties8); chartSpace6.Append(printSettings6); chartSpace6.Append(chartSpaceExtensionList6); chartPart6.ChartSpace = chartSpace6; }
// Generates content of chartPart5. private void GenerateChartPart5Content(ChartPart chartPart5) { C.ChartSpace chartSpace5 = new C.ChartSpace(); chartSpace5.AddNamespaceDeclaration("c", "http://schemas.openxmlformats.org/drawingml/2006/chart"); chartSpace5.AddNamespaceDeclaration("a", "http://schemas.openxmlformats.org/drawingml/2006/main"); chartSpace5.AddNamespaceDeclaration("r", "http://schemas.openxmlformats.org/officeDocument/2006/relationships"); C.Date1904 date19045 = new C.Date1904(){ Val = false }; C.EditingLanguage editingLanguage5 = new C.EditingLanguage(){ Val = "en-US" }; C.RoundedCorners roundedCorners5 = new C.RoundedCorners(){ Val = false }; AlternateContent alternateContent12 = new AlternateContent(); alternateContent12.AddNamespaceDeclaration("mc", "http://schemas.openxmlformats.org/markup-compatibility/2006"); AlternateContentChoice alternateContentChoice12 = new AlternateContentChoice(){ Requires = "c14" }; alternateContentChoice12.AddNamespaceDeclaration("c14", "http://schemas.microsoft.com/office/drawing/2007/8/2/chart"); C14.Style style9 = new C14.Style(){ Val = 102 }; alternateContentChoice12.Append(style9); AlternateContentFallback alternateContentFallback11 = new AlternateContentFallback(); C.Style style10 = new C.Style(){ Val = 2 }; alternateContentFallback11.Append(style10); alternateContent12.Append(alternateContentChoice12); alternateContent12.Append(alternateContentFallback11); C.PivotSource pivotSource5 = new C.PivotSource(); C.PivotTableName pivotTableName5 = new C.PivotTableName(); pivotTableName5.Text = "[GeneratedDocument.xlsx]ShowSelectionLabel!PivotTable1"; C.FormatId formatId5 = new C.FormatId(){ Val = (UInt32Value)12U }; pivotSource5.Append(pivotTableName5); pivotSource5.Append(formatId5); C.Chart chart5 = new C.Chart(); C.Title title5 = new C.Title(); C.Overlay overlay9 = new C.Overlay(){ Val = false }; title5.Append(overlay9); C.AutoTitleDeleted autoTitleDeleted5 = new C.AutoTitleDeleted(){ Val = false }; C.PivotFormats pivotFormats5 = new C.PivotFormats(); C.PivotFormat pivotFormat26 = new C.PivotFormat(); C.Index index30 = new C.Index(){ Val = (UInt32Value)0U }; C.Marker marker26 = new C.Marker(); C.Symbol symbol26 = new C.Symbol(){ Val = C.MarkerStyleValues.None }; marker26.Append(symbol26); pivotFormat26.Append(index30); pivotFormat26.Append(marker26); C.PivotFormat pivotFormat27 = new C.PivotFormat(); C.Index index31 = new C.Index(){ Val = (UInt32Value)1U }; C.Marker marker27 = new C.Marker(); C.Symbol symbol27 = new C.Symbol(){ Val = C.MarkerStyleValues.None }; marker27.Append(symbol27); pivotFormat27.Append(index31); pivotFormat27.Append(marker27); C.PivotFormat pivotFormat28 = new C.PivotFormat(); C.Index index32 = new C.Index(){ Val = (UInt32Value)2U }; C.Marker marker28 = new C.Marker(); C.Symbol symbol28 = new C.Symbol(){ Val = C.MarkerStyleValues.None }; marker28.Append(symbol28); pivotFormat28.Append(index32); pivotFormat28.Append(marker28); C.PivotFormat pivotFormat29 = new C.PivotFormat(); C.Index index33 = new C.Index(){ Val = (UInt32Value)3U }; C.Marker marker29 = new C.Marker(); C.Symbol symbol29 = new C.Symbol(){ Val = C.MarkerStyleValues.None }; marker29.Append(symbol29); pivotFormat29.Append(index33); pivotFormat29.Append(marker29); pivotFormats5.Append(pivotFormat26); pivotFormats5.Append(pivotFormat27); pivotFormats5.Append(pivotFormat28); pivotFormats5.Append(pivotFormat29); C.PlotArea plotArea5 = new C.PlotArea(); C.Layout layout5 = new C.Layout(); C.PieChart pieChart3 = new C.PieChart(); C.VaryColors varyColors5 = new C.VaryColors(){ Val = true }; C.PieChartSeries pieChartSeries3 = new C.PieChartSeries(); C.Index index34 = new C.Index(){ Val = (UInt32Value)0U }; C.Order order5 = new C.Order(){ Val = (UInt32Value)0U }; C.SeriesText seriesText5 = new C.SeriesText(); C.StringReference stringReference9 = new C.StringReference(); C.Formula formula13 = new C.Formula(); formula13.Text = "ShowSelectionLabel!$B$1"; C.StringCache stringCache9 = new C.StringCache(); C.PointCount pointCount13 = new C.PointCount(){ Val = (UInt32Value)1U }; C.StringPoint stringPoint17 = new C.StringPoint(){ Index = (UInt32Value)0U }; C.NumericValue numericValue29 = new C.NumericValue(); numericValue29.Text = "Total"; stringPoint17.Append(numericValue29); stringCache9.Append(pointCount13); stringCache9.Append(stringPoint17); stringReference9.Append(formula13); stringReference9.Append(stringCache9); seriesText5.Append(stringReference9); C.CategoryAxisData categoryAxisData5 = new C.CategoryAxisData(); C.StringReference stringReference10 = new C.StringReference(); C.Formula formula14 = new C.Formula(); formula14.Text = "ShowSelectionLabel!$A$2:$A$5"; C.StringCache stringCache10 = new C.StringCache(); C.PointCount pointCount14 = new C.PointCount(){ Val = (UInt32Value)3U }; C.StringPoint stringPoint18 = new C.StringPoint(){ Index = (UInt32Value)0U }; C.NumericValue numericValue30 = new C.NumericValue(); numericValue30.Text = "product_A"; stringPoint18.Append(numericValue30); C.StringPoint stringPoint19 = new C.StringPoint(){ Index = (UInt32Value)1U }; C.NumericValue numericValue31 = new C.NumericValue(); numericValue31.Text = "product_D"; stringPoint19.Append(numericValue31); C.StringPoint stringPoint20 = new C.StringPoint(){ Index = (UInt32Value)2U }; C.NumericValue numericValue32 = new C.NumericValue(); numericValue32.Text = "product_E"; stringPoint20.Append(numericValue32); stringCache10.Append(pointCount14); stringCache10.Append(stringPoint18); stringCache10.Append(stringPoint19); stringCache10.Append(stringPoint20); stringReference10.Append(formula14); stringReference10.Append(stringCache10); categoryAxisData5.Append(stringReference10); C.Values values5 = new C.Values(); C.NumberReference numberReference5 = new C.NumberReference(); C.Formula formula15 = new C.Formula(); formula15.Text = "ShowSelectionLabel!$B$2:$B$5"; C.NumberingCache numberingCache5 = new C.NumberingCache(); C.FormatCode formatCode5 = new C.FormatCode(); formatCode5.Text = "General"; C.PointCount pointCount15 = new C.PointCount(){ Val = (UInt32Value)3U }; C.NumericPoint numericPoint13 = new C.NumericPoint(){ Index = (UInt32Value)0U }; C.NumericValue numericValue33 = new C.NumericValue(); numericValue33.Text = "19"; numericPoint13.Append(numericValue33); C.NumericPoint numericPoint14 = new C.NumericPoint(){ Index = (UInt32Value)1U }; C.NumericValue numericValue34 = new C.NumericValue(); numericValue34.Text = "13"; numericPoint14.Append(numericValue34); C.NumericPoint numericPoint15 = new C.NumericPoint(){ Index = (UInt32Value)2U }; C.NumericValue numericValue35 = new C.NumericValue(); numericValue35.Text = "33"; numericPoint15.Append(numericValue35); numberingCache5.Append(formatCode5); numberingCache5.Append(pointCount15); numberingCache5.Append(numericPoint13); numberingCache5.Append(numericPoint14); numberingCache5.Append(numericPoint15); numberReference5.Append(formula15); numberReference5.Append(numberingCache5); values5.Append(numberReference5); pieChartSeries3.Append(index34); pieChartSeries3.Append(order5); pieChartSeries3.Append(seriesText5); pieChartSeries3.Append(categoryAxisData5); pieChartSeries3.Append(values5); C.DataLabels dataLabels5 = new C.DataLabels(); C.ShowLegendKey showLegendKey5 = new C.ShowLegendKey(){ Val = false }; C.ShowValue showValue5 = new C.ShowValue(){ Val = false }; C.ShowCategoryName showCategoryName5 = new C.ShowCategoryName(){ Val = false }; C.ShowSeriesName showSeriesName5 = new C.ShowSeriesName(){ Val = false }; C.ShowPercent showPercent5 = new C.ShowPercent(){ Val = false }; C.ShowBubbleSize showBubbleSize5 = new C.ShowBubbleSize(){ Val = false }; C.ShowLeaderLines showLeaderLines3 = new C.ShowLeaderLines(){ Val = true }; dataLabels5.Append(showLegendKey5); dataLabels5.Append(showValue5); dataLabels5.Append(showCategoryName5); dataLabels5.Append(showSeriesName5); dataLabels5.Append(showPercent5); dataLabels5.Append(showBubbleSize5); dataLabels5.Append(showLeaderLines3); C.FirstSliceAngle firstSliceAngle3 = new C.FirstSliceAngle(){ Val = (UInt16Value)0U }; pieChart3.Append(varyColors5); pieChart3.Append(pieChartSeries3); pieChart3.Append(dataLabels5); pieChart3.Append(firstSliceAngle3); plotArea5.Append(layout5); plotArea5.Append(pieChart3); C.Legend legend5 = new C.Legend(); C.LegendPosition legendPosition5 = new C.LegendPosition(){ Val = C.LegendPositionValues.Right }; C.Overlay overlay10 = new C.Overlay(){ Val = false }; legend5.Append(legendPosition5); legend5.Append(overlay10); C.PlotVisibleOnly plotVisibleOnly5 = new C.PlotVisibleOnly(){ Val = true }; C.DisplayBlanksAs displayBlanksAs5 = new C.DisplayBlanksAs(){ Val = C.DisplayBlanksAsValues.Gap }; C.ShowDataLabelsOverMaximum showDataLabelsOverMaximum5 = new C.ShowDataLabelsOverMaximum(){ Val = false }; chart5.Append(title5); chart5.Append(autoTitleDeleted5); chart5.Append(pivotFormats5); chart5.Append(plotArea5); chart5.Append(legend5); chart5.Append(plotVisibleOnly5); chart5.Append(displayBlanksAs5); chart5.Append(showDataLabelsOverMaximum5); C.PrintSettings printSettings5 = new C.PrintSettings(); C.HeaderFooter headerFooter5 = new C.HeaderFooter(); C.PageMargins pageMargins8 = new C.PageMargins(){ Left = 0.7D, Right = 0.7D, Top = 0.75D, Bottom = 0.75D, Header = 0.3D, Footer = 0.3D }; C.PageSetup pageSetup5 = new C.PageSetup(); printSettings5.Append(headerFooter5); printSettings5.Append(pageMargins8); printSettings5.Append(pageSetup5); C.ChartSpaceExtensionList chartSpaceExtensionList5 = new C.ChartSpaceExtensionList(); chartSpaceExtensionList5.AddNamespaceDeclaration("c14", "http://schemas.microsoft.com/office/drawing/2007/8/2/chart"); chartSpaceExtensionList5.AddNamespaceDeclaration("mc", "http://schemas.openxmlformats.org/markup-compatibility/2006"); C.ChartSpaceExtension chartSpaceExtension5 = new C.ChartSpaceExtension(){ Uri = "{781A3756-C4B2-4CAC-9D66-4F8BD8637D16}" }; chartSpaceExtension5.AddNamespaceDeclaration("c14", "http://schemas.microsoft.com/office/drawing/2007/8/2/chart"); C14.PivotOptions pivotOptions5 = new C14.PivotOptions(); C14.DropZoneFilter dropZoneFilter5 = new C14.DropZoneFilter(){ Val = true }; C14.DropZoneCategories dropZoneCategories5 = new C14.DropZoneCategories(){ Val = true }; C14.DropZoneData dropZoneData5 = new C14.DropZoneData(){ Val = true }; C14.DropZoneSeries dropZoneSeries5 = new C14.DropZoneSeries(){ Val = true }; C14.DropZonesVisible dropZonesVisible5 = new C14.DropZonesVisible(){ Val = true }; pivotOptions5.Append(dropZoneFilter5); pivotOptions5.Append(dropZoneCategories5); pivotOptions5.Append(dropZoneData5); pivotOptions5.Append(dropZoneSeries5); pivotOptions5.Append(dropZonesVisible5); chartSpaceExtension5.Append(pivotOptions5); chartSpaceExtensionList5.Append(chartSpaceExtension5); chartSpace5.Append(date19045); chartSpace5.Append(editingLanguage5); chartSpace5.Append(roundedCorners5); chartSpace5.Append(alternateContent12); chartSpace5.Append(pivotSource5); chartSpace5.Append(chart5); chartSpace5.Append(printSettings5); chartSpace5.Append(chartSpaceExtensionList5); chartPart5.ChartSpace = chartSpace5; }
// Generates content of chartPart4. private void GenerateChartPart4Content(ChartPart chartPart4) { C.ChartSpace chartSpace4 = new C.ChartSpace(); chartSpace4.AddNamespaceDeclaration("c", "http://schemas.openxmlformats.org/drawingml/2006/chart"); chartSpace4.AddNamespaceDeclaration("a", "http://schemas.openxmlformats.org/drawingml/2006/main"); chartSpace4.AddNamespaceDeclaration("r", "http://schemas.openxmlformats.org/officeDocument/2006/relationships"); C.Date1904 date19044 = new C.Date1904(){ Val = false }; C.EditingLanguage editingLanguage4 = new C.EditingLanguage(){ Val = "en-US" }; C.RoundedCorners roundedCorners4 = new C.RoundedCorners(){ Val = false }; AlternateContent alternateContent9 = new AlternateContent(); alternateContent9.AddNamespaceDeclaration("mc", "http://schemas.openxmlformats.org/markup-compatibility/2006"); AlternateContentChoice alternateContentChoice9 = new AlternateContentChoice(){ Requires = "c14" }; alternateContentChoice9.AddNamespaceDeclaration("c14", "http://schemas.microsoft.com/office/drawing/2007/8/2/chart"); C14.Style style7 = new C14.Style(){ Val = 102 }; alternateContentChoice9.Append(style7); AlternateContentFallback alternateContentFallback8 = new AlternateContentFallback(); C.Style style8 = new C.Style(){ Val = 2 }; alternateContentFallback8.Append(style8); alternateContent9.Append(alternateContentChoice9); alternateContent9.Append(alternateContentFallback8); C.PivotSource pivotSource4 = new C.PivotSource(); C.PivotTableName pivotTableName4 = new C.PivotTableName(); pivotTableName4.Text = "[GeneratedDocument.xlsx]Cache!PivotTable1"; C.FormatId formatId4 = new C.FormatId(){ Val = (UInt32Value)0U }; pivotSource4.Append(pivotTableName4); pivotSource4.Append(formatId4); C.Chart chart4 = new C.Chart(); C.Title title4 = new C.Title(); C.Overlay overlay7 = new C.Overlay(){ Val = false }; title4.Append(overlay7); C.AutoTitleDeleted autoTitleDeleted4 = new C.AutoTitleDeleted(){ Val = false }; C.PivotFormats pivotFormats4 = new C.PivotFormats(); C.PivotFormat pivotFormat25 = new C.PivotFormat(); C.Index index28 = new C.Index(){ Val = (UInt32Value)0U }; C.Marker marker25 = new C.Marker(); C.Symbol symbol25 = new C.Symbol(){ Val = C.MarkerStyleValues.None }; marker25.Append(symbol25); pivotFormat25.Append(index28); pivotFormat25.Append(marker25); pivotFormats4.Append(pivotFormat25); C.PlotArea plotArea4 = new C.PlotArea(); C.Layout layout4 = new C.Layout(); C.BarChart barChart2 = new C.BarChart(); C.BarDirection barDirection2 = new C.BarDirection(){ Val = C.BarDirectionValues.Column }; C.BarGrouping barGrouping2 = new C.BarGrouping(){ Val = C.BarGroupingValues.Clustered }; C.VaryColors varyColors4 = new C.VaryColors(){ Val = false }; C.BarChartSeries barChartSeries2 = new C.BarChartSeries(); C.Index index29 = new C.Index(){ Val = (UInt32Value)0U }; C.Order order4 = new C.Order(){ Val = (UInt32Value)0U }; C.SeriesText seriesText4 = new C.SeriesText(); C.StringReference stringReference7 = new C.StringReference(); C.Formula formula10 = new C.Formula(); formula10.Text = "Cache!$B$1"; C.StringCache stringCache7 = new C.StringCache(); C.PointCount pointCount10 = new C.PointCount(){ Val = (UInt32Value)1U }; C.StringPoint stringPoint13 = new C.StringPoint(){ Index = (UInt32Value)0U }; C.NumericValue numericValue22 = new C.NumericValue(); numericValue22.Text = "Total"; stringPoint13.Append(numericValue22); stringCache7.Append(pointCount10); stringCache7.Append(stringPoint13); stringReference7.Append(formula10); stringReference7.Append(stringCache7); seriesText4.Append(stringReference7); C.InvertIfNegative invertIfNegative2 = new C.InvertIfNegative(){ Val = false }; C.CategoryAxisData categoryAxisData4 = new C.CategoryAxisData(); C.StringReference stringReference8 = new C.StringReference(); C.Formula formula11 = new C.Formula(); formula11.Text = "Cache!$A$2:$A$5"; C.StringCache stringCache8 = new C.StringCache(); C.PointCount pointCount11 = new C.PointCount(){ Val = (UInt32Value)3U }; C.StringPoint stringPoint14 = new C.StringPoint(){ Index = (UInt32Value)0U }; C.NumericValue numericValue23 = new C.NumericValue(); numericValue23.Text = "product_C"; stringPoint14.Append(numericValue23); C.StringPoint stringPoint15 = new C.StringPoint(){ Index = (UInt32Value)1U }; C.NumericValue numericValue24 = new C.NumericValue(); numericValue24.Text = "product_F"; stringPoint15.Append(numericValue24); C.StringPoint stringPoint16 = new C.StringPoint(){ Index = (UInt32Value)2U }; C.NumericValue numericValue25 = new C.NumericValue(); numericValue25.Text = "product_G"; stringPoint16.Append(numericValue25); stringCache8.Append(pointCount11); stringCache8.Append(stringPoint14); stringCache8.Append(stringPoint15); stringCache8.Append(stringPoint16); stringReference8.Append(formula11); stringReference8.Append(stringCache8); categoryAxisData4.Append(stringReference8); C.Values values4 = new C.Values(); C.NumberReference numberReference4 = new C.NumberReference(); C.Formula formula12 = new C.Formula(); formula12.Text = "Cache!$B$2:$B$5"; C.NumberingCache numberingCache4 = new C.NumberingCache(); C.FormatCode formatCode4 = new C.FormatCode(); formatCode4.Text = "General"; C.PointCount pointCount12 = new C.PointCount(){ Val = (UInt32Value)3U }; C.NumericPoint numericPoint10 = new C.NumericPoint(){ Index = (UInt32Value)0U }; C.NumericValue numericValue26 = new C.NumericValue(); numericValue26.Text = "2050"; numericPoint10.Append(numericValue26); C.NumericPoint numericPoint11 = new C.NumericPoint(){ Index = (UInt32Value)1U }; C.NumericValue numericValue27 = new C.NumericValue(); numericValue27.Text = "3168"; numericPoint11.Append(numericValue27); C.NumericPoint numericPoint12 = new C.NumericPoint(){ Index = (UInt32Value)2U }; C.NumericValue numericValue28 = new C.NumericValue(); numericValue28.Text = "11529"; numericPoint12.Append(numericValue28); numberingCache4.Append(formatCode4); numberingCache4.Append(pointCount12); numberingCache4.Append(numericPoint10); numberingCache4.Append(numericPoint11); numberingCache4.Append(numericPoint12); numberReference4.Append(formula12); numberReference4.Append(numberingCache4); values4.Append(numberReference4); barChartSeries2.Append(index29); barChartSeries2.Append(order4); barChartSeries2.Append(seriesText4); barChartSeries2.Append(invertIfNegative2); barChartSeries2.Append(categoryAxisData4); barChartSeries2.Append(values4); C.DataLabels dataLabels4 = new C.DataLabels(); C.ShowLegendKey showLegendKey4 = new C.ShowLegendKey(){ Val = false }; C.ShowValue showValue4 = new C.ShowValue(){ Val = false }; C.ShowCategoryName showCategoryName4 = new C.ShowCategoryName(){ Val = false }; C.ShowSeriesName showSeriesName4 = new C.ShowSeriesName(){ Val = false }; C.ShowPercent showPercent4 = new C.ShowPercent(){ Val = false }; C.ShowBubbleSize showBubbleSize4 = new C.ShowBubbleSize(){ Val = false }; dataLabels4.Append(showLegendKey4); dataLabels4.Append(showValue4); dataLabels4.Append(showCategoryName4); dataLabels4.Append(showSeriesName4); dataLabels4.Append(showPercent4); dataLabels4.Append(showBubbleSize4); C.GapWidth gapWidth2 = new C.GapWidth(){ Val = (UInt16Value)150U }; C.AxisId axisId5 = new C.AxisId(){ Val = (UInt32Value)164427248U }; C.AxisId axisId6 = new C.AxisId(){ Val = (UInt32Value)164427632U }; barChart2.Append(barDirection2); barChart2.Append(barGrouping2); barChart2.Append(varyColors4); barChart2.Append(barChartSeries2); barChart2.Append(dataLabels4); barChart2.Append(gapWidth2); barChart2.Append(axisId5); barChart2.Append(axisId6); C.CategoryAxis categoryAxis2 = new C.CategoryAxis(); C.AxisId axisId7 = new C.AxisId(){ Val = (UInt32Value)164427248U }; C.Scaling scaling3 = new C.Scaling(); C.Orientation orientation3 = new C.Orientation(){ Val = C.OrientationValues.MinMax }; scaling3.Append(orientation3); C.Delete delete3 = new C.Delete(){ Val = false }; C.AxisPosition axisPosition3 = new C.AxisPosition(){ Val = C.AxisPositionValues.Bottom }; C.NumberingFormat numberingFormat3 = new C.NumberingFormat(){ FormatCode = "General", SourceLinked = false }; C.MajorTickMark majorTickMark3 = new C.MajorTickMark(){ Val = C.TickMarkValues.Outside }; C.MinorTickMark minorTickMark3 = new C.MinorTickMark(){ Val = C.TickMarkValues.None }; C.TickLabelPosition tickLabelPosition3 = new C.TickLabelPosition(){ Val = C.TickLabelPositionValues.NextTo }; C.CrossingAxis crossingAxis3 = new C.CrossingAxis(){ Val = (UInt32Value)164427632U }; C.Crosses crosses3 = new C.Crosses(){ Val = C.CrossesValues.AutoZero }; C.AutoLabeled autoLabeled2 = new C.AutoLabeled(){ Val = true }; C.LabelAlignment labelAlignment2 = new C.LabelAlignment(){ Val = C.LabelAlignmentValues.Center }; C.LabelOffset labelOffset2 = new C.LabelOffset(){ Val = (UInt16Value)100U }; C.NoMultiLevelLabels noMultiLevelLabels2 = new C.NoMultiLevelLabels(){ Val = false }; categoryAxis2.Append(axisId7); categoryAxis2.Append(scaling3); categoryAxis2.Append(delete3); categoryAxis2.Append(axisPosition3); categoryAxis2.Append(numberingFormat3); categoryAxis2.Append(majorTickMark3); categoryAxis2.Append(minorTickMark3); categoryAxis2.Append(tickLabelPosition3); categoryAxis2.Append(crossingAxis3); categoryAxis2.Append(crosses3); categoryAxis2.Append(autoLabeled2); categoryAxis2.Append(labelAlignment2); categoryAxis2.Append(labelOffset2); categoryAxis2.Append(noMultiLevelLabels2); C.ValueAxis valueAxis2 = new C.ValueAxis(); C.AxisId axisId8 = new C.AxisId(){ Val = (UInt32Value)164427632U }; C.Scaling scaling4 = new C.Scaling(); C.Orientation orientation4 = new C.Orientation(){ Val = C.OrientationValues.MinMax }; scaling4.Append(orientation4); C.Delete delete4 = new C.Delete(){ Val = false }; C.AxisPosition axisPosition4 = new C.AxisPosition(){ Val = C.AxisPositionValues.Left }; C.MajorGridlines majorGridlines2 = new C.MajorGridlines(); C.NumberingFormat numberingFormat4 = new C.NumberingFormat(){ FormatCode = "General", SourceLinked = true }; C.MajorTickMark majorTickMark4 = new C.MajorTickMark(){ Val = C.TickMarkValues.Outside }; C.MinorTickMark minorTickMark4 = new C.MinorTickMark(){ Val = C.TickMarkValues.None }; C.TickLabelPosition tickLabelPosition4 = new C.TickLabelPosition(){ Val = C.TickLabelPositionValues.NextTo }; C.CrossingAxis crossingAxis4 = new C.CrossingAxis(){ Val = (UInt32Value)164427248U }; C.Crosses crosses4 = new C.Crosses(){ Val = C.CrossesValues.AutoZero }; C.CrossBetween crossBetween2 = new C.CrossBetween(){ Val = C.CrossBetweenValues.Between }; valueAxis2.Append(axisId8); valueAxis2.Append(scaling4); valueAxis2.Append(delete4); valueAxis2.Append(axisPosition4); valueAxis2.Append(majorGridlines2); valueAxis2.Append(numberingFormat4); valueAxis2.Append(majorTickMark4); valueAxis2.Append(minorTickMark4); valueAxis2.Append(tickLabelPosition4); valueAxis2.Append(crossingAxis4); valueAxis2.Append(crosses4); valueAxis2.Append(crossBetween2); plotArea4.Append(layout4); plotArea4.Append(barChart2); plotArea4.Append(categoryAxis2); plotArea4.Append(valueAxis2); C.Legend legend4 = new C.Legend(); C.LegendPosition legendPosition4 = new C.LegendPosition(){ Val = C.LegendPositionValues.Right }; C.Overlay overlay8 = new C.Overlay(){ Val = false }; legend4.Append(legendPosition4); legend4.Append(overlay8); C.PlotVisibleOnly plotVisibleOnly4 = new C.PlotVisibleOnly(){ Val = true }; C.DisplayBlanksAs displayBlanksAs4 = new C.DisplayBlanksAs(){ Val = C.DisplayBlanksAsValues.Gap }; C.ShowDataLabelsOverMaximum showDataLabelsOverMaximum4 = new C.ShowDataLabelsOverMaximum(){ Val = false }; chart4.Append(title4); chart4.Append(autoTitleDeleted4); chart4.Append(pivotFormats4); chart4.Append(plotArea4); chart4.Append(legend4); chart4.Append(plotVisibleOnly4); chart4.Append(displayBlanksAs4); chart4.Append(showDataLabelsOverMaximum4); C.PrintSettings printSettings4 = new C.PrintSettings(); C.HeaderFooter headerFooter4 = new C.HeaderFooter(); C.PageMargins pageMargins6 = new C.PageMargins(){ Left = 0.7D, Right = 0.7D, Top = 0.75D, Bottom = 0.75D, Header = 0.3D, Footer = 0.3D }; C.PageSetup pageSetup4 = new C.PageSetup(); printSettings4.Append(headerFooter4); printSettings4.Append(pageMargins6); printSettings4.Append(pageSetup4); C.ChartSpaceExtensionList chartSpaceExtensionList4 = new C.ChartSpaceExtensionList(); chartSpaceExtensionList4.AddNamespaceDeclaration("c14", "http://schemas.microsoft.com/office/drawing/2007/8/2/chart"); chartSpaceExtensionList4.AddNamespaceDeclaration("mc", "http://schemas.openxmlformats.org/markup-compatibility/2006"); C.ChartSpaceExtension chartSpaceExtension4 = new C.ChartSpaceExtension(){ Uri = "{781A3756-C4B2-4CAC-9D66-4F8BD8637D16}" }; chartSpaceExtension4.AddNamespaceDeclaration("c14", "http://schemas.microsoft.com/office/drawing/2007/8/2/chart"); C14.PivotOptions pivotOptions4 = new C14.PivotOptions(); C14.DropZoneFilter dropZoneFilter4 = new C14.DropZoneFilter(){ Val = true }; C14.DropZoneCategories dropZoneCategories4 = new C14.DropZoneCategories(){ Val = true }; C14.DropZoneData dropZoneData4 = new C14.DropZoneData(){ Val = true }; C14.DropZoneSeries dropZoneSeries4 = new C14.DropZoneSeries(){ Val = true }; C14.DropZonesVisible dropZonesVisible4 = new C14.DropZonesVisible(){ Val = true }; pivotOptions4.Append(dropZoneFilter4); pivotOptions4.Append(dropZoneCategories4); pivotOptions4.Append(dropZoneData4); pivotOptions4.Append(dropZoneSeries4); pivotOptions4.Append(dropZonesVisible4); chartSpaceExtension4.Append(pivotOptions4); chartSpaceExtensionList4.Append(chartSpaceExtension4); chartSpace4.Append(date19044); chartSpace4.Append(editingLanguage4); chartSpace4.Append(roundedCorners4); chartSpace4.Append(alternateContent9); chartSpace4.Append(pivotSource4); chartSpace4.Append(chart4); chartSpace4.Append(printSettings4); chartSpace4.Append(chartSpaceExtensionList4); chartPart4.ChartSpace = chartSpace4; }
// Generates content of chartPart3. private void GenerateChartPart3Content(ChartPart chartPart3) { C.ChartSpace chartSpace3 = new C.ChartSpace(); chartSpace3.AddNamespaceDeclaration("c", "http://schemas.openxmlformats.org/drawingml/2006/chart"); chartSpace3.AddNamespaceDeclaration("a", "http://schemas.openxmlformats.org/drawingml/2006/main"); chartSpace3.AddNamespaceDeclaration("r", "http://schemas.openxmlformats.org/officeDocument/2006/relationships"); C.Date1904 date19043 = new C.Date1904(){ Val = false }; C.EditingLanguage editingLanguage3 = new C.EditingLanguage(){ Val = "en-US" }; C.RoundedCorners roundedCorners3 = new C.RoundedCorners(){ Val = false }; AlternateContent alternateContent8 = new AlternateContent(); alternateContent8.AddNamespaceDeclaration("mc", "http://schemas.openxmlformats.org/markup-compatibility/2006"); AlternateContentChoice alternateContentChoice8 = new AlternateContentChoice(){ Requires = "c14" }; alternateContentChoice8.AddNamespaceDeclaration("c14", "http://schemas.microsoft.com/office/drawing/2007/8/2/chart"); C14.Style style5 = new C14.Style(){ Val = 102 }; alternateContentChoice8.Append(style5); AlternateContentFallback alternateContentFallback7 = new AlternateContentFallback(); C.Style style6 = new C.Style(){ Val = 2 }; alternateContentFallback7.Append(style6); alternateContent8.Append(alternateContentChoice8); alternateContent8.Append(alternateContentFallback7); C.PivotSource pivotSource3 = new C.PivotSource(); C.PivotTableName pivotTableName3 = new C.PivotTableName(); pivotTableName3.Text = "[GeneratedDocument.xlsx]Cache!PivotTable1"; C.FormatId formatId3 = new C.FormatId(){ Val = (UInt32Value)1U }; pivotSource3.Append(pivotTableName3); pivotSource3.Append(formatId3); C.Chart chart3 = new C.Chart(); C.Title title3 = new C.Title(); C.Overlay overlay5 = new C.Overlay(){ Val = false }; title3.Append(overlay5); C.AutoTitleDeleted autoTitleDeleted3 = new C.AutoTitleDeleted(){ Val = false }; C.PivotFormats pivotFormats3 = new C.PivotFormats(); C.PivotFormat pivotFormat24 = new C.PivotFormat(); C.Index index26 = new C.Index(){ Val = (UInt32Value)0U }; C.Marker marker24 = new C.Marker(); C.Symbol symbol24 = new C.Symbol(){ Val = C.MarkerStyleValues.None }; marker24.Append(symbol24); pivotFormat24.Append(index26); pivotFormat24.Append(marker24); pivotFormats3.Append(pivotFormat24); C.PlotArea plotArea3 = new C.PlotArea(); C.Layout layout3 = new C.Layout(); C.PieChart pieChart2 = new C.PieChart(); C.VaryColors varyColors3 = new C.VaryColors(){ Val = true }; C.PieChartSeries pieChartSeries2 = new C.PieChartSeries(); C.Index index27 = new C.Index(){ Val = (UInt32Value)0U }; C.Order order3 = new C.Order(){ Val = (UInt32Value)0U }; C.SeriesText seriesText3 = new C.SeriesText(); C.StringReference stringReference5 = new C.StringReference(); C.Formula formula7 = new C.Formula(); formula7.Text = "Cache!$B$1"; C.StringCache stringCache5 = new C.StringCache(); C.PointCount pointCount7 = new C.PointCount(){ Val = (UInt32Value)1U }; C.StringPoint stringPoint9 = new C.StringPoint(){ Index = (UInt32Value)0U }; C.NumericValue numericValue15 = new C.NumericValue(); numericValue15.Text = "Total"; stringPoint9.Append(numericValue15); stringCache5.Append(pointCount7); stringCache5.Append(stringPoint9); stringReference5.Append(formula7); stringReference5.Append(stringCache5); seriesText3.Append(stringReference5); C.CategoryAxisData categoryAxisData3 = new C.CategoryAxisData(); C.StringReference stringReference6 = new C.StringReference(); C.Formula formula8 = new C.Formula(); formula8.Text = "Cache!$A$2:$A$5"; C.StringCache stringCache6 = new C.StringCache(); C.PointCount pointCount8 = new C.PointCount(){ Val = (UInt32Value)3U }; C.StringPoint stringPoint10 = new C.StringPoint(){ Index = (UInt32Value)0U }; C.NumericValue numericValue16 = new C.NumericValue(); numericValue16.Text = "product_C"; stringPoint10.Append(numericValue16); C.StringPoint stringPoint11 = new C.StringPoint(){ Index = (UInt32Value)1U }; C.NumericValue numericValue17 = new C.NumericValue(); numericValue17.Text = "product_F"; stringPoint11.Append(numericValue17); C.StringPoint stringPoint12 = new C.StringPoint(){ Index = (UInt32Value)2U }; C.NumericValue numericValue18 = new C.NumericValue(); numericValue18.Text = "product_G"; stringPoint12.Append(numericValue18); stringCache6.Append(pointCount8); stringCache6.Append(stringPoint10); stringCache6.Append(stringPoint11); stringCache6.Append(stringPoint12); stringReference6.Append(formula8); stringReference6.Append(stringCache6); categoryAxisData3.Append(stringReference6); C.Values values3 = new C.Values(); C.NumberReference numberReference3 = new C.NumberReference(); C.Formula formula9 = new C.Formula(); formula9.Text = "Cache!$B$2:$B$5"; C.NumberingCache numberingCache3 = new C.NumberingCache(); C.FormatCode formatCode3 = new C.FormatCode(); formatCode3.Text = "General"; C.PointCount pointCount9 = new C.PointCount(){ Val = (UInt32Value)3U }; C.NumericPoint numericPoint7 = new C.NumericPoint(){ Index = (UInt32Value)0U }; C.NumericValue numericValue19 = new C.NumericValue(); numericValue19.Text = "2050"; numericPoint7.Append(numericValue19); C.NumericPoint numericPoint8 = new C.NumericPoint(){ Index = (UInt32Value)1U }; C.NumericValue numericValue20 = new C.NumericValue(); numericValue20.Text = "3168"; numericPoint8.Append(numericValue20); C.NumericPoint numericPoint9 = new C.NumericPoint(){ Index = (UInt32Value)2U }; C.NumericValue numericValue21 = new C.NumericValue(); numericValue21.Text = "11529"; numericPoint9.Append(numericValue21); numberingCache3.Append(formatCode3); numberingCache3.Append(pointCount9); numberingCache3.Append(numericPoint7); numberingCache3.Append(numericPoint8); numberingCache3.Append(numericPoint9); numberReference3.Append(formula9); numberReference3.Append(numberingCache3); values3.Append(numberReference3); pieChartSeries2.Append(index27); pieChartSeries2.Append(order3); pieChartSeries2.Append(seriesText3); pieChartSeries2.Append(categoryAxisData3); pieChartSeries2.Append(values3); C.DataLabels dataLabels3 = new C.DataLabels(); C.ShowLegendKey showLegendKey3 = new C.ShowLegendKey(){ Val = false }; C.ShowValue showValue3 = new C.ShowValue(){ Val = false }; C.ShowCategoryName showCategoryName3 = new C.ShowCategoryName(){ Val = false }; C.ShowSeriesName showSeriesName3 = new C.ShowSeriesName(){ Val = false }; C.ShowPercent showPercent3 = new C.ShowPercent(){ Val = false }; C.ShowBubbleSize showBubbleSize3 = new C.ShowBubbleSize(){ Val = false }; C.ShowLeaderLines showLeaderLines2 = new C.ShowLeaderLines(){ Val = true }; dataLabels3.Append(showLegendKey3); dataLabels3.Append(showValue3); dataLabels3.Append(showCategoryName3); dataLabels3.Append(showSeriesName3); dataLabels3.Append(showPercent3); dataLabels3.Append(showBubbleSize3); dataLabels3.Append(showLeaderLines2); C.FirstSliceAngle firstSliceAngle2 = new C.FirstSliceAngle(){ Val = (UInt16Value)0U }; pieChart2.Append(varyColors3); pieChart2.Append(pieChartSeries2); pieChart2.Append(dataLabels3); pieChart2.Append(firstSliceAngle2); plotArea3.Append(layout3); plotArea3.Append(pieChart2); C.Legend legend3 = new C.Legend(); C.LegendPosition legendPosition3 = new C.LegendPosition(){ Val = C.LegendPositionValues.Right }; C.Overlay overlay6 = new C.Overlay(){ Val = false }; legend3.Append(legendPosition3); legend3.Append(overlay6); C.PlotVisibleOnly plotVisibleOnly3 = new C.PlotVisibleOnly(){ Val = true }; C.DisplayBlanksAs displayBlanksAs3 = new C.DisplayBlanksAs(){ Val = C.DisplayBlanksAsValues.Gap }; C.ShowDataLabelsOverMaximum showDataLabelsOverMaximum3 = new C.ShowDataLabelsOverMaximum(){ Val = false }; chart3.Append(title3); chart3.Append(autoTitleDeleted3); chart3.Append(pivotFormats3); chart3.Append(plotArea3); chart3.Append(legend3); chart3.Append(plotVisibleOnly3); chart3.Append(displayBlanksAs3); chart3.Append(showDataLabelsOverMaximum3); C.PrintSettings printSettings3 = new C.PrintSettings(); C.HeaderFooter headerFooter3 = new C.HeaderFooter(); C.PageMargins pageMargins5 = new C.PageMargins(){ Left = 0.7D, Right = 0.7D, Top = 0.75D, Bottom = 0.75D, Header = 0.3D, Footer = 0.3D }; C.PageSetup pageSetup3 = new C.PageSetup(); printSettings3.Append(headerFooter3); printSettings3.Append(pageMargins5); printSettings3.Append(pageSetup3); C.ChartSpaceExtensionList chartSpaceExtensionList3 = new C.ChartSpaceExtensionList(); chartSpaceExtensionList3.AddNamespaceDeclaration("c14", "http://schemas.microsoft.com/office/drawing/2007/8/2/chart"); chartSpaceExtensionList3.AddNamespaceDeclaration("mc", "http://schemas.openxmlformats.org/markup-compatibility/2006"); C.ChartSpaceExtension chartSpaceExtension3 = new C.ChartSpaceExtension(){ Uri = "{781A3756-C4B2-4CAC-9D66-4F8BD8637D16}" }; chartSpaceExtension3.AddNamespaceDeclaration("c14", "http://schemas.microsoft.com/office/drawing/2007/8/2/chart"); C14.PivotOptions pivotOptions3 = new C14.PivotOptions(); C14.DropZoneFilter dropZoneFilter3 = new C14.DropZoneFilter(){ Val = true }; C14.DropZoneCategories dropZoneCategories3 = new C14.DropZoneCategories(){ Val = true }; C14.DropZoneData dropZoneData3 = new C14.DropZoneData(){ Val = true }; C14.DropZoneSeries dropZoneSeries3 = new C14.DropZoneSeries(){ Val = true }; C14.DropZonesVisible dropZonesVisible3 = new C14.DropZonesVisible(){ Val = true }; pivotOptions3.Append(dropZoneFilter3); pivotOptions3.Append(dropZoneCategories3); pivotOptions3.Append(dropZoneData3); pivotOptions3.Append(dropZoneSeries3); pivotOptions3.Append(dropZonesVisible3); chartSpaceExtension3.Append(pivotOptions3); chartSpaceExtensionList3.Append(chartSpaceExtension3); chartSpace3.Append(date19043); chartSpace3.Append(editingLanguage3); chartSpace3.Append(roundedCorners3); chartSpace3.Append(alternateContent8); chartSpace3.Append(pivotSource3); chartSpace3.Append(chart3); chartSpace3.Append(printSettings3); chartSpace3.Append(chartSpaceExtensionList3); chartPart3.ChartSpace = chartSpace3; }
// Generates content of chartPart18. private void GenerateChartPart18Content(ChartPart chartPart18) { C.ChartSpace chartSpace18 = new C.ChartSpace(); chartSpace18.AddNamespaceDeclaration("c", "http://schemas.openxmlformats.org/drawingml/2006/chart"); chartSpace18.AddNamespaceDeclaration("a", "http://schemas.openxmlformats.org/drawingml/2006/main"); chartSpace18.AddNamespaceDeclaration("r", "http://schemas.openxmlformats.org/officeDocument/2006/relationships"); C.Date1904 date190418 = new C.Date1904(){ Val = false }; C.EditingLanguage editingLanguage18 = new C.EditingLanguage(){ Val = "en-US" }; C.RoundedCorners roundedCorners18 = new C.RoundedCorners(){ Val = false }; AlternateContent alternateContent38 = new AlternateContent(); alternateContent38.AddNamespaceDeclaration("mc", "http://schemas.openxmlformats.org/markup-compatibility/2006"); AlternateContentChoice alternateContentChoice38 = new AlternateContentChoice(){ Requires = "c14" }; alternateContentChoice38.AddNamespaceDeclaration("c14", "http://schemas.microsoft.com/office/drawing/2007/8/2/chart"); C14.Style style34 = new C14.Style(){ Val = 101 }; alternateContentChoice38.Append(style34); AlternateContentFallback alternateContentFallback37 = new AlternateContentFallback(); C.Style style35 = new C.Style(){ Val = 1 }; alternateContentFallback37.Append(style35); alternateContent38.Append(alternateContentChoice38); alternateContent38.Append(alternateContentFallback37); C.PivotSource pivotSource18 = new C.PivotSource(); C.PivotTableName pivotTableName18 = new C.PivotTableName(); pivotTableName18.Text = "[GeneratedDocument.xlsx]ShowHorizontalScrollbar!PivotTable1"; C.FormatId formatId18 = new C.FormatId(){ Val = (UInt32Value)15U }; pivotSource18.Append(pivotTableName18); pivotSource18.Append(formatId18); C.Chart chart18 = new C.Chart(); C.Title title18 = new C.Title(); C.Overlay overlay35 = new C.Overlay(){ Val = false }; title18.Append(overlay35); C.AutoTitleDeleted autoTitleDeleted18 = new C.AutoTitleDeleted(){ Val = false }; C.PivotFormats pivotFormats18 = new C.PivotFormats(); C.PivotFormat pivotFormat160 = new C.PivotFormat(); C.Index index177 = new C.Index(){ Val = (UInt32Value)0U }; C.ShapeProperties shapeProperties72 = new C.ShapeProperties(); A.SolidFill solidFill139 = new A.SolidFill(); A.SchemeColor schemeColor109 = new A.SchemeColor(){ Val = A.SchemeColorValues.Accent1 }; A.Tint tint47 = new A.Tint(){ Val = 100000 }; schemeColor109.Append(tint47); solidFill139.Append(schemeColor109); A.Outline outline110 = new A.Outline(); A.NoFill noFill94 = new A.NoFill(); outline110.Append(noFill94); A.EffectList effectList90 = new A.EffectList(); shapeProperties72.Append(solidFill139); shapeProperties72.Append(outline110); shapeProperties72.Append(effectList90); C.Marker marker160 = new C.Marker(); C.Symbol symbol160 = new C.Symbol(){ Val = C.MarkerStyleValues.None }; marker160.Append(symbol160); pivotFormat160.Append(index177); pivotFormat160.Append(shapeProperties72); pivotFormat160.Append(marker160); C.PivotFormat pivotFormat161 = new C.PivotFormat(); C.Index index178 = new C.Index(){ Val = (UInt32Value)1U }; C.ShapeProperties shapeProperties73 = new C.ShapeProperties(); A.SolidFill solidFill140 = new A.SolidFill(); A.SchemeColor schemeColor110 = new A.SchemeColor(){ Val = A.SchemeColorValues.Accent2 }; A.Tint tint48 = new A.Tint(){ Val = 100000 }; schemeColor110.Append(tint48); solidFill140.Append(schemeColor110); A.Outline outline111 = new A.Outline(); A.NoFill noFill95 = new A.NoFill(); outline111.Append(noFill95); A.EffectList effectList91 = new A.EffectList(); shapeProperties73.Append(solidFill140); shapeProperties73.Append(outline111); shapeProperties73.Append(effectList91); C.Marker marker161 = new C.Marker(); C.Symbol symbol161 = new C.Symbol(){ Val = C.MarkerStyleValues.None }; marker161.Append(symbol161); pivotFormat161.Append(index178); pivotFormat161.Append(shapeProperties73); pivotFormat161.Append(marker161); C.PivotFormat pivotFormat162 = new C.PivotFormat(); C.Index index179 = new C.Index(){ Val = (UInt32Value)2U }; C.Marker marker162 = new C.Marker(); C.Symbol symbol162 = new C.Symbol(){ Val = C.MarkerStyleValues.None }; marker162.Append(symbol162); pivotFormat162.Append(index179); pivotFormat162.Append(marker162); C.PivotFormat pivotFormat163 = new C.PivotFormat(); C.Index index180 = new C.Index(){ Val = (UInt32Value)3U }; C.Marker marker163 = new C.Marker(); C.Symbol symbol163 = new C.Symbol(){ Val = C.MarkerStyleValues.None }; marker163.Append(symbol163); pivotFormat163.Append(index180); pivotFormat163.Append(marker163); C.PivotFormat pivotFormat164 = new C.PivotFormat(); C.Index index181 = new C.Index(){ Val = (UInt32Value)4U }; C.Marker marker164 = new C.Marker(); C.Symbol symbol164 = new C.Symbol(){ Val = C.MarkerStyleValues.None }; marker164.Append(symbol164); pivotFormat164.Append(index181); pivotFormat164.Append(marker164); C.PivotFormat pivotFormat165 = new C.PivotFormat(); C.Index index182 = new C.Index(){ Val = (UInt32Value)5U }; C.Marker marker165 = new C.Marker(); C.Symbol symbol165 = new C.Symbol(){ Val = C.MarkerStyleValues.None }; marker165.Append(symbol165); pivotFormat165.Append(index182); pivotFormat165.Append(marker165); C.PivotFormat pivotFormat166 = new C.PivotFormat(); C.Index index183 = new C.Index(){ Val = (UInt32Value)6U }; C.Marker marker166 = new C.Marker(); C.Symbol symbol166 = new C.Symbol(){ Val = C.MarkerStyleValues.None }; marker166.Append(symbol166); pivotFormat166.Append(index183); pivotFormat166.Append(marker166); C.PivotFormat pivotFormat167 = new C.PivotFormat(); C.Index index184 = new C.Index(){ Val = (UInt32Value)7U }; C.Marker marker167 = new C.Marker(); C.Symbol symbol167 = new C.Symbol(){ Val = C.MarkerStyleValues.None }; marker167.Append(symbol167); pivotFormat167.Append(index184); pivotFormat167.Append(marker167); C.PivotFormat pivotFormat168 = new C.PivotFormat(); C.Index index185 = new C.Index(){ Val = (UInt32Value)8U }; C.Marker marker168 = new C.Marker(); C.Symbol symbol168 = new C.Symbol(){ Val = C.MarkerStyleValues.None }; marker168.Append(symbol168); pivotFormat168.Append(index185); pivotFormat168.Append(marker168); C.PivotFormat pivotFormat169 = new C.PivotFormat(); C.Index index186 = new C.Index(){ Val = (UInt32Value)9U }; C.Marker marker169 = new C.Marker(); C.Symbol symbol169 = new C.Symbol(){ Val = C.MarkerStyleValues.None }; marker169.Append(symbol169); pivotFormat169.Append(index186); pivotFormat169.Append(marker169); C.PivotFormat pivotFormat170 = new C.PivotFormat(); C.Index index187 = new C.Index(){ Val = (UInt32Value)10U }; C.Marker marker170 = new C.Marker(); C.Symbol symbol170 = new C.Symbol(){ Val = C.MarkerStyleValues.None }; marker170.Append(symbol170); pivotFormat170.Append(index187); pivotFormat170.Append(marker170); C.PivotFormat pivotFormat171 = new C.PivotFormat(); C.Index index188 = new C.Index(){ Val = (UInt32Value)11U }; C.Marker marker171 = new C.Marker(); C.Symbol symbol171 = new C.Symbol(){ Val = C.MarkerStyleValues.None }; marker171.Append(symbol171); pivotFormat171.Append(index188); pivotFormat171.Append(marker171); C.PivotFormat pivotFormat172 = new C.PivotFormat(); C.Index index189 = new C.Index(){ Val = (UInt32Value)12U }; C.Marker marker172 = new C.Marker(); C.Symbol symbol172 = new C.Symbol(){ Val = C.MarkerStyleValues.None }; marker172.Append(symbol172); pivotFormat172.Append(index189); pivotFormat172.Append(marker172); C.PivotFormat pivotFormat173 = new C.PivotFormat(); C.Index index190 = new C.Index(){ Val = (UInt32Value)13U }; C.Marker marker173 = new C.Marker(); C.Symbol symbol173 = new C.Symbol(){ Val = C.MarkerStyleValues.None }; marker173.Append(symbol173); pivotFormat173.Append(index190); pivotFormat173.Append(marker173); C.PivotFormat pivotFormat174 = new C.PivotFormat(); C.Index index191 = new C.Index(){ Val = (UInt32Value)14U }; C.ShapeProperties shapeProperties74 = new C.ShapeProperties(); A.SolidFill solidFill141 = new A.SolidFill(); A.SchemeColor schemeColor111 = new A.SchemeColor(){ Val = A.SchemeColorValues.Accent1 }; A.Tint tint49 = new A.Tint(){ Val = 100000 }; schemeColor111.Append(tint49); solidFill141.Append(schemeColor111); A.Outline outline112 = new A.Outline(); A.NoFill noFill96 = new A.NoFill(); outline112.Append(noFill96); A.EffectList effectList92 = new A.EffectList(); shapeProperties74.Append(solidFill141); shapeProperties74.Append(outline112); shapeProperties74.Append(effectList92); C.Marker marker174 = new C.Marker(); C.Symbol symbol174 = new C.Symbol(){ Val = C.MarkerStyleValues.None }; marker174.Append(symbol174); pivotFormat174.Append(index191); pivotFormat174.Append(shapeProperties74); pivotFormat174.Append(marker174); C.PivotFormat pivotFormat175 = new C.PivotFormat(); C.Index index192 = new C.Index(){ Val = (UInt32Value)15U }; C.ShapeProperties shapeProperties75 = new C.ShapeProperties(); A.SolidFill solidFill142 = new A.SolidFill(); A.SchemeColor schemeColor112 = new A.SchemeColor(){ Val = A.SchemeColorValues.Accent1 }; A.Tint tint50 = new A.Tint(){ Val = 100000 }; schemeColor112.Append(tint50); solidFill142.Append(schemeColor112); A.Outline outline113 = new A.Outline(); A.NoFill noFill97 = new A.NoFill(); outline113.Append(noFill97); A.EffectList effectList93 = new A.EffectList(); shapeProperties75.Append(solidFill142); shapeProperties75.Append(outline113); shapeProperties75.Append(effectList93); C.Marker marker175 = new C.Marker(); C.Symbol symbol175 = new C.Symbol(){ Val = C.MarkerStyleValues.None }; marker175.Append(symbol175); pivotFormat175.Append(index192); pivotFormat175.Append(shapeProperties75); pivotFormat175.Append(marker175); C.PivotFormat pivotFormat176 = new C.PivotFormat(); C.Index index193 = new C.Index(){ Val = (UInt32Value)16U }; C.ShapeProperties shapeProperties76 = new C.ShapeProperties(); A.SolidFill solidFill143 = new A.SolidFill(); A.SchemeColor schemeColor113 = new A.SchemeColor(){ Val = A.SchemeColorValues.Accent1 }; A.Tint tint51 = new A.Tint(){ Val = 100000 }; schemeColor113.Append(tint51); solidFill143.Append(schemeColor113); A.Outline outline114 = new A.Outline(); A.NoFill noFill98 = new A.NoFill(); outline114.Append(noFill98); A.EffectList effectList94 = new A.EffectList(); shapeProperties76.Append(solidFill143); shapeProperties76.Append(outline114); shapeProperties76.Append(effectList94); C.Marker marker176 = new C.Marker(); C.Symbol symbol176 = new C.Symbol(){ Val = C.MarkerStyleValues.None }; marker176.Append(symbol176); pivotFormat176.Append(index193); pivotFormat176.Append(shapeProperties76); pivotFormat176.Append(marker176); C.PivotFormat pivotFormat177 = new C.PivotFormat(); C.Index index194 = new C.Index(){ Val = (UInt32Value)17U }; C.ShapeProperties shapeProperties77 = new C.ShapeProperties(); A.SolidFill solidFill144 = new A.SolidFill(); A.SchemeColor schemeColor114 = new A.SchemeColor(){ Val = A.SchemeColorValues.Accent1 }; A.Tint tint52 = new A.Tint(){ Val = 100000 }; schemeColor114.Append(tint52); solidFill144.Append(schemeColor114); A.Outline outline115 = new A.Outline(); A.NoFill noFill99 = new A.NoFill(); outline115.Append(noFill99); A.EffectList effectList95 = new A.EffectList(); shapeProperties77.Append(solidFill144); shapeProperties77.Append(outline115); shapeProperties77.Append(effectList95); C.Marker marker177 = new C.Marker(); C.Symbol symbol177 = new C.Symbol(){ Val = C.MarkerStyleValues.None }; marker177.Append(symbol177); pivotFormat177.Append(index194); pivotFormat177.Append(shapeProperties77); pivotFormat177.Append(marker177); C.PivotFormat pivotFormat178 = new C.PivotFormat(); C.Index index195 = new C.Index(){ Val = (UInt32Value)18U }; C.ShapeProperties shapeProperties78 = new C.ShapeProperties(); A.SolidFill solidFill145 = new A.SolidFill(); A.SchemeColor schemeColor115 = new A.SchemeColor(){ Val = A.SchemeColorValues.Accent1 }; A.Tint tint53 = new A.Tint(){ Val = 100000 }; schemeColor115.Append(tint53); solidFill145.Append(schemeColor115); A.Outline outline116 = new A.Outline(); A.NoFill noFill100 = new A.NoFill(); outline116.Append(noFill100); A.EffectList effectList96 = new A.EffectList(); shapeProperties78.Append(solidFill145); shapeProperties78.Append(outline116); shapeProperties78.Append(effectList96); C.Marker marker178 = new C.Marker(); C.Symbol symbol178 = new C.Symbol(){ Val = C.MarkerStyleValues.None }; marker178.Append(symbol178); pivotFormat178.Append(index195); pivotFormat178.Append(shapeProperties78); pivotFormat178.Append(marker178); pivotFormats18.Append(pivotFormat160); pivotFormats18.Append(pivotFormat161); pivotFormats18.Append(pivotFormat162); pivotFormats18.Append(pivotFormat163); pivotFormats18.Append(pivotFormat164); pivotFormats18.Append(pivotFormat165); pivotFormats18.Append(pivotFormat166); pivotFormats18.Append(pivotFormat167); pivotFormats18.Append(pivotFormat168); pivotFormats18.Append(pivotFormat169); pivotFormats18.Append(pivotFormat170); pivotFormats18.Append(pivotFormat171); pivotFormats18.Append(pivotFormat172); pivotFormats18.Append(pivotFormat173); pivotFormats18.Append(pivotFormat174); pivotFormats18.Append(pivotFormat175); pivotFormats18.Append(pivotFormat176); pivotFormats18.Append(pivotFormat177); pivotFormats18.Append(pivotFormat178); C.PlotArea plotArea18 = new C.PlotArea(); C.Layout layout18 = new C.Layout(); C.BarChart barChart9 = new C.BarChart(); C.BarDirection barDirection9 = new C.BarDirection(){ Val = C.BarDirectionValues.Column }; C.BarGrouping barGrouping9 = new C.BarGrouping(){ Val = C.BarGroupingValues.Clustered }; C.VaryColors varyColors18 = new C.VaryColors(){ Val = false }; C.BarChartSeries barChartSeries9 = new C.BarChartSeries(); C.Index index196 = new C.Index(){ Val = (UInt32Value)0U }; C.Order order18 = new C.Order(){ Val = (UInt32Value)0U }; C.SeriesText seriesText18 = new C.SeriesText(); C.StringReference stringReference35 = new C.StringReference(); C.Formula formula52 = new C.Formula(); formula52.Text = "ShowHorizontalScrollbar!$B$1"; C.StringCache stringCache35 = new C.StringCache(); C.PointCount pointCount52 = new C.PointCount(){ Val = (UInt32Value)1U }; C.StringPoint stringPoint69 = new C.StringPoint(){ Index = (UInt32Value)0U }; C.NumericValue numericValue120 = new C.NumericValue(); numericValue120.Text = "Total"; stringPoint69.Append(numericValue120); stringCache35.Append(pointCount52); stringCache35.Append(stringPoint69); stringReference35.Append(formula52); stringReference35.Append(stringCache35); seriesText18.Append(stringReference35); C.ChartShapeProperties chartShapeProperties36 = new C.ChartShapeProperties(); A.SolidFill solidFill146 = new A.SolidFill(); A.SchemeColor schemeColor116 = new A.SchemeColor(){ Val = A.SchemeColorValues.Accent1 }; A.Tint tint54 = new A.Tint(){ Val = 100000 }; schemeColor116.Append(tint54); solidFill146.Append(schemeColor116); A.Outline outline117 = new A.Outline(); A.NoFill noFill101 = new A.NoFill(); outline117.Append(noFill101); A.EffectList effectList97 = new A.EffectList(); chartShapeProperties36.Append(solidFill146); chartShapeProperties36.Append(outline117); chartShapeProperties36.Append(effectList97); C.InvertIfNegative invertIfNegative9 = new C.InvertIfNegative(){ Val = false }; C.CategoryAxisData categoryAxisData18 = new C.CategoryAxisData(); C.StringReference stringReference36 = new C.StringReference(); C.Formula formula53 = new C.Formula(); formula53.Text = "ShowHorizontalScrollbar!$A$2:$A$5"; C.StringCache stringCache36 = new C.StringCache(); C.PointCount pointCount53 = new C.PointCount(){ Val = (UInt32Value)3U }; C.StringPoint stringPoint70 = new C.StringPoint(){ Index = (UInt32Value)0U }; C.NumericValue numericValue121 = new C.NumericValue(); numericValue121.Text = "product_A"; stringPoint70.Append(numericValue121); C.StringPoint stringPoint71 = new C.StringPoint(){ Index = (UInt32Value)1U }; C.NumericValue numericValue122 = new C.NumericValue(); numericValue122.Text = "product_D"; stringPoint71.Append(numericValue122); C.StringPoint stringPoint72 = new C.StringPoint(){ Index = (UInt32Value)2U }; C.NumericValue numericValue123 = new C.NumericValue(); numericValue123.Text = "product_E"; stringPoint72.Append(numericValue123); stringCache36.Append(pointCount53); stringCache36.Append(stringPoint70); stringCache36.Append(stringPoint71); stringCache36.Append(stringPoint72); stringReference36.Append(formula53); stringReference36.Append(stringCache36); categoryAxisData18.Append(stringReference36); C.Values values18 = new C.Values(); C.NumberReference numberReference18 = new C.NumberReference(); C.Formula formula54 = new C.Formula(); formula54.Text = "ShowHorizontalScrollbar!$B$2:$B$5"; C.NumberingCache numberingCache18 = new C.NumberingCache(); C.FormatCode formatCode18 = new C.FormatCode(); formatCode18.Text = "General"; C.PointCount pointCount54 = new C.PointCount(){ Val = (UInt32Value)3U }; C.NumericPoint numericPoint52 = new C.NumericPoint(){ Index = (UInt32Value)0U }; C.NumericValue numericValue124 = new C.NumericValue(); numericValue124.Text = "19"; numericPoint52.Append(numericValue124); C.NumericPoint numericPoint53 = new C.NumericPoint(){ Index = (UInt32Value)1U }; C.NumericValue numericValue125 = new C.NumericValue(); numericValue125.Text = "13"; numericPoint53.Append(numericValue125); C.NumericPoint numericPoint54 = new C.NumericPoint(){ Index = (UInt32Value)2U }; C.NumericValue numericValue126 = new C.NumericValue(); numericValue126.Text = "33"; numericPoint54.Append(numericValue126); numberingCache18.Append(formatCode18); numberingCache18.Append(pointCount54); numberingCache18.Append(numericPoint52); numberingCache18.Append(numericPoint53); numberingCache18.Append(numericPoint54); numberReference18.Append(formula54); numberReference18.Append(numberingCache18); values18.Append(numberReference18); barChartSeries9.Append(index196); barChartSeries9.Append(order18); barChartSeries9.Append(seriesText18); barChartSeries9.Append(chartShapeProperties36); barChartSeries9.Append(invertIfNegative9); barChartSeries9.Append(categoryAxisData18); barChartSeries9.Append(values18); C.DataLabels dataLabels18 = new C.DataLabels(); C.ShowLegendKey showLegendKey18 = new C.ShowLegendKey(){ Val = false }; C.ShowValue showValue18 = new C.ShowValue(){ Val = false }; C.ShowCategoryName showCategoryName18 = new C.ShowCategoryName(){ Val = false }; C.ShowSeriesName showSeriesName18 = new C.ShowSeriesName(){ Val = false }; C.ShowPercent showPercent18 = new C.ShowPercent(){ Val = false }; C.ShowBubbleSize showBubbleSize18 = new C.ShowBubbleSize(){ Val = false }; dataLabels18.Append(showLegendKey18); dataLabels18.Append(showValue18); dataLabels18.Append(showCategoryName18); dataLabels18.Append(showSeriesName18); dataLabels18.Append(showPercent18); dataLabels18.Append(showBubbleSize18); C.GapWidth gapWidth9 = new C.GapWidth(){ Val = (UInt16Value)219U }; C.Overlap overlap8 = new C.Overlap(){ Val = -27 }; C.AxisId axisId33 = new C.AxisId(){ Val = (UInt32Value)209982688U }; C.AxisId axisId34 = new C.AxisId(){ Val = (UInt32Value)208839816U }; barChart9.Append(barDirection9); barChart9.Append(barGrouping9); barChart9.Append(varyColors18); barChart9.Append(barChartSeries9); barChart9.Append(dataLabels18); barChart9.Append(gapWidth9); barChart9.Append(overlap8); barChart9.Append(axisId33); barChart9.Append(axisId34); C.CategoryAxis categoryAxis9 = new C.CategoryAxis(); C.AxisId axisId35 = new C.AxisId(){ Val = (UInt32Value)209982688U }; C.Scaling scaling17 = new C.Scaling(); C.Orientation orientation17 = new C.Orientation(){ Val = C.OrientationValues.MinMax }; scaling17.Append(orientation17); C.Delete delete17 = new C.Delete(){ Val = false }; C.AxisPosition axisPosition17 = new C.AxisPosition(){ Val = C.AxisPositionValues.Bottom }; C.NumberingFormat numberingFormat28 = new C.NumberingFormat(){ FormatCode = "General", SourceLinked = false }; C.MajorTickMark majorTickMark17 = new C.MajorTickMark(){ Val = C.TickMarkValues.None }; C.MinorTickMark minorTickMark17 = new C.MinorTickMark(){ Val = C.TickMarkValues.None }; C.TickLabelPosition tickLabelPosition17 = new C.TickLabelPosition(){ Val = C.TickLabelPositionValues.NextTo }; C.ChartShapeProperties chartShapeProperties37 = new C.ChartShapeProperties(); A.NoFill noFill102 = new A.NoFill(); A.Outline outline118 = new A.Outline(); A.NoFill noFill103 = new A.NoFill(); outline118.Append(noFill103); A.EffectList effectList98 = new A.EffectList(); chartShapeProperties37.Append(noFill102); chartShapeProperties37.Append(outline118); chartShapeProperties37.Append(effectList98); C.TextProperties textProperties29 = new C.TextProperties(); A.BodyProperties bodyProperties49 = new A.BodyProperties(){ Rotation = -60000000, UseParagraphSpacing = true, VerticalOverflow = A.TextVerticalOverflowValues.Ellipsis, Vertical = A.TextVerticalValues.Horizontal, Wrap = A.TextWrappingValues.Square, Anchor = A.TextAnchoringTypeValues.Center, AnchorCenter = true }; A.ListStyle listStyle49 = new A.ListStyle(); A.Paragraph paragraph49 = new A.Paragraph(); A.ParagraphProperties paragraphProperties29 = new A.ParagraphProperties(); A.DefaultRunProperties defaultRunProperties29 = new A.DefaultRunProperties(){ FontSize = 900, Kerning = 1200 }; A.SolidFill solidFill147 = new A.SolidFill(); A.SchemeColor schemeColor117 = new A.SchemeColor(){ Val = A.SchemeColorValues.Text1 }; A.LuminanceModulation luminanceModulation42 = new A.LuminanceModulation(){ Val = 65000 }; A.LuminanceOffset luminanceOffset36 = new A.LuminanceOffset(){ Val = 35000 }; schemeColor117.Append(luminanceModulation42); schemeColor117.Append(luminanceOffset36); solidFill147.Append(schemeColor117); A.LatinFont latinFont24 = new A.LatinFont(){ Typeface = "+mn-lt" }; A.EastAsianFont eastAsianFont24 = new A.EastAsianFont(){ Typeface = "+mn-ea" }; A.ComplexScriptFont complexScriptFont24 = new A.ComplexScriptFont(){ Typeface = "+mn-cs" }; defaultRunProperties29.Append(solidFill147); defaultRunProperties29.Append(latinFont24); defaultRunProperties29.Append(eastAsianFont24); defaultRunProperties29.Append(complexScriptFont24); paragraphProperties29.Append(defaultRunProperties29); A.EndParagraphRunProperties endParagraphRunProperties29 = new A.EndParagraphRunProperties(){ Language = "en-US" }; paragraph49.Append(paragraphProperties29); paragraph49.Append(endParagraphRunProperties29); textProperties29.Append(bodyProperties49); textProperties29.Append(listStyle49); textProperties29.Append(paragraph49); C.CrossingAxis crossingAxis17 = new C.CrossingAxis(){ Val = (UInt32Value)208839816U }; C.Crosses crosses17 = new C.Crosses(){ Val = C.CrossesValues.AutoZero }; C.AutoLabeled autoLabeled9 = new C.AutoLabeled(){ Val = true }; C.LabelAlignment labelAlignment9 = new C.LabelAlignment(){ Val = C.LabelAlignmentValues.Center }; C.LabelOffset labelOffset9 = new C.LabelOffset(){ Val = (UInt16Value)100U }; C.NoMultiLevelLabels noMultiLevelLabels9 = new C.NoMultiLevelLabels(){ Val = false }; categoryAxis9.Append(axisId35); categoryAxis9.Append(scaling17); categoryAxis9.Append(delete17); categoryAxis9.Append(axisPosition17); categoryAxis9.Append(numberingFormat28); categoryAxis9.Append(majorTickMark17); categoryAxis9.Append(minorTickMark17); categoryAxis9.Append(tickLabelPosition17); categoryAxis9.Append(chartShapeProperties37); categoryAxis9.Append(textProperties29); categoryAxis9.Append(crossingAxis17); categoryAxis9.Append(crosses17); categoryAxis9.Append(autoLabeled9); categoryAxis9.Append(labelAlignment9); categoryAxis9.Append(labelOffset9); categoryAxis9.Append(noMultiLevelLabels9); C.ValueAxis valueAxis9 = new C.ValueAxis(); C.AxisId axisId36 = new C.AxisId(){ Val = (UInt32Value)208839816U }; C.Scaling scaling18 = new C.Scaling(); C.Orientation orientation18 = new C.Orientation(){ Val = C.OrientationValues.MinMax }; scaling18.Append(orientation18); C.Delete delete18 = new C.Delete(){ Val = false }; C.AxisPosition axisPosition18 = new C.AxisPosition(){ Val = C.AxisPositionValues.Left }; C.MajorGridlines majorGridlines9 = new C.MajorGridlines(); C.ChartShapeProperties chartShapeProperties38 = new C.ChartShapeProperties(); A.Outline outline119 = new A.Outline(){ Width = 9525, CapType = A.LineCapValues.Flat, CompoundLineType = A.CompoundLineValues.Single, Alignment = A.PenAlignmentValues.Center }; A.SolidFill solidFill148 = new A.SolidFill(); A.SchemeColor schemeColor118 = new A.SchemeColor(){ Val = A.SchemeColorValues.Text1 }; A.LuminanceModulation luminanceModulation43 = new A.LuminanceModulation(){ Val = 15000 }; A.LuminanceOffset luminanceOffset37 = new A.LuminanceOffset(){ Val = 85000 }; schemeColor118.Append(luminanceModulation43); schemeColor118.Append(luminanceOffset37); solidFill148.Append(schemeColor118); A.Round round15 = new A.Round(); outline119.Append(solidFill148); outline119.Append(round15); A.EffectList effectList99 = new A.EffectList(); chartShapeProperties38.Append(outline119); chartShapeProperties38.Append(effectList99); majorGridlines9.Append(chartShapeProperties38); C.NumberingFormat numberingFormat29 = new C.NumberingFormat(){ FormatCode = "General", SourceLinked = true }; C.MajorTickMark majorTickMark18 = new C.MajorTickMark(){ Val = C.TickMarkValues.None }; C.MinorTickMark minorTickMark18 = new C.MinorTickMark(){ Val = C.TickMarkValues.None }; C.TickLabelPosition tickLabelPosition18 = new C.TickLabelPosition(){ Val = C.TickLabelPositionValues.NextTo }; C.ChartShapeProperties chartShapeProperties39 = new C.ChartShapeProperties(); A.NoFill noFill104 = new A.NoFill(); A.Outline outline120 = new A.Outline(); A.NoFill noFill105 = new A.NoFill(); outline120.Append(noFill105); A.EffectList effectList100 = new A.EffectList(); chartShapeProperties39.Append(noFill104); chartShapeProperties39.Append(outline120); chartShapeProperties39.Append(effectList100); C.TextProperties textProperties30 = new C.TextProperties(); A.BodyProperties bodyProperties50 = new A.BodyProperties(){ Rotation = -60000000, UseParagraphSpacing = true, VerticalOverflow = A.TextVerticalOverflowValues.Ellipsis, Vertical = A.TextVerticalValues.Horizontal, Wrap = A.TextWrappingValues.Square, Anchor = A.TextAnchoringTypeValues.Center, AnchorCenter = true }; A.ListStyle listStyle50 = new A.ListStyle(); A.Paragraph paragraph50 = new A.Paragraph(); A.ParagraphProperties paragraphProperties30 = new A.ParagraphProperties(); A.DefaultRunProperties defaultRunProperties30 = new A.DefaultRunProperties(){ FontSize = 900, Kerning = 1200 }; A.SolidFill solidFill149 = new A.SolidFill(); A.SchemeColor schemeColor119 = new A.SchemeColor(){ Val = A.SchemeColorValues.Text1 }; A.LuminanceModulation luminanceModulation44 = new A.LuminanceModulation(){ Val = 65000 }; A.LuminanceOffset luminanceOffset38 = new A.LuminanceOffset(){ Val = 35000 }; schemeColor119.Append(luminanceModulation44); schemeColor119.Append(luminanceOffset38); solidFill149.Append(schemeColor119); A.LatinFont latinFont25 = new A.LatinFont(){ Typeface = "+mn-lt" }; A.EastAsianFont eastAsianFont25 = new A.EastAsianFont(){ Typeface = "+mn-ea" }; A.ComplexScriptFont complexScriptFont25 = new A.ComplexScriptFont(){ Typeface = "+mn-cs" }; defaultRunProperties30.Append(solidFill149); defaultRunProperties30.Append(latinFont25); defaultRunProperties30.Append(eastAsianFont25); defaultRunProperties30.Append(complexScriptFont25); paragraphProperties30.Append(defaultRunProperties30); A.EndParagraphRunProperties endParagraphRunProperties30 = new A.EndParagraphRunProperties(){ Language = "en-US" }; paragraph50.Append(paragraphProperties30); paragraph50.Append(endParagraphRunProperties30); textProperties30.Append(bodyProperties50); textProperties30.Append(listStyle50); textProperties30.Append(paragraph50); C.CrossingAxis crossingAxis18 = new C.CrossingAxis(){ Val = (UInt32Value)209982688U }; C.Crosses crosses18 = new C.Crosses(){ Val = C.CrossesValues.AutoZero }; C.CrossBetween crossBetween9 = new C.CrossBetween(){ Val = C.CrossBetweenValues.Between }; valueAxis9.Append(axisId36); valueAxis9.Append(scaling18); valueAxis9.Append(delete18); valueAxis9.Append(axisPosition18); valueAxis9.Append(majorGridlines9); valueAxis9.Append(numberingFormat29); valueAxis9.Append(majorTickMark18); valueAxis9.Append(minorTickMark18); valueAxis9.Append(tickLabelPosition18); valueAxis9.Append(chartShapeProperties39); valueAxis9.Append(textProperties30); valueAxis9.Append(crossingAxis18); valueAxis9.Append(crosses18); valueAxis9.Append(crossBetween9); C.ShapeProperties shapeProperties79 = new C.ShapeProperties(); A.SolidFill solidFill150 = new A.SolidFill(); A.SchemeColor schemeColor120 = new A.SchemeColor(){ Val = A.SchemeColorValues.Background1 }; solidFill150.Append(schemeColor120); A.Outline outline121 = new A.Outline(); A.NoFill noFill106 = new A.NoFill(); outline121.Append(noFill106); A.EffectList effectList101 = new A.EffectList(); shapeProperties79.Append(solidFill150); shapeProperties79.Append(outline121); shapeProperties79.Append(effectList101); plotArea18.Append(layout18); plotArea18.Append(barChart9); plotArea18.Append(categoryAxis9); plotArea18.Append(valueAxis9); plotArea18.Append(shapeProperties79); C.Legend legend18 = new C.Legend(); C.LegendPosition legendPosition18 = new C.LegendPosition(){ Val = C.LegendPositionValues.Bottom }; C.Overlay overlay36 = new C.Overlay(){ Val = false }; C.ChartShapeProperties chartShapeProperties40 = new C.ChartShapeProperties(); A.NoFill noFill107 = new A.NoFill(); A.Outline outline122 = new A.Outline(); A.NoFill noFill108 = new A.NoFill(); outline122.Append(noFill108); A.EffectList effectList102 = new A.EffectList(); chartShapeProperties40.Append(noFill107); chartShapeProperties40.Append(outline122); chartShapeProperties40.Append(effectList102); C.TextProperties textProperties31 = new C.TextProperties(); A.BodyProperties bodyProperties51 = new A.BodyProperties(){ Rotation = 0, UseParagraphSpacing = true, VerticalOverflow = A.TextVerticalOverflowValues.Ellipsis, Vertical = A.TextVerticalValues.Horizontal, Wrap = A.TextWrappingValues.Square, Anchor = A.TextAnchoringTypeValues.Center, AnchorCenter = true }; A.ListStyle listStyle51 = new A.ListStyle(); A.Paragraph paragraph51 = new A.Paragraph(); A.ParagraphProperties paragraphProperties31 = new A.ParagraphProperties(); A.DefaultRunProperties defaultRunProperties31 = new A.DefaultRunProperties(){ FontSize = 900, Kerning = 1200 }; A.SolidFill solidFill151 = new A.SolidFill(); A.SchemeColor schemeColor121 = new A.SchemeColor(){ Val = A.SchemeColorValues.Text1 }; A.LuminanceModulation luminanceModulation45 = new A.LuminanceModulation(){ Val = 65000 }; A.LuminanceOffset luminanceOffset39 = new A.LuminanceOffset(){ Val = 35000 }; schemeColor121.Append(luminanceModulation45); schemeColor121.Append(luminanceOffset39); solidFill151.Append(schemeColor121); A.LatinFont latinFont26 = new A.LatinFont(){ Typeface = "+mn-lt" }; A.EastAsianFont eastAsianFont26 = new A.EastAsianFont(){ Typeface = "+mn-ea" }; A.ComplexScriptFont complexScriptFont26 = new A.ComplexScriptFont(){ Typeface = "+mn-cs" }; defaultRunProperties31.Append(solidFill151); defaultRunProperties31.Append(latinFont26); defaultRunProperties31.Append(eastAsianFont26); defaultRunProperties31.Append(complexScriptFont26); paragraphProperties31.Append(defaultRunProperties31); A.EndParagraphRunProperties endParagraphRunProperties31 = new A.EndParagraphRunProperties(){ Language = "en-US" }; paragraph51.Append(paragraphProperties31); paragraph51.Append(endParagraphRunProperties31); textProperties31.Append(bodyProperties51); textProperties31.Append(listStyle51); textProperties31.Append(paragraph51); legend18.Append(legendPosition18); legend18.Append(overlay36); legend18.Append(chartShapeProperties40); legend18.Append(textProperties31); C.PlotVisibleOnly plotVisibleOnly18 = new C.PlotVisibleOnly(){ Val = true }; C.DisplayBlanksAs displayBlanksAs18 = new C.DisplayBlanksAs(){ Val = C.DisplayBlanksAsValues.Gap }; C.ShowDataLabelsOverMaximum showDataLabelsOverMaximum18 = new C.ShowDataLabelsOverMaximum(){ Val = false }; chart18.Append(title18); chart18.Append(autoTitleDeleted18); chart18.Append(pivotFormats18); chart18.Append(plotArea18); chart18.Append(legend18); chart18.Append(plotVisibleOnly18); chart18.Append(displayBlanksAs18); chart18.Append(showDataLabelsOverMaximum18); C.ShapeProperties shapeProperties80 = new C.ShapeProperties(); A.SolidFill solidFill152 = new A.SolidFill(); A.SchemeColor schemeColor122 = new A.SchemeColor(){ Val = A.SchemeColorValues.Background1 }; solidFill152.Append(schemeColor122); A.Outline outline123 = new A.Outline(){ Width = 9525, CapType = A.LineCapValues.Flat, CompoundLineType = A.CompoundLineValues.Single, Alignment = A.PenAlignmentValues.Center }; A.SolidFill solidFill153 = new A.SolidFill(); A.SchemeColor schemeColor123 = new A.SchemeColor(){ Val = A.SchemeColorValues.Text1 }; A.LuminanceModulation luminanceModulation46 = new A.LuminanceModulation(){ Val = 15000 }; A.LuminanceOffset luminanceOffset40 = new A.LuminanceOffset(){ Val = 85000 }; schemeColor123.Append(luminanceModulation46); schemeColor123.Append(luminanceOffset40); solidFill153.Append(schemeColor123); A.Round round16 = new A.Round(); outline123.Append(solidFill153); outline123.Append(round16); A.EffectList effectList103 = new A.EffectList(); shapeProperties80.Append(solidFill152); shapeProperties80.Append(outline123); shapeProperties80.Append(effectList103); C.TextProperties textProperties32 = new C.TextProperties(); A.BodyProperties bodyProperties52 = new A.BodyProperties(); A.ListStyle listStyle52 = new A.ListStyle(); A.Paragraph paragraph52 = new A.Paragraph(); A.ParagraphProperties paragraphProperties32 = new A.ParagraphProperties(); A.DefaultRunProperties defaultRunProperties32 = new A.DefaultRunProperties(); paragraphProperties32.Append(defaultRunProperties32); A.EndParagraphRunProperties endParagraphRunProperties32 = new A.EndParagraphRunProperties(){ Language = "en-US" }; paragraph52.Append(paragraphProperties32); paragraph52.Append(endParagraphRunProperties32); textProperties32.Append(bodyProperties52); textProperties32.Append(listStyle52); textProperties32.Append(paragraph52); C.PrintSettings printSettings18 = new C.PrintSettings(); C.HeaderFooter headerFooter18 = new C.HeaderFooter(); C.PageMargins pageMargins29 = new C.PageMargins(){ Left = 0.7D, Right = 0.7D, Top = 0.75D, Bottom = 0.75D, Header = 0.3D, Footer = 0.3D }; C.PageSetup pageSetup18 = new C.PageSetup(); printSettings18.Append(headerFooter18); printSettings18.Append(pageMargins29); printSettings18.Append(pageSetup18); C.ChartSpaceExtensionList chartSpaceExtensionList18 = new C.ChartSpaceExtensionList(); chartSpaceExtensionList18.AddNamespaceDeclaration("c14", "http://schemas.microsoft.com/office/drawing/2007/8/2/chart"); chartSpaceExtensionList18.AddNamespaceDeclaration("mc", "http://schemas.openxmlformats.org/markup-compatibility/2006"); C.ChartSpaceExtension chartSpaceExtension18 = new C.ChartSpaceExtension(){ Uri = "{781A3756-C4B2-4CAC-9D66-4F8BD8637D16}" }; chartSpaceExtension18.AddNamespaceDeclaration("c14", "http://schemas.microsoft.com/office/drawing/2007/8/2/chart"); C14.PivotOptions pivotOptions18 = new C14.PivotOptions(); C14.DropZoneFilter dropZoneFilter18 = new C14.DropZoneFilter(){ Val = true }; C14.DropZoneCategories dropZoneCategories18 = new C14.DropZoneCategories(){ Val = true }; C14.DropZoneData dropZoneData18 = new C14.DropZoneData(){ Val = true }; C14.DropZoneSeries dropZoneSeries18 = new C14.DropZoneSeries(){ Val = true }; C14.DropZonesVisible dropZonesVisible18 = new C14.DropZonesVisible(){ Val = true }; pivotOptions18.Append(dropZoneFilter18); pivotOptions18.Append(dropZoneCategories18); pivotOptions18.Append(dropZoneData18); pivotOptions18.Append(dropZoneSeries18); pivotOptions18.Append(dropZonesVisible18); chartSpaceExtension18.Append(pivotOptions18); chartSpaceExtensionList18.Append(chartSpaceExtension18); chartSpace18.Append(date190418); chartSpace18.Append(editingLanguage18); chartSpace18.Append(roundedCorners18); chartSpace18.Append(alternateContent38); chartSpace18.Append(pivotSource18); chartSpace18.Append(chart18); chartSpace18.Append(shapeProperties80); chartSpace18.Append(textProperties32); chartSpace18.Append(printSettings18); chartSpace18.Append(chartSpaceExtensionList18); chartPart18.ChartSpace = chartSpace18; }
// Generates content of chartPart17. private void GenerateChartPart17Content(ChartPart chartPart17) { C.ChartSpace chartSpace17 = new C.ChartSpace(); chartSpace17.AddNamespaceDeclaration("c", "http://schemas.openxmlformats.org/drawingml/2006/chart"); chartSpace17.AddNamespaceDeclaration("a", "http://schemas.openxmlformats.org/drawingml/2006/main"); chartSpace17.AddNamespaceDeclaration("r", "http://schemas.openxmlformats.org/officeDocument/2006/relationships"); C.Date1904 date190417 = new C.Date1904(){ Val = false }; C.EditingLanguage editingLanguage17 = new C.EditingLanguage(){ Val = "en-US" }; C.RoundedCorners roundedCorners17 = new C.RoundedCorners(){ Val = false }; AlternateContent alternateContent37 = new AlternateContent(); alternateContent37.AddNamespaceDeclaration("mc", "http://schemas.openxmlformats.org/markup-compatibility/2006"); AlternateContentChoice alternateContentChoice37 = new AlternateContentChoice(){ Requires = "c14" }; alternateContentChoice37.AddNamespaceDeclaration("c14", "http://schemas.microsoft.com/office/drawing/2007/8/2/chart"); C14.Style style32 = new C14.Style(){ Val = 102 }; alternateContentChoice37.Append(style32); AlternateContentFallback alternateContentFallback36 = new AlternateContentFallback(); C.Style style33 = new C.Style(){ Val = 2 }; alternateContentFallback36.Append(style33); alternateContent37.Append(alternateContentChoice37); alternateContent37.Append(alternateContentFallback36); C.PivotSource pivotSource17 = new C.PivotSource(); C.PivotTableName pivotTableName17 = new C.PivotTableName(); pivotTableName17.Text = "[GeneratedDocument.xlsx]ShowHorizontalScrollbar!PivotTable1"; C.FormatId formatId17 = new C.FormatId(){ Val = (UInt32Value)16U }; pivotSource17.Append(pivotTableName17); pivotSource17.Append(formatId17); C.Chart chart17 = new C.Chart(); C.Title title17 = new C.Title(); C.Overlay overlay33 = new C.Overlay(){ Val = false }; title17.Append(overlay33); C.AutoTitleDeleted autoTitleDeleted17 = new C.AutoTitleDeleted(){ Val = false }; C.PivotFormats pivotFormats17 = new C.PivotFormats(); C.PivotFormat pivotFormat154 = new C.PivotFormat(); C.Index index170 = new C.Index(){ Val = (UInt32Value)0U }; C.Marker marker154 = new C.Marker(); C.Symbol symbol154 = new C.Symbol(){ Val = C.MarkerStyleValues.None }; marker154.Append(symbol154); pivotFormat154.Append(index170); pivotFormat154.Append(marker154); C.PivotFormat pivotFormat155 = new C.PivotFormat(); C.Index index171 = new C.Index(){ Val = (UInt32Value)1U }; C.Marker marker155 = new C.Marker(); C.Symbol symbol155 = new C.Symbol(){ Val = C.MarkerStyleValues.None }; marker155.Append(symbol155); pivotFormat155.Append(index171); pivotFormat155.Append(marker155); C.PivotFormat pivotFormat156 = new C.PivotFormat(); C.Index index172 = new C.Index(){ Val = (UInt32Value)2U }; C.Marker marker156 = new C.Marker(); C.Symbol symbol156 = new C.Symbol(){ Val = C.MarkerStyleValues.None }; marker156.Append(symbol156); pivotFormat156.Append(index172); pivotFormat156.Append(marker156); C.PivotFormat pivotFormat157 = new C.PivotFormat(); C.Index index173 = new C.Index(){ Val = (UInt32Value)3U }; C.Marker marker157 = new C.Marker(); C.Symbol symbol157 = new C.Symbol(){ Val = C.MarkerStyleValues.None }; marker157.Append(symbol157); pivotFormat157.Append(index173); pivotFormat157.Append(marker157); C.PivotFormat pivotFormat158 = new C.PivotFormat(); C.Index index174 = new C.Index(){ Val = (UInt32Value)4U }; C.Marker marker158 = new C.Marker(); C.Symbol symbol158 = new C.Symbol(){ Val = C.MarkerStyleValues.None }; marker158.Append(symbol158); pivotFormat158.Append(index174); pivotFormat158.Append(marker158); C.PivotFormat pivotFormat159 = new C.PivotFormat(); C.Index index175 = new C.Index(){ Val = (UInt32Value)5U }; C.Marker marker159 = new C.Marker(); C.Symbol symbol159 = new C.Symbol(){ Val = C.MarkerStyleValues.None }; marker159.Append(symbol159); pivotFormat159.Append(index175); pivotFormat159.Append(marker159); pivotFormats17.Append(pivotFormat154); pivotFormats17.Append(pivotFormat155); pivotFormats17.Append(pivotFormat156); pivotFormats17.Append(pivotFormat157); pivotFormats17.Append(pivotFormat158); pivotFormats17.Append(pivotFormat159); C.PlotArea plotArea17 = new C.PlotArea(); C.Layout layout17 = new C.Layout(); C.PieChart pieChart9 = new C.PieChart(); C.VaryColors varyColors17 = new C.VaryColors(){ Val = true }; C.PieChartSeries pieChartSeries9 = new C.PieChartSeries(); C.Index index176 = new C.Index(){ Val = (UInt32Value)0U }; C.Order order17 = new C.Order(){ Val = (UInt32Value)0U }; C.SeriesText seriesText17 = new C.SeriesText(); C.StringReference stringReference33 = new C.StringReference(); C.Formula formula49 = new C.Formula(); formula49.Text = "ShowHorizontalScrollbar!$B$1"; C.StringCache stringCache33 = new C.StringCache(); C.PointCount pointCount49 = new C.PointCount(){ Val = (UInt32Value)1U }; C.StringPoint stringPoint65 = new C.StringPoint(){ Index = (UInt32Value)0U }; C.NumericValue numericValue113 = new C.NumericValue(); numericValue113.Text = "Total"; stringPoint65.Append(numericValue113); stringCache33.Append(pointCount49); stringCache33.Append(stringPoint65); stringReference33.Append(formula49); stringReference33.Append(stringCache33); seriesText17.Append(stringReference33); C.CategoryAxisData categoryAxisData17 = new C.CategoryAxisData(); C.StringReference stringReference34 = new C.StringReference(); C.Formula formula50 = new C.Formula(); formula50.Text = "ShowHorizontalScrollbar!$A$2:$A$5"; C.StringCache stringCache34 = new C.StringCache(); C.PointCount pointCount50 = new C.PointCount(){ Val = (UInt32Value)3U }; C.StringPoint stringPoint66 = new C.StringPoint(){ Index = (UInt32Value)0U }; C.NumericValue numericValue114 = new C.NumericValue(); numericValue114.Text = "product_A"; stringPoint66.Append(numericValue114); C.StringPoint stringPoint67 = new C.StringPoint(){ Index = (UInt32Value)1U }; C.NumericValue numericValue115 = new C.NumericValue(); numericValue115.Text = "product_D"; stringPoint67.Append(numericValue115); C.StringPoint stringPoint68 = new C.StringPoint(){ Index = (UInt32Value)2U }; C.NumericValue numericValue116 = new C.NumericValue(); numericValue116.Text = "product_E"; stringPoint68.Append(numericValue116); stringCache34.Append(pointCount50); stringCache34.Append(stringPoint66); stringCache34.Append(stringPoint67); stringCache34.Append(stringPoint68); stringReference34.Append(formula50); stringReference34.Append(stringCache34); categoryAxisData17.Append(stringReference34); C.Values values17 = new C.Values(); C.NumberReference numberReference17 = new C.NumberReference(); C.Formula formula51 = new C.Formula(); formula51.Text = "ShowHorizontalScrollbar!$B$2:$B$5"; C.NumberingCache numberingCache17 = new C.NumberingCache(); C.FormatCode formatCode17 = new C.FormatCode(); formatCode17.Text = "General"; C.PointCount pointCount51 = new C.PointCount(){ Val = (UInt32Value)3U }; C.NumericPoint numericPoint49 = new C.NumericPoint(){ Index = (UInt32Value)0U }; C.NumericValue numericValue117 = new C.NumericValue(); numericValue117.Text = "19"; numericPoint49.Append(numericValue117); C.NumericPoint numericPoint50 = new C.NumericPoint(){ Index = (UInt32Value)1U }; C.NumericValue numericValue118 = new C.NumericValue(); numericValue118.Text = "13"; numericPoint50.Append(numericValue118); C.NumericPoint numericPoint51 = new C.NumericPoint(){ Index = (UInt32Value)2U }; C.NumericValue numericValue119 = new C.NumericValue(); numericValue119.Text = "33"; numericPoint51.Append(numericValue119); numberingCache17.Append(formatCode17); numberingCache17.Append(pointCount51); numberingCache17.Append(numericPoint49); numberingCache17.Append(numericPoint50); numberingCache17.Append(numericPoint51); numberReference17.Append(formula51); numberReference17.Append(numberingCache17); values17.Append(numberReference17); pieChartSeries9.Append(index176); pieChartSeries9.Append(order17); pieChartSeries9.Append(seriesText17); pieChartSeries9.Append(categoryAxisData17); pieChartSeries9.Append(values17); C.DataLabels dataLabels17 = new C.DataLabels(); C.ShowLegendKey showLegendKey17 = new C.ShowLegendKey(){ Val = false }; C.ShowValue showValue17 = new C.ShowValue(){ Val = false }; C.ShowCategoryName showCategoryName17 = new C.ShowCategoryName(){ Val = false }; C.ShowSeriesName showSeriesName17 = new C.ShowSeriesName(){ Val = false }; C.ShowPercent showPercent17 = new C.ShowPercent(){ Val = false }; C.ShowBubbleSize showBubbleSize17 = new C.ShowBubbleSize(){ Val = false }; C.ShowLeaderLines showLeaderLines9 = new C.ShowLeaderLines(){ Val = true }; dataLabels17.Append(showLegendKey17); dataLabels17.Append(showValue17); dataLabels17.Append(showCategoryName17); dataLabels17.Append(showSeriesName17); dataLabels17.Append(showPercent17); dataLabels17.Append(showBubbleSize17); dataLabels17.Append(showLeaderLines9); C.FirstSliceAngle firstSliceAngle9 = new C.FirstSliceAngle(){ Val = (UInt16Value)0U }; pieChart9.Append(varyColors17); pieChart9.Append(pieChartSeries9); pieChart9.Append(dataLabels17); pieChart9.Append(firstSliceAngle9); plotArea17.Append(layout17); plotArea17.Append(pieChart9); C.Legend legend17 = new C.Legend(); C.LegendPosition legendPosition17 = new C.LegendPosition(){ Val = C.LegendPositionValues.Right }; C.Overlay overlay34 = new C.Overlay(){ Val = false }; legend17.Append(legendPosition17); legend17.Append(overlay34); C.PlotVisibleOnly plotVisibleOnly17 = new C.PlotVisibleOnly(){ Val = true }; C.DisplayBlanksAs displayBlanksAs17 = new C.DisplayBlanksAs(){ Val = C.DisplayBlanksAsValues.Gap }; C.ShowDataLabelsOverMaximum showDataLabelsOverMaximum17 = new C.ShowDataLabelsOverMaximum(){ Val = false }; chart17.Append(title17); chart17.Append(autoTitleDeleted17); chart17.Append(pivotFormats17); chart17.Append(plotArea17); chart17.Append(legend17); chart17.Append(plotVisibleOnly17); chart17.Append(displayBlanksAs17); chart17.Append(showDataLabelsOverMaximum17); C.PrintSettings printSettings17 = new C.PrintSettings(); C.HeaderFooter headerFooter17 = new C.HeaderFooter(); C.PageMargins pageMargins28 = new C.PageMargins(){ Left = 0.7D, Right = 0.7D, Top = 0.75D, Bottom = 0.75D, Header = 0.3D, Footer = 0.3D }; C.PageSetup pageSetup17 = new C.PageSetup(); printSettings17.Append(headerFooter17); printSettings17.Append(pageMargins28); printSettings17.Append(pageSetup17); C.ChartSpaceExtensionList chartSpaceExtensionList17 = new C.ChartSpaceExtensionList(); chartSpaceExtensionList17.AddNamespaceDeclaration("c14", "http://schemas.microsoft.com/office/drawing/2007/8/2/chart"); chartSpaceExtensionList17.AddNamespaceDeclaration("mc", "http://schemas.openxmlformats.org/markup-compatibility/2006"); C.ChartSpaceExtension chartSpaceExtension17 = new C.ChartSpaceExtension(){ Uri = "{781A3756-C4B2-4CAC-9D66-4F8BD8637D16}" }; chartSpaceExtension17.AddNamespaceDeclaration("c14", "http://schemas.microsoft.com/office/drawing/2007/8/2/chart"); C14.PivotOptions pivotOptions17 = new C14.PivotOptions(); C14.DropZoneFilter dropZoneFilter17 = new C14.DropZoneFilter(){ Val = true }; C14.DropZoneCategories dropZoneCategories17 = new C14.DropZoneCategories(){ Val = true }; C14.DropZoneData dropZoneData17 = new C14.DropZoneData(){ Val = true }; C14.DropZoneSeries dropZoneSeries17 = new C14.DropZoneSeries(){ Val = true }; C14.DropZonesVisible dropZonesVisible17 = new C14.DropZonesVisible(){ Val = true }; pivotOptions17.Append(dropZoneFilter17); pivotOptions17.Append(dropZoneCategories17); pivotOptions17.Append(dropZoneData17); pivotOptions17.Append(dropZoneSeries17); pivotOptions17.Append(dropZonesVisible17); chartSpaceExtension17.Append(pivotOptions17); chartSpaceExtensionList17.Append(chartSpaceExtension17); chartSpace17.Append(date190417); chartSpace17.Append(editingLanguage17); chartSpace17.Append(roundedCorners17); chartSpace17.Append(alternateContent37); chartSpace17.Append(pivotSource17); chartSpace17.Append(chart17); chartSpace17.Append(printSettings17); chartSpace17.Append(chartSpaceExtensionList17); chartPart17.ChartSpace = chartSpace17; }
// Generates content of chartPart16. private void GenerateChartPart16Content(ChartPart chartPart16) { C.ChartSpace chartSpace16 = new C.ChartSpace(); chartSpace16.AddNamespaceDeclaration("c", "http://schemas.openxmlformats.org/drawingml/2006/chart"); chartSpace16.AddNamespaceDeclaration("a", "http://schemas.openxmlformats.org/drawingml/2006/main"); chartSpace16.AddNamespaceDeclaration("r", "http://schemas.openxmlformats.org/officeDocument/2006/relationships"); C.Date1904 date190416 = new C.Date1904(){ Val = false }; C.EditingLanguage editingLanguage16 = new C.EditingLanguage(){ Val = "en-US" }; C.RoundedCorners roundedCorners16 = new C.RoundedCorners(){ Val = false }; C.Style style31 = new C.Style(){ Val = 1 }; C.PivotSource pivotSource16 = new C.PivotSource(); C.PivotTableName pivotTableName16 = new C.PivotTableName(); pivotTableName16.Text = "[GeneratedDocument.xlsx]Level!PivotTable1"; C.FormatId formatId16 = new C.FormatId(){ Val = (UInt32Value)4U }; pivotSource16.Append(pivotTableName16); pivotSource16.Append(formatId16); C.Chart chart16 = new C.Chart(); C.Title title16 = new C.Title(); C.Overlay overlay31 = new C.Overlay(){ Val = false }; title16.Append(overlay31); C.AutoTitleDeleted autoTitleDeleted16 = new C.AutoTitleDeleted(){ Val = false }; C.PivotFormats pivotFormats16 = new C.PivotFormats(); C.PivotFormat pivotFormat140 = new C.PivotFormat(); C.Index index155 = new C.Index(){ Val = (UInt32Value)0U }; C.ShapeProperties shapeProperties66 = new C.ShapeProperties(); A.SolidFill solidFill125 = new A.SolidFill(); A.SchemeColor schemeColor99 = new A.SchemeColor(){ Val = A.SchemeColorValues.Accent1 }; A.Tint tint44 = new A.Tint(){ Val = 100000 }; schemeColor99.Append(tint44); solidFill125.Append(schemeColor99); A.Outline outline99 = new A.Outline(); A.NoFill noFill84 = new A.NoFill(); outline99.Append(noFill84); A.EffectList effectList81 = new A.EffectList(); shapeProperties66.Append(solidFill125); shapeProperties66.Append(outline99); shapeProperties66.Append(effectList81); C.Marker marker140 = new C.Marker(); C.Symbol symbol140 = new C.Symbol(){ Val = C.MarkerStyleValues.None }; marker140.Append(symbol140); pivotFormat140.Append(index155); pivotFormat140.Append(shapeProperties66); pivotFormat140.Append(marker140); C.PivotFormat pivotFormat141 = new C.PivotFormat(); C.Index index156 = new C.Index(){ Val = (UInt32Value)1U }; C.ShapeProperties shapeProperties67 = new C.ShapeProperties(); A.SolidFill solidFill126 = new A.SolidFill(); A.SchemeColor schemeColor100 = new A.SchemeColor(){ Val = A.SchemeColorValues.Accent2 }; A.Tint tint45 = new A.Tint(){ Val = 100000 }; schemeColor100.Append(tint45); solidFill126.Append(schemeColor100); A.Outline outline100 = new A.Outline(); A.NoFill noFill85 = new A.NoFill(); outline100.Append(noFill85); A.EffectList effectList82 = new A.EffectList(); shapeProperties67.Append(solidFill126); shapeProperties67.Append(outline100); shapeProperties67.Append(effectList82); C.Marker marker141 = new C.Marker(); C.Symbol symbol141 = new C.Symbol(){ Val = C.MarkerStyleValues.None }; marker141.Append(symbol141); pivotFormat141.Append(index156); pivotFormat141.Append(shapeProperties67); pivotFormat141.Append(marker141); C.PivotFormat pivotFormat142 = new C.PivotFormat(); C.Index index157 = new C.Index(){ Val = (UInt32Value)2U }; C.Marker marker142 = new C.Marker(); C.Symbol symbol142 = new C.Symbol(){ Val = C.MarkerStyleValues.None }; marker142.Append(symbol142); pivotFormat142.Append(index157); pivotFormat142.Append(marker142); C.PivotFormat pivotFormat143 = new C.PivotFormat(); C.Index index158 = new C.Index(){ Val = (UInt32Value)3U }; C.Marker marker143 = new C.Marker(); C.Symbol symbol143 = new C.Symbol(){ Val = C.MarkerStyleValues.None }; marker143.Append(symbol143); pivotFormat143.Append(index158); pivotFormat143.Append(marker143); C.PivotFormat pivotFormat144 = new C.PivotFormat(); C.Index index159 = new C.Index(){ Val = (UInt32Value)4U }; C.Marker marker144 = new C.Marker(); C.Symbol symbol144 = new C.Symbol(){ Val = C.MarkerStyleValues.None }; marker144.Append(symbol144); pivotFormat144.Append(index159); pivotFormat144.Append(marker144); C.PivotFormat pivotFormat145 = new C.PivotFormat(); C.Index index160 = new C.Index(){ Val = (UInt32Value)5U }; C.Marker marker145 = new C.Marker(); C.Symbol symbol145 = new C.Symbol(){ Val = C.MarkerStyleValues.None }; marker145.Append(symbol145); pivotFormat145.Append(index160); pivotFormat145.Append(marker145); C.PivotFormat pivotFormat146 = new C.PivotFormat(); C.Index index161 = new C.Index(){ Val = (UInt32Value)6U }; C.Marker marker146 = new C.Marker(); C.Symbol symbol146 = new C.Symbol(){ Val = C.MarkerStyleValues.None }; marker146.Append(symbol146); pivotFormat146.Append(index161); pivotFormat146.Append(marker146); C.PivotFormat pivotFormat147 = new C.PivotFormat(); C.Index index162 = new C.Index(){ Val = (UInt32Value)7U }; C.Marker marker147 = new C.Marker(); C.Symbol symbol147 = new C.Symbol(){ Val = C.MarkerStyleValues.None }; marker147.Append(symbol147); pivotFormat147.Append(index162); pivotFormat147.Append(marker147); C.PivotFormat pivotFormat148 = new C.PivotFormat(); C.Index index163 = new C.Index(){ Val = (UInt32Value)8U }; C.Marker marker148 = new C.Marker(); C.Symbol symbol148 = new C.Symbol(){ Val = C.MarkerStyleValues.None }; marker148.Append(symbol148); pivotFormat148.Append(index163); pivotFormat148.Append(marker148); C.PivotFormat pivotFormat149 = new C.PivotFormat(); C.Index index164 = new C.Index(){ Val = (UInt32Value)9U }; C.Marker marker149 = new C.Marker(); C.Symbol symbol149 = new C.Symbol(){ Val = C.MarkerStyleValues.None }; marker149.Append(symbol149); pivotFormat149.Append(index164); pivotFormat149.Append(marker149); C.PivotFormat pivotFormat150 = new C.PivotFormat(); C.Index index165 = new C.Index(){ Val = (UInt32Value)10U }; C.Marker marker150 = new C.Marker(); C.Symbol symbol150 = new C.Symbol(){ Val = C.MarkerStyleValues.None }; marker150.Append(symbol150); pivotFormat150.Append(index165); pivotFormat150.Append(marker150); C.PivotFormat pivotFormat151 = new C.PivotFormat(); C.Index index166 = new C.Index(){ Val = (UInt32Value)11U }; C.Marker marker151 = new C.Marker(); C.Symbol symbol151 = new C.Symbol(){ Val = C.MarkerStyleValues.None }; marker151.Append(symbol151); pivotFormat151.Append(index166); pivotFormat151.Append(marker151); C.PivotFormat pivotFormat152 = new C.PivotFormat(); C.Index index167 = new C.Index(){ Val = (UInt32Value)12U }; C.Marker marker152 = new C.Marker(); C.Symbol symbol152 = new C.Symbol(){ Val = C.MarkerStyleValues.None }; marker152.Append(symbol152); pivotFormat152.Append(index167); pivotFormat152.Append(marker152); C.PivotFormat pivotFormat153 = new C.PivotFormat(); C.Index index168 = new C.Index(){ Val = (UInt32Value)13U }; C.Marker marker153 = new C.Marker(); C.Symbol symbol153 = new C.Symbol(){ Val = C.MarkerStyleValues.None }; marker153.Append(symbol153); pivotFormat153.Append(index168); pivotFormat153.Append(marker153); pivotFormats16.Append(pivotFormat140); pivotFormats16.Append(pivotFormat141); pivotFormats16.Append(pivotFormat142); pivotFormats16.Append(pivotFormat143); pivotFormats16.Append(pivotFormat144); pivotFormats16.Append(pivotFormat145); pivotFormats16.Append(pivotFormat146); pivotFormats16.Append(pivotFormat147); pivotFormats16.Append(pivotFormat148); pivotFormats16.Append(pivotFormat149); pivotFormats16.Append(pivotFormat150); pivotFormats16.Append(pivotFormat151); pivotFormats16.Append(pivotFormat152); pivotFormats16.Append(pivotFormat153); C.PlotArea plotArea16 = new C.PlotArea(); C.Layout layout16 = new C.Layout(); C.BarChart barChart8 = new C.BarChart(); C.BarDirection barDirection8 = new C.BarDirection(){ Val = C.BarDirectionValues.Column }; C.BarGrouping barGrouping8 = new C.BarGrouping(){ Val = C.BarGroupingValues.Clustered }; C.VaryColors varyColors16 = new C.VaryColors(){ Val = false }; C.BarChartSeries barChartSeries8 = new C.BarChartSeries(); C.Index index169 = new C.Index(){ Val = (UInt32Value)0U }; C.Order order16 = new C.Order(){ Val = (UInt32Value)0U }; C.SeriesText seriesText16 = new C.SeriesText(); C.StringReference stringReference31 = new C.StringReference(); C.Formula formula46 = new C.Formula(); formula46.Text = "Level!$B$1"; C.StringCache stringCache31 = new C.StringCache(); C.PointCount pointCount46 = new C.PointCount(){ Val = (UInt32Value)1U }; C.StringPoint stringPoint61 = new C.StringPoint(){ Index = (UInt32Value)0U }; C.NumericValue numericValue106 = new C.NumericValue(); numericValue106.Text = "Total"; stringPoint61.Append(numericValue106); stringCache31.Append(pointCount46); stringCache31.Append(stringPoint61); stringReference31.Append(formula46); stringReference31.Append(stringCache31); seriesText16.Append(stringReference31); C.ChartShapeProperties chartShapeProperties31 = new C.ChartShapeProperties(); A.SolidFill solidFill127 = new A.SolidFill(); A.SchemeColor schemeColor101 = new A.SchemeColor(){ Val = A.SchemeColorValues.Accent1 }; A.Tint tint46 = new A.Tint(){ Val = 100000 }; schemeColor101.Append(tint46); solidFill127.Append(schemeColor101); A.Outline outline101 = new A.Outline(); A.NoFill noFill86 = new A.NoFill(); outline101.Append(noFill86); A.EffectList effectList83 = new A.EffectList(); chartShapeProperties31.Append(solidFill127); chartShapeProperties31.Append(outline101); chartShapeProperties31.Append(effectList83); C.InvertIfNegative invertIfNegative8 = new C.InvertIfNegative(){ Val = false }; C.CategoryAxisData categoryAxisData16 = new C.CategoryAxisData(); C.StringReference stringReference32 = new C.StringReference(); C.Formula formula47 = new C.Formula(); formula47.Text = "Level!$A$2:$A$5"; C.StringCache stringCache32 = new C.StringCache(); C.PointCount pointCount47 = new C.PointCount(){ Val = (UInt32Value)3U }; C.StringPoint stringPoint62 = new C.StringPoint(){ Index = (UInt32Value)0U }; C.NumericValue numericValue107 = new C.NumericValue(); numericValue107.Text = "product_A"; stringPoint62.Append(numericValue107); C.StringPoint stringPoint63 = new C.StringPoint(){ Index = (UInt32Value)1U }; C.NumericValue numericValue108 = new C.NumericValue(); numericValue108.Text = "product_D"; stringPoint63.Append(numericValue108); C.StringPoint stringPoint64 = new C.StringPoint(){ Index = (UInt32Value)2U }; C.NumericValue numericValue109 = new C.NumericValue(); numericValue109.Text = "product_E"; stringPoint64.Append(numericValue109); stringCache32.Append(pointCount47); stringCache32.Append(stringPoint62); stringCache32.Append(stringPoint63); stringCache32.Append(stringPoint64); stringReference32.Append(formula47); stringReference32.Append(stringCache32); categoryAxisData16.Append(stringReference32); C.Values values16 = new C.Values(); C.NumberReference numberReference16 = new C.NumberReference(); C.Formula formula48 = new C.Formula(); formula48.Text = "Level!$B$2:$B$5"; C.NumberingCache numberingCache16 = new C.NumberingCache(); C.FormatCode formatCode16 = new C.FormatCode(); formatCode16.Text = "General"; C.PointCount pointCount48 = new C.PointCount(){ Val = (UInt32Value)3U }; C.NumericPoint numericPoint46 = new C.NumericPoint(){ Index = (UInt32Value)0U }; C.NumericValue numericValue110 = new C.NumericValue(); numericValue110.Text = "19"; numericPoint46.Append(numericValue110); C.NumericPoint numericPoint47 = new C.NumericPoint(){ Index = (UInt32Value)1U }; C.NumericValue numericValue111 = new C.NumericValue(); numericValue111.Text = "13"; numericPoint47.Append(numericValue111); C.NumericPoint numericPoint48 = new C.NumericPoint(){ Index = (UInt32Value)2U }; C.NumericValue numericValue112 = new C.NumericValue(); numericValue112.Text = "33"; numericPoint48.Append(numericValue112); numberingCache16.Append(formatCode16); numberingCache16.Append(pointCount48); numberingCache16.Append(numericPoint46); numberingCache16.Append(numericPoint47); numberingCache16.Append(numericPoint48); numberReference16.Append(formula48); numberReference16.Append(numberingCache16); values16.Append(numberReference16); barChartSeries8.Append(index169); barChartSeries8.Append(order16); barChartSeries8.Append(seriesText16); barChartSeries8.Append(chartShapeProperties31); barChartSeries8.Append(invertIfNegative8); barChartSeries8.Append(categoryAxisData16); barChartSeries8.Append(values16); C.DataLabels dataLabels16 = new C.DataLabels(); C.ShowLegendKey showLegendKey16 = new C.ShowLegendKey(){ Val = false }; C.ShowValue showValue16 = new C.ShowValue(){ Val = false }; C.ShowCategoryName showCategoryName16 = new C.ShowCategoryName(){ Val = false }; C.ShowSeriesName showSeriesName16 = new C.ShowSeriesName(){ Val = false }; C.ShowPercent showPercent16 = new C.ShowPercent(){ Val = false }; C.ShowBubbleSize showBubbleSize16 = new C.ShowBubbleSize(){ Val = false }; dataLabels16.Append(showLegendKey16); dataLabels16.Append(showValue16); dataLabels16.Append(showCategoryName16); dataLabels16.Append(showSeriesName16); dataLabels16.Append(showPercent16); dataLabels16.Append(showBubbleSize16); C.GapWidth gapWidth8 = new C.GapWidth(){ Val = (UInt16Value)219U }; C.Overlap overlap7 = new C.Overlap(){ Val = -27 }; C.AxisId axisId29 = new C.AxisId(){ Val = (UInt32Value)209240832U }; C.AxisId axisId30 = new C.AxisId(){ Val = (UInt32Value)209693768U }; barChart8.Append(barDirection8); barChart8.Append(barGrouping8); barChart8.Append(varyColors16); barChart8.Append(barChartSeries8); barChart8.Append(dataLabels16); barChart8.Append(gapWidth8); barChart8.Append(overlap7); barChart8.Append(axisId29); barChart8.Append(axisId30); C.CategoryAxis categoryAxis8 = new C.CategoryAxis(); C.AxisId axisId31 = new C.AxisId(){ Val = (UInt32Value)209240832U }; C.Scaling scaling15 = new C.Scaling(); C.Orientation orientation15 = new C.Orientation(){ Val = C.OrientationValues.MinMax }; scaling15.Append(orientation15); C.Delete delete15 = new C.Delete(){ Val = false }; C.AxisPosition axisPosition15 = new C.AxisPosition(){ Val = C.AxisPositionValues.Bottom }; C.NumberingFormat numberingFormat26 = new C.NumberingFormat(){ FormatCode = "General", SourceLinked = false }; C.MajorTickMark majorTickMark15 = new C.MajorTickMark(){ Val = C.TickMarkValues.None }; C.MinorTickMark minorTickMark15 = new C.MinorTickMark(){ Val = C.TickMarkValues.None }; C.TickLabelPosition tickLabelPosition15 = new C.TickLabelPosition(){ Val = C.TickLabelPositionValues.NextTo }; C.ChartShapeProperties chartShapeProperties32 = new C.ChartShapeProperties(); A.NoFill noFill87 = new A.NoFill(); A.Outline outline102 = new A.Outline(); A.NoFill noFill88 = new A.NoFill(); outline102.Append(noFill88); A.EffectList effectList84 = new A.EffectList(); chartShapeProperties32.Append(noFill87); chartShapeProperties32.Append(outline102); chartShapeProperties32.Append(effectList84); C.TextProperties textProperties25 = new C.TextProperties(); A.BodyProperties bodyProperties43 = new A.BodyProperties(){ Rotation = -60000000, UseParagraphSpacing = true, VerticalOverflow = A.TextVerticalOverflowValues.Ellipsis, Vertical = A.TextVerticalValues.Horizontal, Wrap = A.TextWrappingValues.Square, Anchor = A.TextAnchoringTypeValues.Center, AnchorCenter = true }; A.ListStyle listStyle43 = new A.ListStyle(); A.Paragraph paragraph43 = new A.Paragraph(); A.ParagraphProperties paragraphProperties25 = new A.ParagraphProperties(); A.DefaultRunProperties defaultRunProperties25 = new A.DefaultRunProperties(){ FontSize = 900, Kerning = 1200 }; A.SolidFill solidFill128 = new A.SolidFill(); A.SchemeColor schemeColor102 = new A.SchemeColor(){ Val = A.SchemeColorValues.Text1 }; A.LuminanceModulation luminanceModulation37 = new A.LuminanceModulation(){ Val = 65000 }; A.LuminanceOffset luminanceOffset31 = new A.LuminanceOffset(){ Val = 35000 }; schemeColor102.Append(luminanceModulation37); schemeColor102.Append(luminanceOffset31); solidFill128.Append(schemeColor102); A.LatinFont latinFont21 = new A.LatinFont(){ Typeface = "+mn-lt" }; A.EastAsianFont eastAsianFont21 = new A.EastAsianFont(){ Typeface = "+mn-ea" }; A.ComplexScriptFont complexScriptFont21 = new A.ComplexScriptFont(){ Typeface = "+mn-cs" }; defaultRunProperties25.Append(solidFill128); defaultRunProperties25.Append(latinFont21); defaultRunProperties25.Append(eastAsianFont21); defaultRunProperties25.Append(complexScriptFont21); paragraphProperties25.Append(defaultRunProperties25); A.EndParagraphRunProperties endParagraphRunProperties25 = new A.EndParagraphRunProperties(){ Language = "en-US" }; paragraph43.Append(paragraphProperties25); paragraph43.Append(endParagraphRunProperties25); textProperties25.Append(bodyProperties43); textProperties25.Append(listStyle43); textProperties25.Append(paragraph43); C.CrossingAxis crossingAxis15 = new C.CrossingAxis(){ Val = (UInt32Value)209693768U }; C.Crosses crosses15 = new C.Crosses(){ Val = C.CrossesValues.AutoZero }; C.AutoLabeled autoLabeled8 = new C.AutoLabeled(){ Val = true }; C.LabelAlignment labelAlignment8 = new C.LabelAlignment(){ Val = C.LabelAlignmentValues.Center }; C.LabelOffset labelOffset8 = new C.LabelOffset(){ Val = (UInt16Value)100U }; C.NoMultiLevelLabels noMultiLevelLabels8 = new C.NoMultiLevelLabels(){ Val = false }; categoryAxis8.Append(axisId31); categoryAxis8.Append(scaling15); categoryAxis8.Append(delete15); categoryAxis8.Append(axisPosition15); categoryAxis8.Append(numberingFormat26); categoryAxis8.Append(majorTickMark15); categoryAxis8.Append(minorTickMark15); categoryAxis8.Append(tickLabelPosition15); categoryAxis8.Append(chartShapeProperties32); categoryAxis8.Append(textProperties25); categoryAxis8.Append(crossingAxis15); categoryAxis8.Append(crosses15); categoryAxis8.Append(autoLabeled8); categoryAxis8.Append(labelAlignment8); categoryAxis8.Append(labelOffset8); categoryAxis8.Append(noMultiLevelLabels8); C.ValueAxis valueAxis8 = new C.ValueAxis(); C.AxisId axisId32 = new C.AxisId(){ Val = (UInt32Value)209693768U }; C.Scaling scaling16 = new C.Scaling(); C.Orientation orientation16 = new C.Orientation(){ Val = C.OrientationValues.MinMax }; scaling16.Append(orientation16); C.Delete delete16 = new C.Delete(){ Val = false }; C.AxisPosition axisPosition16 = new C.AxisPosition(){ Val = C.AxisPositionValues.Left }; C.MajorGridlines majorGridlines8 = new C.MajorGridlines(); C.ChartShapeProperties chartShapeProperties33 = new C.ChartShapeProperties(); A.Outline outline103 = new A.Outline(){ Width = 9525, CapType = A.LineCapValues.Flat, CompoundLineType = A.CompoundLineValues.Single, Alignment = A.PenAlignmentValues.Center }; A.SolidFill solidFill129 = new A.SolidFill(); A.SchemeColor schemeColor103 = new A.SchemeColor(){ Val = A.SchemeColorValues.Text1 }; A.LuminanceModulation luminanceModulation38 = new A.LuminanceModulation(){ Val = 15000 }; A.LuminanceOffset luminanceOffset32 = new A.LuminanceOffset(){ Val = 85000 }; schemeColor103.Append(luminanceModulation38); schemeColor103.Append(luminanceOffset32); solidFill129.Append(schemeColor103); A.Round round13 = new A.Round(); outline103.Append(solidFill129); outline103.Append(round13); A.EffectList effectList85 = new A.EffectList(); chartShapeProperties33.Append(outline103); chartShapeProperties33.Append(effectList85); majorGridlines8.Append(chartShapeProperties33); C.NumberingFormat numberingFormat27 = new C.NumberingFormat(){ FormatCode = "General", SourceLinked = true }; C.MajorTickMark majorTickMark16 = new C.MajorTickMark(){ Val = C.TickMarkValues.None }; C.MinorTickMark minorTickMark16 = new C.MinorTickMark(){ Val = C.TickMarkValues.None }; C.TickLabelPosition tickLabelPosition16 = new C.TickLabelPosition(){ Val = C.TickLabelPositionValues.NextTo }; C.ChartShapeProperties chartShapeProperties34 = new C.ChartShapeProperties(); A.NoFill noFill89 = new A.NoFill(); A.Outline outline104 = new A.Outline(); A.NoFill noFill90 = new A.NoFill(); outline104.Append(noFill90); A.EffectList effectList86 = new A.EffectList(); chartShapeProperties34.Append(noFill89); chartShapeProperties34.Append(outline104); chartShapeProperties34.Append(effectList86); C.TextProperties textProperties26 = new C.TextProperties(); A.BodyProperties bodyProperties44 = new A.BodyProperties(){ Rotation = -60000000, UseParagraphSpacing = true, VerticalOverflow = A.TextVerticalOverflowValues.Ellipsis, Vertical = A.TextVerticalValues.Horizontal, Wrap = A.TextWrappingValues.Square, Anchor = A.TextAnchoringTypeValues.Center, AnchorCenter = true }; A.ListStyle listStyle44 = new A.ListStyle(); A.Paragraph paragraph44 = new A.Paragraph(); A.ParagraphProperties paragraphProperties26 = new A.ParagraphProperties(); A.DefaultRunProperties defaultRunProperties26 = new A.DefaultRunProperties(){ FontSize = 900, Kerning = 1200 }; A.SolidFill solidFill130 = new A.SolidFill(); A.SchemeColor schemeColor104 = new A.SchemeColor(){ Val = A.SchemeColorValues.Text1 }; A.LuminanceModulation luminanceModulation39 = new A.LuminanceModulation(){ Val = 65000 }; A.LuminanceOffset luminanceOffset33 = new A.LuminanceOffset(){ Val = 35000 }; schemeColor104.Append(luminanceModulation39); schemeColor104.Append(luminanceOffset33); solidFill130.Append(schemeColor104); A.LatinFont latinFont22 = new A.LatinFont(){ Typeface = "+mn-lt" }; A.EastAsianFont eastAsianFont22 = new A.EastAsianFont(){ Typeface = "+mn-ea" }; A.ComplexScriptFont complexScriptFont22 = new A.ComplexScriptFont(){ Typeface = "+mn-cs" }; defaultRunProperties26.Append(solidFill130); defaultRunProperties26.Append(latinFont22); defaultRunProperties26.Append(eastAsianFont22); defaultRunProperties26.Append(complexScriptFont22); paragraphProperties26.Append(defaultRunProperties26); A.EndParagraphRunProperties endParagraphRunProperties26 = new A.EndParagraphRunProperties(){ Language = "en-US" }; paragraph44.Append(paragraphProperties26); paragraph44.Append(endParagraphRunProperties26); textProperties26.Append(bodyProperties44); textProperties26.Append(listStyle44); textProperties26.Append(paragraph44); C.CrossingAxis crossingAxis16 = new C.CrossingAxis(){ Val = (UInt32Value)209240832U }; C.Crosses crosses16 = new C.Crosses(){ Val = C.CrossesValues.AutoZero }; C.CrossBetween crossBetween8 = new C.CrossBetween(){ Val = C.CrossBetweenValues.Between }; valueAxis8.Append(axisId32); valueAxis8.Append(scaling16); valueAxis8.Append(delete16); valueAxis8.Append(axisPosition16); valueAxis8.Append(majorGridlines8); valueAxis8.Append(numberingFormat27); valueAxis8.Append(majorTickMark16); valueAxis8.Append(minorTickMark16); valueAxis8.Append(tickLabelPosition16); valueAxis8.Append(chartShapeProperties34); valueAxis8.Append(textProperties26); valueAxis8.Append(crossingAxis16); valueAxis8.Append(crosses16); valueAxis8.Append(crossBetween8); C.ShapeProperties shapeProperties68 = new C.ShapeProperties(); A.SolidFill solidFill131 = new A.SolidFill(); A.SchemeColor schemeColor105 = new A.SchemeColor(){ Val = A.SchemeColorValues.Background1 }; solidFill131.Append(schemeColor105); A.Outline outline105 = new A.Outline(); A.NoFill noFill91 = new A.NoFill(); outline105.Append(noFill91); A.EffectList effectList87 = new A.EffectList(); shapeProperties68.Append(solidFill131); shapeProperties68.Append(outline105); shapeProperties68.Append(effectList87); plotArea16.Append(layout16); plotArea16.Append(barChart8); plotArea16.Append(categoryAxis8); plotArea16.Append(valueAxis8); plotArea16.Append(shapeProperties68); C.Legend legend16 = new C.Legend(); C.LegendPosition legendPosition16 = new C.LegendPosition(){ Val = C.LegendPositionValues.Bottom }; C.Overlay overlay32 = new C.Overlay(){ Val = false }; C.ChartShapeProperties chartShapeProperties35 = new C.ChartShapeProperties(); A.NoFill noFill92 = new A.NoFill(); A.Outline outline106 = new A.Outline(); A.NoFill noFill93 = new A.NoFill(); outline106.Append(noFill93); A.EffectList effectList88 = new A.EffectList(); chartShapeProperties35.Append(noFill92); chartShapeProperties35.Append(outline106); chartShapeProperties35.Append(effectList88); C.TextProperties textProperties27 = new C.TextProperties(); A.BodyProperties bodyProperties45 = new A.BodyProperties(){ Rotation = 0, UseParagraphSpacing = true, VerticalOverflow = A.TextVerticalOverflowValues.Ellipsis, Vertical = A.TextVerticalValues.Horizontal, Wrap = A.TextWrappingValues.Square, Anchor = A.TextAnchoringTypeValues.Center, AnchorCenter = true }; A.ListStyle listStyle45 = new A.ListStyle(); A.Paragraph paragraph45 = new A.Paragraph(); A.ParagraphProperties paragraphProperties27 = new A.ParagraphProperties(); A.DefaultRunProperties defaultRunProperties27 = new A.DefaultRunProperties(){ FontSize = 900, Kerning = 1200 }; A.SolidFill solidFill132 = new A.SolidFill(); A.SchemeColor schemeColor106 = new A.SchemeColor(){ Val = A.SchemeColorValues.Text1 }; A.LuminanceModulation luminanceModulation40 = new A.LuminanceModulation(){ Val = 65000 }; A.LuminanceOffset luminanceOffset34 = new A.LuminanceOffset(){ Val = 35000 }; schemeColor106.Append(luminanceModulation40); schemeColor106.Append(luminanceOffset34); solidFill132.Append(schemeColor106); A.LatinFont latinFont23 = new A.LatinFont(){ Typeface = "+mn-lt" }; A.EastAsianFont eastAsianFont23 = new A.EastAsianFont(){ Typeface = "+mn-ea" }; A.ComplexScriptFont complexScriptFont23 = new A.ComplexScriptFont(){ Typeface = "+mn-cs" }; defaultRunProperties27.Append(solidFill132); defaultRunProperties27.Append(latinFont23); defaultRunProperties27.Append(eastAsianFont23); defaultRunProperties27.Append(complexScriptFont23); paragraphProperties27.Append(defaultRunProperties27); A.EndParagraphRunProperties endParagraphRunProperties27 = new A.EndParagraphRunProperties(){ Language = "en-US" }; paragraph45.Append(paragraphProperties27); paragraph45.Append(endParagraphRunProperties27); textProperties27.Append(bodyProperties45); textProperties27.Append(listStyle45); textProperties27.Append(paragraph45); legend16.Append(legendPosition16); legend16.Append(overlay32); legend16.Append(chartShapeProperties35); legend16.Append(textProperties27); C.PlotVisibleOnly plotVisibleOnly16 = new C.PlotVisibleOnly(){ Val = true }; C.DisplayBlanksAs displayBlanksAs16 = new C.DisplayBlanksAs(){ Val = C.DisplayBlanksAsValues.Gap }; C.ShowDataLabelsOverMaximum showDataLabelsOverMaximum16 = new C.ShowDataLabelsOverMaximum(){ Val = false }; chart16.Append(title16); chart16.Append(autoTitleDeleted16); chart16.Append(pivotFormats16); chart16.Append(plotArea16); chart16.Append(legend16); chart16.Append(plotVisibleOnly16); chart16.Append(displayBlanksAs16); chart16.Append(showDataLabelsOverMaximum16); C.ShapeProperties shapeProperties69 = new C.ShapeProperties(); A.SolidFill solidFill133 = new A.SolidFill(); A.SchemeColor schemeColor107 = new A.SchemeColor(){ Val = A.SchemeColorValues.Background1 }; solidFill133.Append(schemeColor107); A.Outline outline107 = new A.Outline(){ Width = 9525, CapType = A.LineCapValues.Flat, CompoundLineType = A.CompoundLineValues.Single, Alignment = A.PenAlignmentValues.Center }; A.SolidFill solidFill134 = new A.SolidFill(); A.SchemeColor schemeColor108 = new A.SchemeColor(){ Val = A.SchemeColorValues.Text1 }; A.LuminanceModulation luminanceModulation41 = new A.LuminanceModulation(){ Val = 15000 }; A.LuminanceOffset luminanceOffset35 = new A.LuminanceOffset(){ Val = 85000 }; schemeColor108.Append(luminanceModulation41); schemeColor108.Append(luminanceOffset35); solidFill134.Append(schemeColor108); A.Round round14 = new A.Round(); outline107.Append(solidFill134); outline107.Append(round14); A.EffectList effectList89 = new A.EffectList(); shapeProperties69.Append(solidFill133); shapeProperties69.Append(outline107); shapeProperties69.Append(effectList89); C.TextProperties textProperties28 = new C.TextProperties(); A.BodyProperties bodyProperties46 = new A.BodyProperties(); A.ListStyle listStyle46 = new A.ListStyle(); A.Paragraph paragraph46 = new A.Paragraph(); A.ParagraphProperties paragraphProperties28 = new A.ParagraphProperties(); A.DefaultRunProperties defaultRunProperties28 = new A.DefaultRunProperties(); paragraphProperties28.Append(defaultRunProperties28); A.EndParagraphRunProperties endParagraphRunProperties28 = new A.EndParagraphRunProperties(){ Language = "en-US" }; paragraph46.Append(paragraphProperties28); paragraph46.Append(endParagraphRunProperties28); textProperties28.Append(bodyProperties46); textProperties28.Append(listStyle46); textProperties28.Append(paragraph46); C.PrintSettings printSettings16 = new C.PrintSettings(); C.HeaderFooter headerFooter16 = new C.HeaderFooter(); C.PageMargins pageMargins26 = new C.PageMargins(){ Left = 0.7D, Right = 0.7D, Top = 0.75D, Bottom = 0.75D, Header = 0.3D, Footer = 0.3D }; C.PageSetup pageSetup16 = new C.PageSetup(); printSettings16.Append(headerFooter16); printSettings16.Append(pageMargins26); printSettings16.Append(pageSetup16); C.ChartSpaceExtensionList chartSpaceExtensionList16 = new C.ChartSpaceExtensionList(); chartSpaceExtensionList16.AddNamespaceDeclaration("c14", "http://schemas.microsoft.com/office/drawing/2007/8/2/chart"); C.ChartSpaceExtension chartSpaceExtension16 = new C.ChartSpaceExtension(){ Uri = "{781A3756-C4B2-4CAC-9D66-4F8BD8637D16}" }; chartSpaceExtension16.AddNamespaceDeclaration("c14", "http://schemas.microsoft.com/office/drawing/2007/8/2/chart"); C14.PivotOptions pivotOptions16 = new C14.PivotOptions(); C14.DropZoneFilter dropZoneFilter16 = new C14.DropZoneFilter(){ Val = true }; C14.DropZoneCategories dropZoneCategories16 = new C14.DropZoneCategories(){ Val = true }; C14.DropZoneData dropZoneData16 = new C14.DropZoneData(){ Val = true }; C14.DropZoneSeries dropZoneSeries16 = new C14.DropZoneSeries(){ Val = true }; C14.DropZonesVisible dropZonesVisible16 = new C14.DropZonesVisible(){ Val = true }; pivotOptions16.Append(dropZoneFilter16); pivotOptions16.Append(dropZoneCategories16); pivotOptions16.Append(dropZoneData16); pivotOptions16.Append(dropZoneSeries16); pivotOptions16.Append(dropZonesVisible16); chartSpaceExtension16.Append(pivotOptions16); chartSpaceExtensionList16.Append(chartSpaceExtension16); chartSpace16.Append(date190416); chartSpace16.Append(editingLanguage16); chartSpace16.Append(roundedCorners16); chartSpace16.Append(style31); chartSpace16.Append(pivotSource16); chartSpace16.Append(chart16); chartSpace16.Append(shapeProperties69); chartSpace16.Append(textProperties28); chartSpace16.Append(printSettings16); chartSpace16.Append(chartSpaceExtensionList16); chartPart16.ChartSpace = chartSpace16; }
internal void FeedDataChartPart(ChartPart NewPart, ChartPart ExistingPart) { using (StreamReader sr = new StreamReader(ExistingPart.GetStream())) { using (StreamWriter sw = new StreamWriter(NewPart.GetStream(FileMode.Create))) { sw.Write(sr.ReadToEnd()); } } ImagePart imgpNew; if (ExistingPart.ChartDrawingPart != null) { NewPart.AddNewPart<ChartDrawingPart>(ExistingPart.GetIdOfPart(ExistingPart.ChartDrawingPart)); using (StreamReader sr = new StreamReader(ExistingPart.ChartDrawingPart.GetStream())) { using (StreamWriter sw = new StreamWriter(NewPart.ChartDrawingPart.GetStream(FileMode.Create))) { sw.Write(sr.ReadToEnd()); } } // why does a ChartPart contain a ChartDrawingPart that contains a ChartPart?? // Does it never end?? if (ExistingPart.ChartDrawingPart.ChartPart != null) { NewPart.ChartDrawingPart.AddNewPart<ChartPart>(ExistingPart.ChartDrawingPart.GetIdOfPart(ExistingPart.ChartDrawingPart.ChartPart)); this.FeedDataChartPart(NewPart.ChartDrawingPart.ChartPart, ExistingPart.ChartDrawingPart.ChartPart); } foreach (ImagePart imgp in ExistingPart.ChartDrawingPart.ImageParts) { imgpNew = NewPart.ChartDrawingPart.AddImagePart(imgp.ContentType, ExistingPart.ChartDrawingPart.GetIdOfPart(imgp)); this.FeedDataImagePart(imgpNew, imgp); } } if (ExistingPart.EmbeddedPackagePart != null) { NewPart.AddEmbeddedPackagePart(ExistingPart.EmbeddedPackagePart.ContentType); this.FeedDataEmbeddedPackagePart(NewPart.EmbeddedPackagePart, ExistingPart.EmbeddedPackagePart); } foreach (ImagePart imgp in ExistingPart.ImageParts) { imgpNew = NewPart.AddImagePart(imgp.ContentType, ExistingPart.GetIdOfPart(imgp)); this.FeedDataImagePart(imgpNew, imgp); } if (ExistingPart.ThemeOverridePart != null) { NewPart.AddNewPart<ThemeOverridePart>(ExistingPart.GetIdOfPart(ExistingPart.ThemeOverridePart)); this.FeedDataThemeOverridePart(NewPart.ThemeOverridePart, ExistingPart.ThemeOverridePart); } }
// Generates content of chartPart7. private void GenerateChartPart7Content(ChartPart chartPart7) { C.ChartSpace chartSpace7 = new C.ChartSpace(); chartSpace7.AddNamespaceDeclaration("c", "http://schemas.openxmlformats.org/drawingml/2006/chart"); chartSpace7.AddNamespaceDeclaration("a", "http://schemas.openxmlformats.org/drawingml/2006/main"); chartSpace7.AddNamespaceDeclaration("r", "http://schemas.openxmlformats.org/officeDocument/2006/relationships"); C.Date1904 date19047 = new C.Date1904(){ Val = false }; C.EditingLanguage editingLanguage7 = new C.EditingLanguage(){ Val = "en-US" }; C.RoundedCorners roundedCorners7 = new C.RoundedCorners(){ Val = false }; AlternateContent alternateContent16 = new AlternateContent(); alternateContent16.AddNamespaceDeclaration("mc", "http://schemas.openxmlformats.org/markup-compatibility/2006"); AlternateContentChoice alternateContentChoice16 = new AlternateContentChoice(){ Requires = "c14" }; alternateContentChoice16.AddNamespaceDeclaration("c14", "http://schemas.microsoft.com/office/drawing/2007/8/2/chart"); C14.Style style13 = new C14.Style(){ Val = 102 }; alternateContentChoice16.Append(style13); AlternateContentFallback alternateContentFallback15 = new AlternateContentFallback(); C.Style style14 = new C.Style(){ Val = 2 }; alternateContentFallback15.Append(style14); alternateContent16.Append(alternateContentChoice16); alternateContent16.Append(alternateContentFallback15); C.PivotSource pivotSource7 = new C.PivotSource(); C.PivotTableName pivotTableName7 = new C.PivotTableName(); pivotTableName7.Text = "[GeneratedDocument.xlsx]ShowHeader!PivotTable1"; C.FormatId formatId7 = new C.FormatId(){ Val = (UInt32Value)10U }; pivotSource7.Append(pivotTableName7); pivotSource7.Append(formatId7); C.Chart chart7 = new C.Chart(); C.Title title7 = new C.Title(); C.Overlay overlay13 = new C.Overlay(){ Val = false }; title7.Append(overlay13); C.AutoTitleDeleted autoTitleDeleted7 = new C.AutoTitleDeleted(){ Val = false }; C.PivotFormats pivotFormats7 = new C.PivotFormats(); C.PivotFormat pivotFormat47 = new C.PivotFormat(); C.Index index53 = new C.Index(){ Val = (UInt32Value)0U }; C.Marker marker47 = new C.Marker(); C.Symbol symbol47 = new C.Symbol(){ Val = C.MarkerStyleValues.None }; marker47.Append(symbol47); pivotFormat47.Append(index53); pivotFormat47.Append(marker47); C.PivotFormat pivotFormat48 = new C.PivotFormat(); C.Index index54 = new C.Index(){ Val = (UInt32Value)1U }; C.Marker marker48 = new C.Marker(); C.Symbol symbol48 = new C.Symbol(){ Val = C.MarkerStyleValues.None }; marker48.Append(symbol48); pivotFormat48.Append(index54); pivotFormat48.Append(marker48); C.PivotFormat pivotFormat49 = new C.PivotFormat(); C.Index index55 = new C.Index(){ Val = (UInt32Value)2U }; C.Marker marker49 = new C.Marker(); C.Symbol symbol49 = new C.Symbol(){ Val = C.MarkerStyleValues.None }; marker49.Append(symbol49); pivotFormat49.Append(index55); pivotFormat49.Append(marker49); pivotFormats7.Append(pivotFormat47); pivotFormats7.Append(pivotFormat48); pivotFormats7.Append(pivotFormat49); C.PlotArea plotArea7 = new C.PlotArea(); C.Layout layout7 = new C.Layout(); C.PieChart pieChart4 = new C.PieChart(); C.VaryColors varyColors7 = new C.VaryColors(){ Val = true }; C.PieChartSeries pieChartSeries4 = new C.PieChartSeries(); C.Index index56 = new C.Index(){ Val = (UInt32Value)0U }; C.Order order7 = new C.Order(){ Val = (UInt32Value)0U }; C.SeriesText seriesText7 = new C.SeriesText(); C.StringReference stringReference13 = new C.StringReference(); C.Formula formula19 = new C.Formula(); formula19.Text = "ShowHeader!$B$1"; C.StringCache stringCache13 = new C.StringCache(); C.PointCount pointCount19 = new C.PointCount(){ Val = (UInt32Value)1U }; C.StringPoint stringPoint25 = new C.StringPoint(){ Index = (UInt32Value)0U }; C.NumericValue numericValue43 = new C.NumericValue(); numericValue43.Text = "Total"; stringPoint25.Append(numericValue43); stringCache13.Append(pointCount19); stringCache13.Append(stringPoint25); stringReference13.Append(formula19); stringReference13.Append(stringCache13); seriesText7.Append(stringReference13); C.CategoryAxisData categoryAxisData7 = new C.CategoryAxisData(); C.StringReference stringReference14 = new C.StringReference(); C.Formula formula20 = new C.Formula(); formula20.Text = "ShowHeader!$A$2:$A$5"; C.StringCache stringCache14 = new C.StringCache(); C.PointCount pointCount20 = new C.PointCount(){ Val = (UInt32Value)3U }; C.StringPoint stringPoint26 = new C.StringPoint(){ Index = (UInt32Value)0U }; C.NumericValue numericValue44 = new C.NumericValue(); numericValue44.Text = "product_A"; stringPoint26.Append(numericValue44); C.StringPoint stringPoint27 = new C.StringPoint(){ Index = (UInt32Value)1U }; C.NumericValue numericValue45 = new C.NumericValue(); numericValue45.Text = "product_D"; stringPoint27.Append(numericValue45); C.StringPoint stringPoint28 = new C.StringPoint(){ Index = (UInt32Value)2U }; C.NumericValue numericValue46 = new C.NumericValue(); numericValue46.Text = "product_E"; stringPoint28.Append(numericValue46); stringCache14.Append(pointCount20); stringCache14.Append(stringPoint26); stringCache14.Append(stringPoint27); stringCache14.Append(stringPoint28); stringReference14.Append(formula20); stringReference14.Append(stringCache14); categoryAxisData7.Append(stringReference14); C.Values values7 = new C.Values(); C.NumberReference numberReference7 = new C.NumberReference(); C.Formula formula21 = new C.Formula(); formula21.Text = "ShowHeader!$B$2:$B$5"; C.NumberingCache numberingCache7 = new C.NumberingCache(); C.FormatCode formatCode7 = new C.FormatCode(); formatCode7.Text = "General"; C.PointCount pointCount21 = new C.PointCount(){ Val = (UInt32Value)3U }; C.NumericPoint numericPoint19 = new C.NumericPoint(){ Index = (UInt32Value)0U }; C.NumericValue numericValue47 = new C.NumericValue(); numericValue47.Text = "19"; numericPoint19.Append(numericValue47); C.NumericPoint numericPoint20 = new C.NumericPoint(){ Index = (UInt32Value)1U }; C.NumericValue numericValue48 = new C.NumericValue(); numericValue48.Text = "13"; numericPoint20.Append(numericValue48); C.NumericPoint numericPoint21 = new C.NumericPoint(){ Index = (UInt32Value)2U }; C.NumericValue numericValue49 = new C.NumericValue(); numericValue49.Text = "33"; numericPoint21.Append(numericValue49); numberingCache7.Append(formatCode7); numberingCache7.Append(pointCount21); numberingCache7.Append(numericPoint19); numberingCache7.Append(numericPoint20); numberingCache7.Append(numericPoint21); numberReference7.Append(formula21); numberReference7.Append(numberingCache7); values7.Append(numberReference7); pieChartSeries4.Append(index56); pieChartSeries4.Append(order7); pieChartSeries4.Append(seriesText7); pieChartSeries4.Append(categoryAxisData7); pieChartSeries4.Append(values7); C.DataLabels dataLabels7 = new C.DataLabels(); C.ShowLegendKey showLegendKey7 = new C.ShowLegendKey(){ Val = false }; C.ShowValue showValue7 = new C.ShowValue(){ Val = false }; C.ShowCategoryName showCategoryName7 = new C.ShowCategoryName(){ Val = false }; C.ShowSeriesName showSeriesName7 = new C.ShowSeriesName(){ Val = false }; C.ShowPercent showPercent7 = new C.ShowPercent(){ Val = false }; C.ShowBubbleSize showBubbleSize7 = new C.ShowBubbleSize(){ Val = false }; C.ShowLeaderLines showLeaderLines4 = new C.ShowLeaderLines(){ Val = true }; dataLabels7.Append(showLegendKey7); dataLabels7.Append(showValue7); dataLabels7.Append(showCategoryName7); dataLabels7.Append(showSeriesName7); dataLabels7.Append(showPercent7); dataLabels7.Append(showBubbleSize7); dataLabels7.Append(showLeaderLines4); C.FirstSliceAngle firstSliceAngle4 = new C.FirstSliceAngle(){ Val = (UInt16Value)0U }; pieChart4.Append(varyColors7); pieChart4.Append(pieChartSeries4); pieChart4.Append(dataLabels7); pieChart4.Append(firstSliceAngle4); plotArea7.Append(layout7); plotArea7.Append(pieChart4); C.Legend legend7 = new C.Legend(); C.LegendPosition legendPosition7 = new C.LegendPosition(){ Val = C.LegendPositionValues.Right }; C.Overlay overlay14 = new C.Overlay(){ Val = false }; legend7.Append(legendPosition7); legend7.Append(overlay14); C.PlotVisibleOnly plotVisibleOnly7 = new C.PlotVisibleOnly(){ Val = true }; C.DisplayBlanksAs displayBlanksAs7 = new C.DisplayBlanksAs(){ Val = C.DisplayBlanksAsValues.Gap }; C.ShowDataLabelsOverMaximum showDataLabelsOverMaximum7 = new C.ShowDataLabelsOverMaximum(){ Val = false }; chart7.Append(title7); chart7.Append(autoTitleDeleted7); chart7.Append(pivotFormats7); chart7.Append(plotArea7); chart7.Append(legend7); chart7.Append(plotVisibleOnly7); chart7.Append(displayBlanksAs7); chart7.Append(showDataLabelsOverMaximum7); C.PrintSettings printSettings7 = new C.PrintSettings(); C.HeaderFooter headerFooter7 = new C.HeaderFooter(); C.PageMargins pageMargins13 = new C.PageMargins(){ Left = 0.7D, Right = 0.7D, Top = 0.75D, Bottom = 0.75D, Header = 0.3D, Footer = 0.3D }; C.PageSetup pageSetup7 = new C.PageSetup(); printSettings7.Append(headerFooter7); printSettings7.Append(pageMargins13); printSettings7.Append(pageSetup7); C.ChartSpaceExtensionList chartSpaceExtensionList7 = new C.ChartSpaceExtensionList(); chartSpaceExtensionList7.AddNamespaceDeclaration("c14", "http://schemas.microsoft.com/office/drawing/2007/8/2/chart"); chartSpaceExtensionList7.AddNamespaceDeclaration("mc", "http://schemas.openxmlformats.org/markup-compatibility/2006"); C.ChartSpaceExtension chartSpaceExtension7 = new C.ChartSpaceExtension(){ Uri = "{781A3756-C4B2-4CAC-9D66-4F8BD8637D16}" }; chartSpaceExtension7.AddNamespaceDeclaration("c14", "http://schemas.microsoft.com/office/drawing/2007/8/2/chart"); C14.PivotOptions pivotOptions7 = new C14.PivotOptions(); C14.DropZoneFilter dropZoneFilter7 = new C14.DropZoneFilter(){ Val = true }; C14.DropZoneCategories dropZoneCategories7 = new C14.DropZoneCategories(){ Val = true }; C14.DropZoneData dropZoneData7 = new C14.DropZoneData(){ Val = true }; C14.DropZoneSeries dropZoneSeries7 = new C14.DropZoneSeries(){ Val = true }; C14.DropZonesVisible dropZonesVisible7 = new C14.DropZonesVisible(){ Val = true }; pivotOptions7.Append(dropZoneFilter7); pivotOptions7.Append(dropZoneCategories7); pivotOptions7.Append(dropZoneData7); pivotOptions7.Append(dropZoneSeries7); pivotOptions7.Append(dropZonesVisible7); chartSpaceExtension7.Append(pivotOptions7); chartSpaceExtensionList7.Append(chartSpaceExtension7); chartSpace7.Append(date19047); chartSpace7.Append(editingLanguage7); chartSpace7.Append(roundedCorners7); chartSpace7.Append(alternateContent16); chartSpace7.Append(pivotSource7); chartSpace7.Append(chart7); chartSpace7.Append(printSettings7); chartSpace7.Append(chartSpaceExtensionList7); chartPart7.ChartSpace = chartSpace7; }
internal C.ChartSpace ToChartSpace(ref ChartPart chartp) { ImagePart imgp; C.ChartSpace cs = new C.ChartSpace(); cs.AddNamespaceDeclaration("c", "http://schemas.openxmlformats.org/drawingml/2006/chart"); cs.AddNamespaceDeclaration("a", "http://schemas.openxmlformats.org/drawingml/2006/main"); cs.AddNamespaceDeclaration("r", "http://schemas.openxmlformats.org/officeDocument/2006/relationships"); cs.Date1904 = new C.Date1904() { Val = this.Date1904 }; cs.EditingLanguage = new C.EditingLanguage(); cs.EditingLanguage.Val = System.Globalization.CultureInfo.CurrentCulture.Name; cs.RoundedCorners = new C.RoundedCorners() { Val = this.RoundedCorners }; AlternateContent altcontent = new AlternateContent(); altcontent.AddNamespaceDeclaration("mc", "http://schemas.openxmlformats.org/markup-compatibility/2006"); AlternateContentChoice altcontentchoice = new AlternateContentChoice() { Requires = "c14" }; altcontentchoice.AddNamespaceDeclaration("c14", "http://schemas.microsoft.com/office/drawing/2007/8/2/chart"); // why +100? I don't know... ask Microsoft. But there are 48 styles. Even with the // advanced "+100" version, it's 96 total. It's a byte, with 256 possibilities. // As of this writing, Excel 2013 is rumoured to dispense away with this chart styling. // So maybe all this is moot anyway... altcontentchoice.Append(new C14.Style() { Val = (byte)(this.ChartStyle + 100) }); altcontent.Append(altcontentchoice); AlternateContentFallback altcontentfallback = new AlternateContentFallback(); altcontentfallback.Append(new C.Style() { Val = (byte)this.ChartStyle }); altcontent.Append(altcontentfallback); cs.Append(altcontent); C.Chart chart = new C.Chart(); if (this.HasView3D) { chart.View3D = new C.View3D(); if (this.RotateX != null) chart.View3D.RotateX = new C.RotateX() { Val = this.RotateX.Value }; if (this.HeightPercent != null) chart.View3D.HeightPercent = new C.HeightPercent() { Val = this.HeightPercent.Value }; if (this.RotateY != null) chart.View3D.RotateY = new C.RotateY() { Val = this.RotateY.Value }; if (this.DepthPercent != null) chart.View3D.DepthPercent = new C.DepthPercent() { Val = this.DepthPercent }; if (this.RightAngleAxes != null) chart.View3D.RightAngleAxes = new C.RightAngleAxes() { Val = this.RightAngleAxes.Value }; if (this.Perspective != null) chart.View3D.Perspective = new C.Perspective() { Val = this.Perspective.Value }; } if (this.HasTitle) { if (this.Title.Fill.Type == SLA.SLFillType.BlipFill) { imgp = chartp.AddImagePart(SLA.SLDrawingTool.GetImagePartType(this.Title.Fill.BlipFileName)); using (FileStream fs = new FileStream(this.Title.Fill.BlipFileName, FileMode.Open)) { imgp.FeedData(fs); } this.Title.Fill.BlipRelationshipID = chartp.GetIdOfPart(imgp); } chart.Title = this.Title.ToTitle(); } else { chart.AutoTitleDeleted = new C.AutoTitleDeleted() { Val = true }; } if (this.Is3D) { chart.Floor = new C.Floor(); chart.Floor.Thickness = new C.Thickness() { Val = this.Floor.Thickness }; if (this.Floor.ShapeProperties.HasShapeProperties) { if (this.Floor.Fill.Type == SLA.SLFillType.BlipFill) { imgp = chartp.AddImagePart(SLA.SLDrawingTool.GetImagePartType(this.Floor.Fill.BlipFileName)); using (FileStream fs = new FileStream(this.Floor.Fill.BlipFileName, FileMode.Open)) { imgp.FeedData(fs); } this.Floor.Fill.BlipRelationshipID = chartp.GetIdOfPart(imgp); } chart.Floor.ShapeProperties = this.Floor.ShapeProperties.ToCShapeProperties(); } chart.SideWall = new C.SideWall(); chart.SideWall.Thickness = new C.Thickness() { Val = this.SideWall.Thickness }; if (this.SideWall.ShapeProperties.HasShapeProperties) { if (this.SideWall.Fill.Type == SLA.SLFillType.BlipFill) { imgp = chartp.AddImagePart(SLA.SLDrawingTool.GetImagePartType(this.SideWall.Fill.BlipFileName)); using (FileStream fs = new FileStream(this.SideWall.Fill.BlipFileName, FileMode.Open)) { imgp.FeedData(fs); } this.SideWall.Fill.BlipRelationshipID = chartp.GetIdOfPart(imgp); } chart.SideWall.ShapeProperties = this.SideWall.ShapeProperties.ToCShapeProperties(); } chart.BackWall = new C.BackWall(); chart.BackWall.Thickness = new C.Thickness() { Val = this.BackWall.Thickness }; if (this.BackWall.ShapeProperties.HasShapeProperties) { if (this.BackWall.Fill.Type == SLA.SLFillType.BlipFill) { imgp = chartp.AddImagePart(SLA.SLDrawingTool.GetImagePartType(this.BackWall.Fill.BlipFileName)); using (FileStream fs = new FileStream(this.BackWall.Fill.BlipFileName, FileMode.Open)) { imgp.FeedData(fs); } this.BackWall.Fill.BlipRelationshipID = chartp.GetIdOfPart(imgp); } chart.BackWall.ShapeProperties = this.BackWall.ShapeProperties.ToCShapeProperties(); } } if (this.PlotArea.Fill.Type == SLA.SLFillType.BlipFill) { imgp = chartp.AddImagePart(SLA.SLDrawingTool.GetImagePartType(this.PlotArea.Fill.BlipFileName)); using (FileStream fs = new FileStream(this.PlotArea.Fill.BlipFileName, FileMode.Open)) { imgp.FeedData(fs); } this.PlotArea.Fill.BlipRelationshipID = chartp.GetIdOfPart(imgp); } chart.PlotArea = this.PlotArea.ToPlotArea(); if (this.ShowLegend) { if (this.Legend.Fill.Type == SLA.SLFillType.BlipFill) { imgp = chartp.AddImagePart(SLA.SLDrawingTool.GetImagePartType(this.Legend.Fill.BlipFileName)); using (FileStream fs = new FileStream(this.Legend.Fill.BlipFileName, FileMode.Open)) { imgp.FeedData(fs); } this.Legend.Fill.BlipRelationshipID = chartp.GetIdOfPart(imgp); } chart.Legend = this.Legend.ToLegend(); } if (this.ShowHiddenData == false) { chart.PlotVisibleOnly = new C.PlotVisibleOnly() { Val = true }; } else { //don't do anything } chart.DisplayBlanksAs = new C.DisplayBlanksAs() { Val = this.ShowEmptyCellsAs }; cs.Append(chart); if (this.ShapeProperties.HasShapeProperties) { cs.Append(this.ShapeProperties.ToCShapeProperties()); } return cs; }
// Generates content of chartPart8. private void GenerateChartPart8Content(ChartPart chartPart8) { C.ChartSpace chartSpace8 = new C.ChartSpace(); chartSpace8.AddNamespaceDeclaration("c", "http://schemas.openxmlformats.org/drawingml/2006/chart"); chartSpace8.AddNamespaceDeclaration("a", "http://schemas.openxmlformats.org/drawingml/2006/main"); chartSpace8.AddNamespaceDeclaration("r", "http://schemas.openxmlformats.org/officeDocument/2006/relationships"); C.Date1904 date19048 = new C.Date1904(){ Val = false }; C.EditingLanguage editingLanguage8 = new C.EditingLanguage(){ Val = "en-US" }; C.RoundedCorners roundedCorners8 = new C.RoundedCorners(){ Val = false }; AlternateContent alternateContent17 = new AlternateContent(); alternateContent17.AddNamespaceDeclaration("mc", "http://schemas.openxmlformats.org/markup-compatibility/2006"); AlternateContentChoice alternateContentChoice17 = new AlternateContentChoice(){ Requires = "c14" }; alternateContentChoice17.AddNamespaceDeclaration("c14", "http://schemas.microsoft.com/office/drawing/2007/8/2/chart"); C14.Style style15 = new C14.Style(){ Val = 101 }; alternateContentChoice17.Append(style15); AlternateContentFallback alternateContentFallback16 = new AlternateContentFallback(); C.Style style16 = new C.Style(){ Val = 1 }; alternateContentFallback16.Append(style16); alternateContent17.Append(alternateContentChoice17); alternateContent17.Append(alternateContentFallback16); C.PivotSource pivotSource8 = new C.PivotSource(); C.PivotTableName pivotTableName8 = new C.PivotTableName(); pivotTableName8.Text = "[GeneratedDocument.xlsx]ShowHeader!PivotTable1"; C.FormatId formatId8 = new C.FormatId(){ Val = (UInt32Value)9U }; pivotSource8.Append(pivotTableName8); pivotSource8.Append(formatId8); C.Chart chart8 = new C.Chart(); C.Title title8 = new C.Title(); C.Overlay overlay15 = new C.Overlay(){ Val = false }; title8.Append(overlay15); C.AutoTitleDeleted autoTitleDeleted8 = new C.AutoTitleDeleted(){ Val = false }; C.PivotFormats pivotFormats8 = new C.PivotFormats(); C.PivotFormat pivotFormat50 = new C.PivotFormat(); C.Index index57 = new C.Index(){ Val = (UInt32Value)0U }; C.ShapeProperties shapeProperties24 = new C.ShapeProperties(); A.SolidFill solidFill44 = new A.SolidFill(); A.SchemeColor schemeColor28 = new A.SchemeColor(){ Val = A.SchemeColorValues.Accent1 }; A.Tint tint14 = new A.Tint(){ Val = 100000 }; schemeColor28.Append(tint14); solidFill44.Append(schemeColor28); A.Outline outline34 = new A.Outline(); A.NoFill noFill28 = new A.NoFill(); outline34.Append(noFill28); A.EffectList effectList26 = new A.EffectList(); shapeProperties24.Append(solidFill44); shapeProperties24.Append(outline34); shapeProperties24.Append(effectList26); C.Marker marker50 = new C.Marker(); C.Symbol symbol50 = new C.Symbol(){ Val = C.MarkerStyleValues.None }; marker50.Append(symbol50); pivotFormat50.Append(index57); pivotFormat50.Append(shapeProperties24); pivotFormat50.Append(marker50); C.PivotFormat pivotFormat51 = new C.PivotFormat(); C.Index index58 = new C.Index(){ Val = (UInt32Value)1U }; C.ShapeProperties shapeProperties25 = new C.ShapeProperties(); A.SolidFill solidFill45 = new A.SolidFill(); A.SchemeColor schemeColor29 = new A.SchemeColor(){ Val = A.SchemeColorValues.Accent2 }; A.Tint tint15 = new A.Tint(){ Val = 100000 }; schemeColor29.Append(tint15); solidFill45.Append(schemeColor29); A.Outline outline35 = new A.Outline(); A.NoFill noFill29 = new A.NoFill(); outline35.Append(noFill29); A.EffectList effectList27 = new A.EffectList(); shapeProperties25.Append(solidFill45); shapeProperties25.Append(outline35); shapeProperties25.Append(effectList27); C.Marker marker51 = new C.Marker(); C.Symbol symbol51 = new C.Symbol(){ Val = C.MarkerStyleValues.None }; marker51.Append(symbol51); pivotFormat51.Append(index58); pivotFormat51.Append(shapeProperties25); pivotFormat51.Append(marker51); C.PivotFormat pivotFormat52 = new C.PivotFormat(); C.Index index59 = new C.Index(){ Val = (UInt32Value)2U }; C.Marker marker52 = new C.Marker(); C.Symbol symbol52 = new C.Symbol(){ Val = C.MarkerStyleValues.None }; marker52.Append(symbol52); pivotFormat52.Append(index59); pivotFormat52.Append(marker52); C.PivotFormat pivotFormat53 = new C.PivotFormat(); C.Index index60 = new C.Index(){ Val = (UInt32Value)3U }; C.Marker marker53 = new C.Marker(); C.Symbol symbol53 = new C.Symbol(){ Val = C.MarkerStyleValues.None }; marker53.Append(symbol53); pivotFormat53.Append(index60); pivotFormat53.Append(marker53); C.PivotFormat pivotFormat54 = new C.PivotFormat(); C.Index index61 = new C.Index(){ Val = (UInt32Value)4U }; C.Marker marker54 = new C.Marker(); C.Symbol symbol54 = new C.Symbol(){ Val = C.MarkerStyleValues.None }; marker54.Append(symbol54); pivotFormat54.Append(index61); pivotFormat54.Append(marker54); C.PivotFormat pivotFormat55 = new C.PivotFormat(); C.Index index62 = new C.Index(){ Val = (UInt32Value)5U }; C.Marker marker55 = new C.Marker(); C.Symbol symbol55 = new C.Symbol(){ Val = C.MarkerStyleValues.None }; marker55.Append(symbol55); pivotFormat55.Append(index62); pivotFormat55.Append(marker55); C.PivotFormat pivotFormat56 = new C.PivotFormat(); C.Index index63 = new C.Index(){ Val = (UInt32Value)6U }; C.Marker marker56 = new C.Marker(); C.Symbol symbol56 = new C.Symbol(){ Val = C.MarkerStyleValues.None }; marker56.Append(symbol56); pivotFormat56.Append(index63); pivotFormat56.Append(marker56); C.PivotFormat pivotFormat57 = new C.PivotFormat(); C.Index index64 = new C.Index(){ Val = (UInt32Value)7U }; C.Marker marker57 = new C.Marker(); C.Symbol symbol57 = new C.Symbol(){ Val = C.MarkerStyleValues.None }; marker57.Append(symbol57); pivotFormat57.Append(index64); pivotFormat57.Append(marker57); C.PivotFormat pivotFormat58 = new C.PivotFormat(); C.Index index65 = new C.Index(){ Val = (UInt32Value)8U }; C.Marker marker58 = new C.Marker(); C.Symbol symbol58 = new C.Symbol(){ Val = C.MarkerStyleValues.None }; marker58.Append(symbol58); pivotFormat58.Append(index65); pivotFormat58.Append(marker58); C.PivotFormat pivotFormat59 = new C.PivotFormat(); C.Index index66 = new C.Index(){ Val = (UInt32Value)9U }; C.Marker marker59 = new C.Marker(); C.Symbol symbol59 = new C.Symbol(){ Val = C.MarkerStyleValues.None }; marker59.Append(symbol59); pivotFormat59.Append(index66); pivotFormat59.Append(marker59); C.PivotFormat pivotFormat60 = new C.PivotFormat(); C.Index index67 = new C.Index(){ Val = (UInt32Value)10U }; C.Marker marker60 = new C.Marker(); C.Symbol symbol60 = new C.Symbol(){ Val = C.MarkerStyleValues.None }; marker60.Append(symbol60); pivotFormat60.Append(index67); pivotFormat60.Append(marker60); C.PivotFormat pivotFormat61 = new C.PivotFormat(); C.Index index68 = new C.Index(){ Val = (UInt32Value)11U }; C.Marker marker61 = new C.Marker(); C.Symbol symbol61 = new C.Symbol(){ Val = C.MarkerStyleValues.None }; marker61.Append(symbol61); pivotFormat61.Append(index68); pivotFormat61.Append(marker61); C.PivotFormat pivotFormat62 = new C.PivotFormat(); C.Index index69 = new C.Index(){ Val = (UInt32Value)12U }; C.Marker marker62 = new C.Marker(); C.Symbol symbol62 = new C.Symbol(){ Val = C.MarkerStyleValues.None }; marker62.Append(symbol62); pivotFormat62.Append(index69); pivotFormat62.Append(marker62); C.PivotFormat pivotFormat63 = new C.PivotFormat(); C.Index index70 = new C.Index(){ Val = (UInt32Value)13U }; C.Marker marker63 = new C.Marker(); C.Symbol symbol63 = new C.Symbol(){ Val = C.MarkerStyleValues.None }; marker63.Append(symbol63); pivotFormat63.Append(index70); pivotFormat63.Append(marker63); C.PivotFormat pivotFormat64 = new C.PivotFormat(); C.Index index71 = new C.Index(){ Val = (UInt32Value)14U }; C.ShapeProperties shapeProperties26 = new C.ShapeProperties(); A.SolidFill solidFill46 = new A.SolidFill(); A.SchemeColor schemeColor30 = new A.SchemeColor(){ Val = A.SchemeColorValues.Accent1 }; A.Tint tint16 = new A.Tint(){ Val = 100000 }; schemeColor30.Append(tint16); solidFill46.Append(schemeColor30); A.Outline outline36 = new A.Outline(); A.NoFill noFill30 = new A.NoFill(); outline36.Append(noFill30); A.EffectList effectList28 = new A.EffectList(); shapeProperties26.Append(solidFill46); shapeProperties26.Append(outline36); shapeProperties26.Append(effectList28); C.Marker marker64 = new C.Marker(); C.Symbol symbol64 = new C.Symbol(){ Val = C.MarkerStyleValues.None }; marker64.Append(symbol64); pivotFormat64.Append(index71); pivotFormat64.Append(shapeProperties26); pivotFormat64.Append(marker64); C.PivotFormat pivotFormat65 = new C.PivotFormat(); C.Index index72 = new C.Index(){ Val = (UInt32Value)15U }; C.ShapeProperties shapeProperties27 = new C.ShapeProperties(); A.SolidFill solidFill47 = new A.SolidFill(); A.SchemeColor schemeColor31 = new A.SchemeColor(){ Val = A.SchemeColorValues.Accent1 }; A.Tint tint17 = new A.Tint(){ Val = 100000 }; schemeColor31.Append(tint17); solidFill47.Append(schemeColor31); A.Outline outline37 = new A.Outline(); A.NoFill noFill31 = new A.NoFill(); outline37.Append(noFill31); A.EffectList effectList29 = new A.EffectList(); shapeProperties27.Append(solidFill47); shapeProperties27.Append(outline37); shapeProperties27.Append(effectList29); C.Marker marker65 = new C.Marker(); C.Symbol symbol65 = new C.Symbol(){ Val = C.MarkerStyleValues.None }; marker65.Append(symbol65); pivotFormat65.Append(index72); pivotFormat65.Append(shapeProperties27); pivotFormat65.Append(marker65); pivotFormats8.Append(pivotFormat50); pivotFormats8.Append(pivotFormat51); pivotFormats8.Append(pivotFormat52); pivotFormats8.Append(pivotFormat53); pivotFormats8.Append(pivotFormat54); pivotFormats8.Append(pivotFormat55); pivotFormats8.Append(pivotFormat56); pivotFormats8.Append(pivotFormat57); pivotFormats8.Append(pivotFormat58); pivotFormats8.Append(pivotFormat59); pivotFormats8.Append(pivotFormat60); pivotFormats8.Append(pivotFormat61); pivotFormats8.Append(pivotFormat62); pivotFormats8.Append(pivotFormat63); pivotFormats8.Append(pivotFormat64); pivotFormats8.Append(pivotFormat65); C.PlotArea plotArea8 = new C.PlotArea(); C.Layout layout8 = new C.Layout(); C.BarChart barChart4 = new C.BarChart(); C.BarDirection barDirection4 = new C.BarDirection(){ Val = C.BarDirectionValues.Column }; C.BarGrouping barGrouping4 = new C.BarGrouping(){ Val = C.BarGroupingValues.Clustered }; C.VaryColors varyColors8 = new C.VaryColors(){ Val = false }; C.BarChartSeries barChartSeries4 = new C.BarChartSeries(); C.Index index73 = new C.Index(){ Val = (UInt32Value)0U }; C.Order order8 = new C.Order(){ Val = (UInt32Value)0U }; C.SeriesText seriesText8 = new C.SeriesText(); C.StringReference stringReference15 = new C.StringReference(); C.Formula formula22 = new C.Formula(); formula22.Text = "ShowHeader!$B$1"; C.StringCache stringCache15 = new C.StringCache(); C.PointCount pointCount22 = new C.PointCount(){ Val = (UInt32Value)1U }; C.StringPoint stringPoint29 = new C.StringPoint(){ Index = (UInt32Value)0U }; C.NumericValue numericValue50 = new C.NumericValue(); numericValue50.Text = "Total"; stringPoint29.Append(numericValue50); stringCache15.Append(pointCount22); stringCache15.Append(stringPoint29); stringReference15.Append(formula22); stringReference15.Append(stringCache15); seriesText8.Append(stringReference15); C.ChartShapeProperties chartShapeProperties11 = new C.ChartShapeProperties(); A.SolidFill solidFill48 = new A.SolidFill(); A.SchemeColor schemeColor32 = new A.SchemeColor(){ Val = A.SchemeColorValues.Accent1 }; A.Tint tint18 = new A.Tint(){ Val = 100000 }; schemeColor32.Append(tint18); solidFill48.Append(schemeColor32); A.Outline outline38 = new A.Outline(); A.NoFill noFill32 = new A.NoFill(); outline38.Append(noFill32); A.EffectList effectList30 = new A.EffectList(); chartShapeProperties11.Append(solidFill48); chartShapeProperties11.Append(outline38); chartShapeProperties11.Append(effectList30); C.InvertIfNegative invertIfNegative4 = new C.InvertIfNegative(){ Val = false }; C.CategoryAxisData categoryAxisData8 = new C.CategoryAxisData(); C.StringReference stringReference16 = new C.StringReference(); C.Formula formula23 = new C.Formula(); formula23.Text = "ShowHeader!$A$2:$A$5"; C.StringCache stringCache16 = new C.StringCache(); C.PointCount pointCount23 = new C.PointCount(){ Val = (UInt32Value)3U }; C.StringPoint stringPoint30 = new C.StringPoint(){ Index = (UInt32Value)0U }; C.NumericValue numericValue51 = new C.NumericValue(); numericValue51.Text = "product_A"; stringPoint30.Append(numericValue51); C.StringPoint stringPoint31 = new C.StringPoint(){ Index = (UInt32Value)1U }; C.NumericValue numericValue52 = new C.NumericValue(); numericValue52.Text = "product_D"; stringPoint31.Append(numericValue52); C.StringPoint stringPoint32 = new C.StringPoint(){ Index = (UInt32Value)2U }; C.NumericValue numericValue53 = new C.NumericValue(); numericValue53.Text = "product_E"; stringPoint32.Append(numericValue53); stringCache16.Append(pointCount23); stringCache16.Append(stringPoint30); stringCache16.Append(stringPoint31); stringCache16.Append(stringPoint32); stringReference16.Append(formula23); stringReference16.Append(stringCache16); categoryAxisData8.Append(stringReference16); C.Values values8 = new C.Values(); C.NumberReference numberReference8 = new C.NumberReference(); C.Formula formula24 = new C.Formula(); formula24.Text = "ShowHeader!$B$2:$B$5"; C.NumberingCache numberingCache8 = new C.NumberingCache(); C.FormatCode formatCode8 = new C.FormatCode(); formatCode8.Text = "General"; C.PointCount pointCount24 = new C.PointCount(){ Val = (UInt32Value)3U }; C.NumericPoint numericPoint22 = new C.NumericPoint(){ Index = (UInt32Value)0U }; C.NumericValue numericValue54 = new C.NumericValue(); numericValue54.Text = "19"; numericPoint22.Append(numericValue54); C.NumericPoint numericPoint23 = new C.NumericPoint(){ Index = (UInt32Value)1U }; C.NumericValue numericValue55 = new C.NumericValue(); numericValue55.Text = "13"; numericPoint23.Append(numericValue55); C.NumericPoint numericPoint24 = new C.NumericPoint(){ Index = (UInt32Value)2U }; C.NumericValue numericValue56 = new C.NumericValue(); numericValue56.Text = "33"; numericPoint24.Append(numericValue56); numberingCache8.Append(formatCode8); numberingCache8.Append(pointCount24); numberingCache8.Append(numericPoint22); numberingCache8.Append(numericPoint23); numberingCache8.Append(numericPoint24); numberReference8.Append(formula24); numberReference8.Append(numberingCache8); values8.Append(numberReference8); barChartSeries4.Append(index73); barChartSeries4.Append(order8); barChartSeries4.Append(seriesText8); barChartSeries4.Append(chartShapeProperties11); barChartSeries4.Append(invertIfNegative4); barChartSeries4.Append(categoryAxisData8); barChartSeries4.Append(values8); C.DataLabels dataLabels8 = new C.DataLabels(); C.ShowLegendKey showLegendKey8 = new C.ShowLegendKey(){ Val = false }; C.ShowValue showValue8 = new C.ShowValue(){ Val = false }; C.ShowCategoryName showCategoryName8 = new C.ShowCategoryName(){ Val = false }; C.ShowSeriesName showSeriesName8 = new C.ShowSeriesName(){ Val = false }; C.ShowPercent showPercent8 = new C.ShowPercent(){ Val = false }; C.ShowBubbleSize showBubbleSize8 = new C.ShowBubbleSize(){ Val = false }; dataLabels8.Append(showLegendKey8); dataLabels8.Append(showValue8); dataLabels8.Append(showCategoryName8); dataLabels8.Append(showSeriesName8); dataLabels8.Append(showPercent8); dataLabels8.Append(showBubbleSize8); C.GapWidth gapWidth4 = new C.GapWidth(){ Val = (UInt16Value)219U }; C.Overlap overlap3 = new C.Overlap(){ Val = -27 }; C.AxisId axisId13 = new C.AxisId(){ Val = (UInt32Value)209618640U }; C.AxisId axisId14 = new C.AxisId(){ Val = (UInt32Value)209382248U }; barChart4.Append(barDirection4); barChart4.Append(barGrouping4); barChart4.Append(varyColors8); barChart4.Append(barChartSeries4); barChart4.Append(dataLabels8); barChart4.Append(gapWidth4); barChart4.Append(overlap3); barChart4.Append(axisId13); barChart4.Append(axisId14); C.CategoryAxis categoryAxis4 = new C.CategoryAxis(); C.AxisId axisId15 = new C.AxisId(){ Val = (UInt32Value)209618640U }; C.Scaling scaling7 = new C.Scaling(); C.Orientation orientation7 = new C.Orientation(){ Val = C.OrientationValues.MinMax }; scaling7.Append(orientation7); C.Delete delete7 = new C.Delete(){ Val = false }; C.AxisPosition axisPosition7 = new C.AxisPosition(){ Val = C.AxisPositionValues.Bottom }; C.NumberingFormat numberingFormat7 = new C.NumberingFormat(){ FormatCode = "General", SourceLinked = false }; C.MajorTickMark majorTickMark7 = new C.MajorTickMark(){ Val = C.TickMarkValues.None }; C.MinorTickMark minorTickMark7 = new C.MinorTickMark(){ Val = C.TickMarkValues.None }; C.TickLabelPosition tickLabelPosition7 = new C.TickLabelPosition(){ Val = C.TickLabelPositionValues.NextTo }; C.ChartShapeProperties chartShapeProperties12 = new C.ChartShapeProperties(); A.NoFill noFill33 = new A.NoFill(); A.Outline outline39 = new A.Outline(); A.NoFill noFill34 = new A.NoFill(); outline39.Append(noFill34); A.EffectList effectList31 = new A.EffectList(); chartShapeProperties12.Append(noFill33); chartShapeProperties12.Append(outline39); chartShapeProperties12.Append(effectList31); C.TextProperties textProperties9 = new C.TextProperties(); A.BodyProperties bodyProperties17 = new A.BodyProperties(){ Rotation = -60000000, UseParagraphSpacing = true, VerticalOverflow = A.TextVerticalOverflowValues.Ellipsis, Vertical = A.TextVerticalValues.Horizontal, Wrap = A.TextWrappingValues.Square, Anchor = A.TextAnchoringTypeValues.Center, AnchorCenter = true }; A.ListStyle listStyle17 = new A.ListStyle(); A.Paragraph paragraph17 = new A.Paragraph(); A.ParagraphProperties paragraphProperties9 = new A.ParagraphProperties(); A.DefaultRunProperties defaultRunProperties9 = new A.DefaultRunProperties(){ FontSize = 900, Kerning = 1200 }; A.SolidFill solidFill49 = new A.SolidFill(); A.SchemeColor schemeColor33 = new A.SchemeColor(){ Val = A.SchemeColorValues.Text1 }; A.LuminanceModulation luminanceModulation11 = new A.LuminanceModulation(){ Val = 65000 }; A.LuminanceOffset luminanceOffset11 = new A.LuminanceOffset(){ Val = 35000 }; schemeColor33.Append(luminanceModulation11); schemeColor33.Append(luminanceOffset11); solidFill49.Append(schemeColor33); A.LatinFont latinFont7 = new A.LatinFont(){ Typeface = "+mn-lt" }; A.EastAsianFont eastAsianFont7 = new A.EastAsianFont(){ Typeface = "+mn-ea" }; A.ComplexScriptFont complexScriptFont7 = new A.ComplexScriptFont(){ Typeface = "+mn-cs" }; defaultRunProperties9.Append(solidFill49); defaultRunProperties9.Append(latinFont7); defaultRunProperties9.Append(eastAsianFont7); defaultRunProperties9.Append(complexScriptFont7); paragraphProperties9.Append(defaultRunProperties9); A.EndParagraphRunProperties endParagraphRunProperties9 = new A.EndParagraphRunProperties(){ Language = "en-US" }; paragraph17.Append(paragraphProperties9); paragraph17.Append(endParagraphRunProperties9); textProperties9.Append(bodyProperties17); textProperties9.Append(listStyle17); textProperties9.Append(paragraph17); C.CrossingAxis crossingAxis7 = new C.CrossingAxis(){ Val = (UInt32Value)209382248U }; C.Crosses crosses7 = new C.Crosses(){ Val = C.CrossesValues.AutoZero }; C.AutoLabeled autoLabeled4 = new C.AutoLabeled(){ Val = true }; C.LabelAlignment labelAlignment4 = new C.LabelAlignment(){ Val = C.LabelAlignmentValues.Center }; C.LabelOffset labelOffset4 = new C.LabelOffset(){ Val = (UInt16Value)100U }; C.NoMultiLevelLabels noMultiLevelLabels4 = new C.NoMultiLevelLabels(){ Val = false }; categoryAxis4.Append(axisId15); categoryAxis4.Append(scaling7); categoryAxis4.Append(delete7); categoryAxis4.Append(axisPosition7); categoryAxis4.Append(numberingFormat7); categoryAxis4.Append(majorTickMark7); categoryAxis4.Append(minorTickMark7); categoryAxis4.Append(tickLabelPosition7); categoryAxis4.Append(chartShapeProperties12); categoryAxis4.Append(textProperties9); categoryAxis4.Append(crossingAxis7); categoryAxis4.Append(crosses7); categoryAxis4.Append(autoLabeled4); categoryAxis4.Append(labelAlignment4); categoryAxis4.Append(labelOffset4); categoryAxis4.Append(noMultiLevelLabels4); C.ValueAxis valueAxis4 = new C.ValueAxis(); C.AxisId axisId16 = new C.AxisId(){ Val = (UInt32Value)209382248U }; C.Scaling scaling8 = new C.Scaling(); C.Orientation orientation8 = new C.Orientation(){ Val = C.OrientationValues.MinMax }; scaling8.Append(orientation8); C.Delete delete8 = new C.Delete(){ Val = false }; C.AxisPosition axisPosition8 = new C.AxisPosition(){ Val = C.AxisPositionValues.Left }; C.MajorGridlines majorGridlines4 = new C.MajorGridlines(); C.ChartShapeProperties chartShapeProperties13 = new C.ChartShapeProperties(); A.Outline outline40 = new A.Outline(){ Width = 9525, CapType = A.LineCapValues.Flat, CompoundLineType = A.CompoundLineValues.Single, Alignment = A.PenAlignmentValues.Center }; A.SolidFill solidFill50 = new A.SolidFill(); A.SchemeColor schemeColor34 = new A.SchemeColor(){ Val = A.SchemeColorValues.Text1 }; A.LuminanceModulation luminanceModulation12 = new A.LuminanceModulation(){ Val = 15000 }; A.LuminanceOffset luminanceOffset12 = new A.LuminanceOffset(){ Val = 85000 }; schemeColor34.Append(luminanceModulation12); schemeColor34.Append(luminanceOffset12); solidFill50.Append(schemeColor34); A.Round round5 = new A.Round(); outline40.Append(solidFill50); outline40.Append(round5); A.EffectList effectList32 = new A.EffectList(); chartShapeProperties13.Append(outline40); chartShapeProperties13.Append(effectList32); majorGridlines4.Append(chartShapeProperties13); C.NumberingFormat numberingFormat8 = new C.NumberingFormat(){ FormatCode = "General", SourceLinked = true }; C.MajorTickMark majorTickMark8 = new C.MajorTickMark(){ Val = C.TickMarkValues.None }; C.MinorTickMark minorTickMark8 = new C.MinorTickMark(){ Val = C.TickMarkValues.None }; C.TickLabelPosition tickLabelPosition8 = new C.TickLabelPosition(){ Val = C.TickLabelPositionValues.NextTo }; C.ChartShapeProperties chartShapeProperties14 = new C.ChartShapeProperties(); A.NoFill noFill35 = new A.NoFill(); A.Outline outline41 = new A.Outline(); A.NoFill noFill36 = new A.NoFill(); outline41.Append(noFill36); A.EffectList effectList33 = new A.EffectList(); chartShapeProperties14.Append(noFill35); chartShapeProperties14.Append(outline41); chartShapeProperties14.Append(effectList33); C.TextProperties textProperties10 = new C.TextProperties(); A.BodyProperties bodyProperties18 = new A.BodyProperties(){ Rotation = -60000000, UseParagraphSpacing = true, VerticalOverflow = A.TextVerticalOverflowValues.Ellipsis, Vertical = A.TextVerticalValues.Horizontal, Wrap = A.TextWrappingValues.Square, Anchor = A.TextAnchoringTypeValues.Center, AnchorCenter = true }; A.ListStyle listStyle18 = new A.ListStyle(); A.Paragraph paragraph18 = new A.Paragraph(); A.ParagraphProperties paragraphProperties10 = new A.ParagraphProperties(); A.DefaultRunProperties defaultRunProperties10 = new A.DefaultRunProperties(){ FontSize = 900, Kerning = 1200 }; A.SolidFill solidFill51 = new A.SolidFill(); A.SchemeColor schemeColor35 = new A.SchemeColor(){ Val = A.SchemeColorValues.Text1 }; A.LuminanceModulation luminanceModulation13 = new A.LuminanceModulation(){ Val = 65000 }; A.LuminanceOffset luminanceOffset13 = new A.LuminanceOffset(){ Val = 35000 }; schemeColor35.Append(luminanceModulation13); schemeColor35.Append(luminanceOffset13); solidFill51.Append(schemeColor35); A.LatinFont latinFont8 = new A.LatinFont(){ Typeface = "+mn-lt" }; A.EastAsianFont eastAsianFont8 = new A.EastAsianFont(){ Typeface = "+mn-ea" }; A.ComplexScriptFont complexScriptFont8 = new A.ComplexScriptFont(){ Typeface = "+mn-cs" }; defaultRunProperties10.Append(solidFill51); defaultRunProperties10.Append(latinFont8); defaultRunProperties10.Append(eastAsianFont8); defaultRunProperties10.Append(complexScriptFont8); paragraphProperties10.Append(defaultRunProperties10); A.EndParagraphRunProperties endParagraphRunProperties10 = new A.EndParagraphRunProperties(){ Language = "en-US" }; paragraph18.Append(paragraphProperties10); paragraph18.Append(endParagraphRunProperties10); textProperties10.Append(bodyProperties18); textProperties10.Append(listStyle18); textProperties10.Append(paragraph18); C.CrossingAxis crossingAxis8 = new C.CrossingAxis(){ Val = (UInt32Value)209618640U }; C.Crosses crosses8 = new C.Crosses(){ Val = C.CrossesValues.AutoZero }; C.CrossBetween crossBetween4 = new C.CrossBetween(){ Val = C.CrossBetweenValues.Between }; valueAxis4.Append(axisId16); valueAxis4.Append(scaling8); valueAxis4.Append(delete8); valueAxis4.Append(axisPosition8); valueAxis4.Append(majorGridlines4); valueAxis4.Append(numberingFormat8); valueAxis4.Append(majorTickMark8); valueAxis4.Append(minorTickMark8); valueAxis4.Append(tickLabelPosition8); valueAxis4.Append(chartShapeProperties14); valueAxis4.Append(textProperties10); valueAxis4.Append(crossingAxis8); valueAxis4.Append(crosses8); valueAxis4.Append(crossBetween4); C.ShapeProperties shapeProperties28 = new C.ShapeProperties(); A.SolidFill solidFill52 = new A.SolidFill(); A.SchemeColor schemeColor36 = new A.SchemeColor(){ Val = A.SchemeColorValues.Background1 }; solidFill52.Append(schemeColor36); A.Outline outline42 = new A.Outline(); A.NoFill noFill37 = new A.NoFill(); outline42.Append(noFill37); A.EffectList effectList34 = new A.EffectList(); shapeProperties28.Append(solidFill52); shapeProperties28.Append(outline42); shapeProperties28.Append(effectList34); plotArea8.Append(layout8); plotArea8.Append(barChart4); plotArea8.Append(categoryAxis4); plotArea8.Append(valueAxis4); plotArea8.Append(shapeProperties28); C.Legend legend8 = new C.Legend(); C.LegendPosition legendPosition8 = new C.LegendPosition(){ Val = C.LegendPositionValues.Bottom }; C.Overlay overlay16 = new C.Overlay(){ Val = false }; C.ChartShapeProperties chartShapeProperties15 = new C.ChartShapeProperties(); A.NoFill noFill38 = new A.NoFill(); A.Outline outline43 = new A.Outline(); A.NoFill noFill39 = new A.NoFill(); outline43.Append(noFill39); A.EffectList effectList35 = new A.EffectList(); chartShapeProperties15.Append(noFill38); chartShapeProperties15.Append(outline43); chartShapeProperties15.Append(effectList35); C.TextProperties textProperties11 = new C.TextProperties(); A.BodyProperties bodyProperties19 = new A.BodyProperties(){ Rotation = 0, UseParagraphSpacing = true, VerticalOverflow = A.TextVerticalOverflowValues.Ellipsis, Vertical = A.TextVerticalValues.Horizontal, Wrap = A.TextWrappingValues.Square, Anchor = A.TextAnchoringTypeValues.Center, AnchorCenter = true }; A.ListStyle listStyle19 = new A.ListStyle(); A.Paragraph paragraph19 = new A.Paragraph(); A.ParagraphProperties paragraphProperties11 = new A.ParagraphProperties(); A.DefaultRunProperties defaultRunProperties11 = new A.DefaultRunProperties(){ FontSize = 900, Kerning = 1200 }; A.SolidFill solidFill53 = new A.SolidFill(); A.SchemeColor schemeColor37 = new A.SchemeColor(){ Val = A.SchemeColorValues.Text1 }; A.LuminanceModulation luminanceModulation14 = new A.LuminanceModulation(){ Val = 65000 }; A.LuminanceOffset luminanceOffset14 = new A.LuminanceOffset(){ Val = 35000 }; schemeColor37.Append(luminanceModulation14); schemeColor37.Append(luminanceOffset14); solidFill53.Append(schemeColor37); A.LatinFont latinFont9 = new A.LatinFont(){ Typeface = "+mn-lt" }; A.EastAsianFont eastAsianFont9 = new A.EastAsianFont(){ Typeface = "+mn-ea" }; A.ComplexScriptFont complexScriptFont9 = new A.ComplexScriptFont(){ Typeface = "+mn-cs" }; defaultRunProperties11.Append(solidFill53); defaultRunProperties11.Append(latinFont9); defaultRunProperties11.Append(eastAsianFont9); defaultRunProperties11.Append(complexScriptFont9); paragraphProperties11.Append(defaultRunProperties11); A.EndParagraphRunProperties endParagraphRunProperties11 = new A.EndParagraphRunProperties(){ Language = "en-US" }; paragraph19.Append(paragraphProperties11); paragraph19.Append(endParagraphRunProperties11); textProperties11.Append(bodyProperties19); textProperties11.Append(listStyle19); textProperties11.Append(paragraph19); legend8.Append(legendPosition8); legend8.Append(overlay16); legend8.Append(chartShapeProperties15); legend8.Append(textProperties11); C.PlotVisibleOnly plotVisibleOnly8 = new C.PlotVisibleOnly(){ Val = true }; C.DisplayBlanksAs displayBlanksAs8 = new C.DisplayBlanksAs(){ Val = C.DisplayBlanksAsValues.Gap }; C.ShowDataLabelsOverMaximum showDataLabelsOverMaximum8 = new C.ShowDataLabelsOverMaximum(){ Val = false }; chart8.Append(title8); chart8.Append(autoTitleDeleted8); chart8.Append(pivotFormats8); chart8.Append(plotArea8); chart8.Append(legend8); chart8.Append(plotVisibleOnly8); chart8.Append(displayBlanksAs8); chart8.Append(showDataLabelsOverMaximum8); C.ShapeProperties shapeProperties29 = new C.ShapeProperties(); A.SolidFill solidFill54 = new A.SolidFill(); A.SchemeColor schemeColor38 = new A.SchemeColor(){ Val = A.SchemeColorValues.Background1 }; solidFill54.Append(schemeColor38); A.Outline outline44 = new A.Outline(){ Width = 9525, CapType = A.LineCapValues.Flat, CompoundLineType = A.CompoundLineValues.Single, Alignment = A.PenAlignmentValues.Center }; A.SolidFill solidFill55 = new A.SolidFill(); A.SchemeColor schemeColor39 = new A.SchemeColor(){ Val = A.SchemeColorValues.Text1 }; A.LuminanceModulation luminanceModulation15 = new A.LuminanceModulation(){ Val = 15000 }; A.LuminanceOffset luminanceOffset15 = new A.LuminanceOffset(){ Val = 85000 }; schemeColor39.Append(luminanceModulation15); schemeColor39.Append(luminanceOffset15); solidFill55.Append(schemeColor39); A.Round round6 = new A.Round(); outline44.Append(solidFill55); outline44.Append(round6); A.EffectList effectList36 = new A.EffectList(); shapeProperties29.Append(solidFill54); shapeProperties29.Append(outline44); shapeProperties29.Append(effectList36); C.TextProperties textProperties12 = new C.TextProperties(); A.BodyProperties bodyProperties20 = new A.BodyProperties(); A.ListStyle listStyle20 = new A.ListStyle(); A.Paragraph paragraph20 = new A.Paragraph(); A.ParagraphProperties paragraphProperties12 = new A.ParagraphProperties(); A.DefaultRunProperties defaultRunProperties12 = new A.DefaultRunProperties(); paragraphProperties12.Append(defaultRunProperties12); A.EndParagraphRunProperties endParagraphRunProperties12 = new A.EndParagraphRunProperties(){ Language = "en-US" }; paragraph20.Append(paragraphProperties12); paragraph20.Append(endParagraphRunProperties12); textProperties12.Append(bodyProperties20); textProperties12.Append(listStyle20); textProperties12.Append(paragraph20); C.PrintSettings printSettings8 = new C.PrintSettings(); C.HeaderFooter headerFooter8 = new C.HeaderFooter(); C.PageMargins pageMargins14 = new C.PageMargins(){ Left = 0.7D, Right = 0.7D, Top = 0.75D, Bottom = 0.75D, Header = 0.3D, Footer = 0.3D }; C.PageSetup pageSetup8 = new C.PageSetup(); printSettings8.Append(headerFooter8); printSettings8.Append(pageMargins14); printSettings8.Append(pageSetup8); C.ChartSpaceExtensionList chartSpaceExtensionList8 = new C.ChartSpaceExtensionList(); chartSpaceExtensionList8.AddNamespaceDeclaration("c14", "http://schemas.microsoft.com/office/drawing/2007/8/2/chart"); chartSpaceExtensionList8.AddNamespaceDeclaration("mc", "http://schemas.openxmlformats.org/markup-compatibility/2006"); C.ChartSpaceExtension chartSpaceExtension8 = new C.ChartSpaceExtension(){ Uri = "{781A3756-C4B2-4CAC-9D66-4F8BD8637D16}" }; chartSpaceExtension8.AddNamespaceDeclaration("c14", "http://schemas.microsoft.com/office/drawing/2007/8/2/chart"); C14.PivotOptions pivotOptions8 = new C14.PivotOptions(); C14.DropZoneFilter dropZoneFilter8 = new C14.DropZoneFilter(){ Val = true }; C14.DropZoneCategories dropZoneCategories8 = new C14.DropZoneCategories(){ Val = true }; C14.DropZoneData dropZoneData8 = new C14.DropZoneData(){ Val = true }; C14.DropZoneSeries dropZoneSeries8 = new C14.DropZoneSeries(){ Val = true }; C14.DropZonesVisible dropZonesVisible8 = new C14.DropZonesVisible(){ Val = true }; pivotOptions8.Append(dropZoneFilter8); pivotOptions8.Append(dropZoneCategories8); pivotOptions8.Append(dropZoneData8); pivotOptions8.Append(dropZoneSeries8); pivotOptions8.Append(dropZonesVisible8); chartSpaceExtension8.Append(pivotOptions8); chartSpaceExtensionList8.Append(chartSpaceExtension8); chartSpace8.Append(date19048); chartSpace8.Append(editingLanguage8); chartSpace8.Append(roundedCorners8); chartSpace8.Append(alternateContent17); chartSpace8.Append(pivotSource8); chartSpace8.Append(chart8); chartSpace8.Append(shapeProperties29); chartSpace8.Append(textProperties12); chartSpace8.Append(printSettings8); chartSpace8.Append(chartSpaceExtensionList8); chartPart8.ChartSpace = chartSpace8; }
public static void LoadChartData(ChartPart chartPart, System.Data.DataTable dataTable) { Repository.Utility.WriteLog("LoadChartData started", System.Diagnostics.EventLogEntryType.Information); Chart chart = chartPart.ChartSpace.Elements<Chart>().First(); BarChart bc1 = chart.Descendants<BarChart>().FirstOrDefault(); BarChart bc2 = chart.Descendants<BarChart>().ElementAt(1); DateTime maxAxisvAlue=DateTime.MinValue; DateTime minAxisvAlue = DateTime.MaxValue; DateTime maxFinishValue = dataTable.AsEnumerable().Select(t=>t.Field<DateTime>("Finish")).Max(); DateTime maxBFinishvalue = dataTable.AsEnumerable().Select(t => t.Field<DateTime>("BaseLineFinish")).Max(); maxAxisvAlue = maxBFinishvalue > maxFinishValue ? maxBFinishvalue : maxFinishValue; DateTime minStartValue = dataTable.AsEnumerable().Select(t => t.Field<DateTime>("Start")).Min(); DateTime minBStartvalue = dataTable.AsEnumerable().Select(t => t.Field<DateTime>("BaseLineStart")).Min(); minAxisvAlue = minBStartvalue < minStartValue ? minBStartvalue : minStartValue; IEnumerable<ValueAxis> axes = chart.Descendants<ValueAxis>(); foreach (ValueAxis axis in axes) { if (maxAxisvAlue != DateTime.MaxValue) { axis.Scaling.MaxAxisValue.Val = maxAxisvAlue.ToOADate(); } if (minAxisvAlue != DateTime.MinValue) { axis.Scaling.MinAxisValue.Val = minAxisvAlue.ToOADate(); } if (dataTable.Rows.Count > 0) { axis.Elements<MajorUnit>().FirstOrDefault().Val = (axis.Scaling.MaxAxisValue.Val - axis.Scaling.MinAxisValue.Val) / dataTable.Rows.Count; } } if (bc1 != null && bc2 != null) { BarChartSeries bcs1 = bc1.Elements<BarChartSeries>().FirstOrDefault(); BarChartSeries bcs2 = bc1.Elements<BarChartSeries>().ElementAt(1); BarChartSeries bcs3 = bc2.Elements<BarChartSeries>().FirstOrDefault(); BarChartSeries bcs4 = bc2.Elements<BarChartSeries>().ElementAt(1); if (bcs1 != null && bcs2 != null) { var categories = bcs1.Descendants<DocumentFormat.OpenXml.Drawing.Charts.CategoryAxisData>().First(); StringReference csr = categories.Descendants<StringReference>().First(); csr.Formula.Text = String.Format("Sheet1!$A$2:$A${0}", dataTable.Rows.Count + 1); StringCache sc = categories.Descendants<StringCache>().First(); CreateStringPoints(sc, dataTable.Rows.Count,false); //Series 1 var values1 = bcs1.Descendants<DocumentFormat.OpenXml.Drawing.Charts.Values>().First(); NumberReference vnr1 = values1.Descendants<NumberReference>().First(); vnr1.Formula.Text = String.Format("Sheet1!$B$2:$B${0}", dataTable.Rows.Count + 1); NumberingCache nc1 = values1.Descendants<NumberingCache>().First(); CreateNumericPoints(nc1, dataTable.Rows.Count,false); //Series 2 var values2 = bcs2.Descendants<DocumentFormat.OpenXml.Drawing.Charts.Values>().First(); NumberReference vnr2 = values2.Descendants<NumberReference>().First(); vnr2.Formula.Text = String.Format("Sheet1!$C$2:$C${0}", dataTable.Rows.Count + 1); NumberingCache nc2 = values2.Descendants<NumberingCache>().First(); CreateNumericPoints(nc2, dataTable.Rows.Count, false); //Series 3 var values3 = bcs3.Descendants<DocumentFormat.OpenXml.Drawing.Charts.Values>().First(); NumberReference vnr3 = values3.Descendants<NumberReference>().First(); vnr3.Formula.Text = String.Format("Sheet1!$D$2:$D${0}", dataTable.Rows.Count + 1); NumberingCache nc3 = values3.Descendants<NumberingCache>().First(); CreateNumericPoints(nc3, dataTable.Rows.Count,false); //Series 4 var values4 = bcs4.Descendants<DocumentFormat.OpenXml.Drawing.Charts.Values>().First(); NumberReference vnr4 = values4.Descendants<NumberReference>().First(); vnr4.Formula.Text = String.Format("Sheet1!$E$2:$E${0}", dataTable.Rows.Count + 1); NumberingCache nc4 = values4.Descendants<NumberingCache>().First(); CreateNumericPoints(nc4, dataTable.Rows.Count, false); for (int i = 0; i < dataTable.Rows.Count; i++) { NumericValue sv = sc.Elements<StringPoint>().ElementAt(i).Elements<NumericValue>().FirstOrDefault(); sv.Text = dataTable.Rows[i]["Task"].ToString() + " | " + ((DateTime)dataTable.Rows[i]["Finish"]).ToString("MM/dd"); NumericValue nv1 = nc1.Elements<NumericPoint>().ElementAt(i).Elements<NumericValue>().FirstOrDefault(); NumericValue nv2 = nc2.Elements<NumericPoint>().ElementAt(i).Elements<NumericValue>().FirstOrDefault(); NumericValue nv3 = nc3.Elements<NumericPoint>().ElementAt(i).Elements<NumericValue>().FirstOrDefault(); NumericValue nv4 = nc4.Elements<NumericPoint>().ElementAt(i).Elements<NumericValue>().FirstOrDefault(); nv1.Text = ((DateTime)dataTable.Rows[i]["Start"]).ToOADate().ToString(); nv2.Text = ((DateTime)dataTable.Rows[i]["Finish"] - (DateTime)dataTable.Rows[i]["Start"]).TotalDays > 4 ? ((DateTime)dataTable.Rows[i]["Finish"] - (DateTime)dataTable.Rows[i]["Start"]).TotalDays.ToString() : "5"; nv3.Text = ((DateTime)dataTable.Rows[i]["BaseLineStart"]).ToOADate().ToString(); nv4.Text = ((DateTime)dataTable.Rows[i]["BaseLineFinish"] - (DateTime)dataTable.Rows[i]["BaseLineStart"]).TotalDays > 4 ? ((DateTime)dataTable.Rows[i]["BaseLineFinish"] - (DateTime)dataTable.Rows[i]["BaseLineStart"]).TotalDays.ToString() : "5"; } } } Repository.Utility.WriteLog("LoadChartData completed successfully", System.Diagnostics.EventLogEntryType.Information); }
// Generates content of chartPart1. private void GenerateChartPart1Content(ChartPart chartPart1) { C.ChartSpace chartSpace1 = new C.ChartSpace(); chartSpace1.AddNamespaceDeclaration("c", "http://schemas.openxmlformats.org/drawingml/2006/chart"); chartSpace1.AddNamespaceDeclaration("a", "http://schemas.openxmlformats.org/drawingml/2006/main"); chartSpace1.AddNamespaceDeclaration("r", "http://schemas.openxmlformats.org/officeDocument/2006/relationships"); C.Date1904 date19041 = new C.Date1904() { Val = false }; C.EditingLanguage editingLanguage1 = new C.EditingLanguage() { Val = "en-US" }; C.RoundedCorners roundedCorners1 = new C.RoundedCorners() { Val = false }; AlternateContent alternateContent1 = new AlternateContent(); alternateContent1.AddNamespaceDeclaration("mc", "http://schemas.openxmlformats.org/markup-compatibility/2006"); AlternateContentChoice alternateContentChoice1 = new AlternateContentChoice() { Requires = "c14" }; alternateContentChoice1.AddNamespaceDeclaration("c14", "http://schemas.microsoft.com/office/drawing/2007/8/2/chart"); C14.Style style50 = new C14.Style() { Val = 102 }; alternateContentChoice1.Append(style50); AlternateContentFallback alternateContentFallback1 = new AlternateContentFallback(); C.Style style51 = new C.Style() { Val = 2 }; alternateContentFallback1.Append(style51); alternateContent1.Append(alternateContentChoice1); alternateContent1.Append(alternateContentFallback1); C.Chart chart1 = new C.Chart(); C.Title title2 = new C.Title(); C.Layout layout1 = new C.Layout(); C.Overlay overlay1 = new C.Overlay() { Val = false }; C.ChartShapeProperties chartShapeProperties1 = new C.ChartShapeProperties(); A.NoFill noFill2 = new A.NoFill(); A.Outline outline13 = new A.Outline(); A.NoFill noFill3 = new A.NoFill(); outline13.Append(noFill3); A.EffectList effectList12 = new A.EffectList(); chartShapeProperties1.Append(noFill2); chartShapeProperties1.Append(outline13); chartShapeProperties1.Append(effectList12); C.TextProperties textProperties50 = new C.TextProperties(); A.BodyProperties bodyProperties25 = new A.BodyProperties() { Rotation = 0, UseParagraphSpacing = true, VerticalOverflow = A.TextVerticalOverflowValues.Ellipsis, Vertical = A.TextVerticalValues.Horizontal, Wrap = A.TextWrappingValues.Square, Anchor = A.TextAnchoringTypeValues.Center, AnchorCenter = true }; A.ListStyle listStyle25 = new A.ListStyle(); A.Paragraph paragraph25 = new A.Paragraph(); A.ParagraphProperties paragraphProperties8 = new A.ParagraphProperties(); A.DefaultRunProperties defaultRunProperties1 = new A.DefaultRunProperties() { FontSize = 1400, Bold = false, Italic = false, Underline = A.TextUnderlineValues.None, Strike = A.TextStrikeValues.NoStrike, Kerning = 1200, Spacing = 0, Baseline = 0 }; A.SolidFill solidFill24 = new A.SolidFill(); A.SchemeColor schemeColor197 = new A.SchemeColor() { Val = A.SchemeColorValues.Text1 }; A.LuminanceModulation luminanceModulation4 = new A.LuminanceModulation() { Val = 65000 }; A.LuminanceOffset luminanceOffset14 = new A.LuminanceOffset() { Val = 35000 }; schemeColor197.Append(luminanceModulation4); schemeColor197.Append(luminanceOffset14); solidFill24.Append(schemeColor197); A.LatinFont latinFont3 = new A.LatinFont() { Typeface = "+mn-lt" }; A.EastAsianFont eastAsianFont3 = new A.EastAsianFont() { Typeface = "+mn-ea" }; A.ComplexScriptFont complexScriptFont3 = new A.ComplexScriptFont() { Typeface = "+mn-cs" }; defaultRunProperties1.Append(solidFill24); defaultRunProperties1.Append(latinFont3); defaultRunProperties1.Append(eastAsianFont3); defaultRunProperties1.Append(complexScriptFont3); paragraphProperties8.Append(defaultRunProperties1); A.EndParagraphRunProperties endParagraphRunProperties14 = new A.EndParagraphRunProperties() { Language = "en-US" }; paragraph25.Append(paragraphProperties8); paragraph25.Append(endParagraphRunProperties14); textProperties50.Append(bodyProperties25); textProperties50.Append(listStyle25); textProperties50.Append(paragraph25); title2.Append(layout1); title2.Append(overlay1); title2.Append(chartShapeProperties1); title2.Append(textProperties50); C.AutoTitleDeleted autoTitleDeleted1 = new C.AutoTitleDeleted() { Val = false }; C.PlotArea plotArea1 = new C.PlotArea(); C.Layout layout2 = new C.Layout(); C.BarChart barChart1 = new C.BarChart(); C.BarDirection barDirection1 = new C.BarDirection() { Val = C.BarDirectionValues.Column }; C.BarGrouping barGrouping1 = new C.BarGrouping() { Val = C.BarGroupingValues.Clustered }; C.VaryColors varyColors1 = new C.VaryColors() { Val = false }; C.BarChartSeries barChartSeries1 = new C.BarChartSeries(); C.Index index1 = new C.Index() { Val = (UInt32Value)0U }; C.Order order1 = new C.Order() { Val = (UInt32Value)0U }; C.ChartShapeProperties chartShapeProperties2 = new C.ChartShapeProperties(); A.SolidFill solidFill25 = new A.SolidFill(); A.SchemeColor schemeColor198 = new A.SchemeColor() { Val = A.SchemeColorValues.Accent1 }; solidFill25.Append(schemeColor198); A.Outline outline14 = new A.Outline(); A.NoFill noFill4 = new A.NoFill(); outline14.Append(noFill4); A.EffectList effectList13 = new A.EffectList(); chartShapeProperties2.Append(solidFill25); chartShapeProperties2.Append(outline14); chartShapeProperties2.Append(effectList13); C.InvertIfNegative invertIfNegative1 = new C.InvertIfNegative() { Val = false }; C.Values values1 = new C.Values(); C.NumberReference numberReference1 = new C.NumberReference(); C.Formula formula1 = new C.Formula(); formula1.Text = "Sheet1!$A$1:$A$5"; C.NumberingCache numberingCache1 = new C.NumberingCache(); C.FormatCode formatCode1 = new C.FormatCode(); formatCode1.Text = "General"; C.PointCount pointCount1 = new C.PointCount() { Val = (UInt32Value)5U }; C.NumericPoint numericPoint1 = new C.NumericPoint() { Index = (UInt32Value)0U }; C.NumericValue numericValue1 = new C.NumericValue(); numericValue1.Text = "1"; numericPoint1.Append(numericValue1); C.NumericPoint numericPoint2 = new C.NumericPoint() { Index = (UInt32Value)1U }; C.NumericValue numericValue2 = new C.NumericValue(); numericValue2.Text = "2"; numericPoint2.Append(numericValue2); C.NumericPoint numericPoint3 = new C.NumericPoint() { Index = (UInt32Value)2U }; C.NumericValue numericValue3 = new C.NumericValue(); numericValue3.Text = "3"; numericPoint3.Append(numericValue3); C.NumericPoint numericPoint4 = new C.NumericPoint() { Index = (UInt32Value)3U }; C.NumericValue numericValue4 = new C.NumericValue(); numericValue4.Text = "4"; numericPoint4.Append(numericValue4); C.NumericPoint numericPoint5 = new C.NumericPoint() { Index = (UInt32Value)4U }; C.NumericValue numericValue5 = new C.NumericValue(); numericValue5.Text = "5"; numericPoint5.Append(numericValue5); numberingCache1.Append(formatCode1); numberingCache1.Append(pointCount1); numberingCache1.Append(numericPoint1); numberingCache1.Append(numericPoint2); numberingCache1.Append(numericPoint3); numberingCache1.Append(numericPoint4); numberingCache1.Append(numericPoint5); numberReference1.Append(formula1); numberReference1.Append(numberingCache1); values1.Append(numberReference1); barChartSeries1.Append(index1); barChartSeries1.Append(order1); barChartSeries1.Append(chartShapeProperties2); barChartSeries1.Append(invertIfNegative1); barChartSeries1.Append(values1); C.DataLabels dataLabels1 = new C.DataLabels(); C.ShowLegendKey showLegendKey1 = new C.ShowLegendKey() { Val = false }; C.ShowValue showValue1 = new C.ShowValue() { Val = false }; C.ShowCategoryName showCategoryName1 = new C.ShowCategoryName() { Val = false }; C.ShowSeriesName showSeriesName1 = new C.ShowSeriesName() { Val = false }; C.ShowPercent showPercent1 = new C.ShowPercent() { Val = false }; C.ShowBubbleSize showBubbleSize1 = new C.ShowBubbleSize() { Val = false }; dataLabels1.Append(showLegendKey1); dataLabels1.Append(showValue1); dataLabels1.Append(showCategoryName1); dataLabels1.Append(showSeriesName1); dataLabels1.Append(showPercent1); dataLabels1.Append(showBubbleSize1); C.GapWidth gapWidth1 = new C.GapWidth() { Val = (UInt16Value)219U }; C.Overlap overlap1 = new C.Overlap() { Val = -27 }; C.AxisId axisId1 = new C.AxisId() { Val = (UInt32Value)414168296U }; C.AxisId axisId2 = new C.AxisId() { Val = (UInt32Value)415864936U }; barChart1.Append(barDirection1); barChart1.Append(barGrouping1); barChart1.Append(varyColors1); barChart1.Append(barChartSeries1); barChart1.Append(dataLabels1); barChart1.Append(gapWidth1); barChart1.Append(overlap1); barChart1.Append(axisId1); barChart1.Append(axisId2); C.CategoryAxis categoryAxis1 = new C.CategoryAxis(); C.AxisId axisId3 = new C.AxisId() { Val = (UInt32Value)414168296U }; C.Scaling scaling1 = new C.Scaling(); C.Orientation orientation1 = new C.Orientation() { Val = C.OrientationValues.MinMax }; scaling1.Append(orientation1); C.Delete delete1 = new C.Delete() { Val = false }; C.AxisPosition axisPosition1 = new C.AxisPosition() { Val = C.AxisPositionValues.Bottom }; C.NumberingFormat numberingFormat1 = new C.NumberingFormat() { FormatCode = "General", SourceLinked = true }; C.MajorTickMark majorTickMark1 = new C.MajorTickMark() { Val = C.TickMarkValues.None }; C.MinorTickMark minorTickMark1 = new C.MinorTickMark() { Val = C.TickMarkValues.None }; C.TickLabelPosition tickLabelPosition1 = new C.TickLabelPosition() { Val = C.TickLabelPositionValues.NextTo }; C.ChartShapeProperties chartShapeProperties3 = new C.ChartShapeProperties(); A.NoFill noFill5 = new A.NoFill(); A.Outline outline15 = new A.Outline() { Width = 9525, CapType = A.LineCapValues.Flat, CompoundLineType = A.CompoundLineValues.Single, Alignment = A.PenAlignmentValues.Center }; A.SolidFill solidFill26 = new A.SolidFill(); A.SchemeColor schemeColor199 = new A.SchemeColor() { Val = A.SchemeColorValues.Text1 }; A.LuminanceModulation luminanceModulation5 = new A.LuminanceModulation() { Val = 15000 }; A.LuminanceOffset luminanceOffset15 = new A.LuminanceOffset() { Val = 85000 }; schemeColor199.Append(luminanceModulation5); schemeColor199.Append(luminanceOffset15); solidFill26.Append(schemeColor199); A.Round round1 = new A.Round(); outline15.Append(solidFill26); outline15.Append(round1); A.EffectList effectList14 = new A.EffectList(); chartShapeProperties3.Append(noFill5); chartShapeProperties3.Append(outline15); chartShapeProperties3.Append(effectList14); C.TextProperties textProperties51 = new C.TextProperties(); A.BodyProperties bodyProperties26 = new A.BodyProperties() { Rotation = -60000000, UseParagraphSpacing = true, VerticalOverflow = A.TextVerticalOverflowValues.Ellipsis, Vertical = A.TextVerticalValues.Horizontal, Wrap = A.TextWrappingValues.Square, Anchor = A.TextAnchoringTypeValues.Center, AnchorCenter = true }; A.ListStyle listStyle26 = new A.ListStyle(); A.Paragraph paragraph26 = new A.Paragraph(); A.ParagraphProperties paragraphProperties9 = new A.ParagraphProperties(); A.DefaultRunProperties defaultRunProperties2 = new A.DefaultRunProperties() { FontSize = 900, Bold = false, Italic = false, Underline = A.TextUnderlineValues.None, Strike = A.TextStrikeValues.NoStrike, Kerning = 1200, Baseline = 0 }; A.SolidFill solidFill27 = new A.SolidFill(); A.SchemeColor schemeColor200 = new A.SchemeColor() { Val = A.SchemeColorValues.Text1 }; A.LuminanceModulation luminanceModulation6 = new A.LuminanceModulation() { Val = 65000 }; A.LuminanceOffset luminanceOffset16 = new A.LuminanceOffset() { Val = 35000 }; schemeColor200.Append(luminanceModulation6); schemeColor200.Append(luminanceOffset16); solidFill27.Append(schemeColor200); A.LatinFont latinFont4 = new A.LatinFont() { Typeface = "+mn-lt" }; A.EastAsianFont eastAsianFont4 = new A.EastAsianFont() { Typeface = "+mn-ea" }; A.ComplexScriptFont complexScriptFont4 = new A.ComplexScriptFont() { Typeface = "+mn-cs" }; defaultRunProperties2.Append(solidFill27); defaultRunProperties2.Append(latinFont4); defaultRunProperties2.Append(eastAsianFont4); defaultRunProperties2.Append(complexScriptFont4); paragraphProperties9.Append(defaultRunProperties2); A.EndParagraphRunProperties endParagraphRunProperties15 = new A.EndParagraphRunProperties() { Language = "en-US" }; paragraph26.Append(paragraphProperties9); paragraph26.Append(endParagraphRunProperties15); textProperties51.Append(bodyProperties26); textProperties51.Append(listStyle26); textProperties51.Append(paragraph26); C.CrossingAxis crossingAxis1 = new C.CrossingAxis() { Val = (UInt32Value)415864936U }; C.Crosses crosses1 = new C.Crosses() { Val = C.CrossesValues.AutoZero }; C.AutoLabeled autoLabeled1 = new C.AutoLabeled() { Val = true }; C.LabelAlignment labelAlignment1 = new C.LabelAlignment() { Val = C.LabelAlignmentValues.Center }; C.LabelOffset labelOffset1 = new C.LabelOffset() { Val = (UInt16Value)100U }; C.NoMultiLevelLabels noMultiLevelLabels1 = new C.NoMultiLevelLabels() { Val = false }; categoryAxis1.Append(axisId3); categoryAxis1.Append(scaling1); categoryAxis1.Append(delete1); categoryAxis1.Append(axisPosition1); categoryAxis1.Append(numberingFormat1); categoryAxis1.Append(majorTickMark1); categoryAxis1.Append(minorTickMark1); categoryAxis1.Append(tickLabelPosition1); categoryAxis1.Append(chartShapeProperties3); categoryAxis1.Append(textProperties51); categoryAxis1.Append(crossingAxis1); categoryAxis1.Append(crosses1); categoryAxis1.Append(autoLabeled1); categoryAxis1.Append(labelAlignment1); categoryAxis1.Append(labelOffset1); categoryAxis1.Append(noMultiLevelLabels1); C.ValueAxis valueAxis1 = new C.ValueAxis(); C.AxisId axisId4 = new C.AxisId() { Val = (UInt32Value)415864936U }; C.Scaling scaling2 = new C.Scaling(); C.Orientation orientation2 = new C.Orientation() { Val = C.OrientationValues.MinMax }; scaling2.Append(orientation2); C.Delete delete2 = new C.Delete() { Val = false }; C.AxisPosition axisPosition2 = new C.AxisPosition() { Val = C.AxisPositionValues.Left }; C.MajorGridlines majorGridlines1 = new C.MajorGridlines(); C.ChartShapeProperties chartShapeProperties4 = new C.ChartShapeProperties(); A.Outline outline16 = new A.Outline() { Width = 9525, CapType = A.LineCapValues.Flat, CompoundLineType = A.CompoundLineValues.Single, Alignment = A.PenAlignmentValues.Center }; A.SolidFill solidFill28 = new A.SolidFill(); A.SchemeColor schemeColor201 = new A.SchemeColor() { Val = A.SchemeColorValues.Text1 }; A.LuminanceModulation luminanceModulation7 = new A.LuminanceModulation() { Val = 15000 }; A.LuminanceOffset luminanceOffset17 = new A.LuminanceOffset() { Val = 85000 }; schemeColor201.Append(luminanceModulation7); schemeColor201.Append(luminanceOffset17); solidFill28.Append(schemeColor201); A.Round round2 = new A.Round(); outline16.Append(solidFill28); outline16.Append(round2); A.EffectList effectList15 = new A.EffectList(); chartShapeProperties4.Append(outline16); chartShapeProperties4.Append(effectList15); majorGridlines1.Append(chartShapeProperties4); C.NumberingFormat numberingFormat2 = new C.NumberingFormat() { FormatCode = "General", SourceLinked = true }; C.MajorTickMark majorTickMark2 = new C.MajorTickMark() { Val = C.TickMarkValues.None }; C.MinorTickMark minorTickMark2 = new C.MinorTickMark() { Val = C.TickMarkValues.None }; C.TickLabelPosition tickLabelPosition2 = new C.TickLabelPosition() { Val = C.TickLabelPositionValues.NextTo }; C.ChartShapeProperties chartShapeProperties5 = new C.ChartShapeProperties(); A.NoFill noFill6 = new A.NoFill(); A.Outline outline17 = new A.Outline(); A.NoFill noFill7 = new A.NoFill(); outline17.Append(noFill7); A.EffectList effectList16 = new A.EffectList(); chartShapeProperties5.Append(noFill6); chartShapeProperties5.Append(outline17); chartShapeProperties5.Append(effectList16); C.TextProperties textProperties52 = new C.TextProperties(); A.BodyProperties bodyProperties27 = new A.BodyProperties() { Rotation = -60000000, UseParagraphSpacing = true, VerticalOverflow = A.TextVerticalOverflowValues.Ellipsis, Vertical = A.TextVerticalValues.Horizontal, Wrap = A.TextWrappingValues.Square, Anchor = A.TextAnchoringTypeValues.Center, AnchorCenter = true }; A.ListStyle listStyle27 = new A.ListStyle(); A.Paragraph paragraph27 = new A.Paragraph(); A.ParagraphProperties paragraphProperties10 = new A.ParagraphProperties(); A.DefaultRunProperties defaultRunProperties3 = new A.DefaultRunProperties() { FontSize = 900, Bold = false, Italic = false, Underline = A.TextUnderlineValues.None, Strike = A.TextStrikeValues.NoStrike, Kerning = 1200, Baseline = 0 }; A.SolidFill solidFill29 = new A.SolidFill(); A.SchemeColor schemeColor202 = new A.SchemeColor() { Val = A.SchemeColorValues.Text1 }; A.LuminanceModulation luminanceModulation8 = new A.LuminanceModulation() { Val = 65000 }; A.LuminanceOffset luminanceOffset18 = new A.LuminanceOffset() { Val = 35000 }; schemeColor202.Append(luminanceModulation8); schemeColor202.Append(luminanceOffset18); solidFill29.Append(schemeColor202); A.LatinFont latinFont5 = new A.LatinFont() { Typeface = "+mn-lt" }; A.EastAsianFont eastAsianFont5 = new A.EastAsianFont() { Typeface = "+mn-ea" }; A.ComplexScriptFont complexScriptFont5 = new A.ComplexScriptFont() { Typeface = "+mn-cs" }; defaultRunProperties3.Append(solidFill29); defaultRunProperties3.Append(latinFont5); defaultRunProperties3.Append(eastAsianFont5); defaultRunProperties3.Append(complexScriptFont5); paragraphProperties10.Append(defaultRunProperties3); A.EndParagraphRunProperties endParagraphRunProperties16 = new A.EndParagraphRunProperties() { Language = "en-US" }; paragraph27.Append(paragraphProperties10); paragraph27.Append(endParagraphRunProperties16); textProperties52.Append(bodyProperties27); textProperties52.Append(listStyle27); textProperties52.Append(paragraph27); C.CrossingAxis crossingAxis2 = new C.CrossingAxis() { Val = (UInt32Value)414168296U }; C.Crosses crosses2 = new C.Crosses() { Val = C.CrossesValues.AutoZero }; C.CrossBetween crossBetween1 = new C.CrossBetween() { Val = C.CrossBetweenValues.Between }; valueAxis1.Append(axisId4); valueAxis1.Append(scaling2); valueAxis1.Append(delete2); valueAxis1.Append(axisPosition2); valueAxis1.Append(majorGridlines1); valueAxis1.Append(numberingFormat2); valueAxis1.Append(majorTickMark2); valueAxis1.Append(minorTickMark2); valueAxis1.Append(tickLabelPosition2); valueAxis1.Append(chartShapeProperties5); valueAxis1.Append(textProperties52); valueAxis1.Append(crossingAxis2); valueAxis1.Append(crosses2); valueAxis1.Append(crossBetween1); C.ShapeProperties shapeProperties36 = new C.ShapeProperties(); A.NoFill noFill8 = new A.NoFill(); A.Outline outline18 = new A.Outline(); A.NoFill noFill9 = new A.NoFill(); outline18.Append(noFill9); A.EffectList effectList17 = new A.EffectList(); shapeProperties36.Append(noFill8); shapeProperties36.Append(outline18); shapeProperties36.Append(effectList17); plotArea1.Append(layout2); plotArea1.Append(barChart1); plotArea1.Append(categoryAxis1); plotArea1.Append(valueAxis1); plotArea1.Append(shapeProperties36); C.PlotVisibleOnly plotVisibleOnly1 = new C.PlotVisibleOnly() { Val = true }; C.DisplayBlanksAs displayBlanksAs1 = new C.DisplayBlanksAs() { Val = C.DisplayBlanksAsValues.Gap }; C.ShowDataLabelsOverMaximum showDataLabelsOverMaximum1 = new C.ShowDataLabelsOverMaximum() { Val = false }; chart1.Append(title2); chart1.Append(autoTitleDeleted1); chart1.Append(plotArea1); chart1.Append(plotVisibleOnly1); chart1.Append(displayBlanksAs1); chart1.Append(showDataLabelsOverMaximum1); C.ShapeProperties shapeProperties37 = new C.ShapeProperties(); A.SolidFill solidFill30 = new A.SolidFill(); A.SchemeColor schemeColor203 = new A.SchemeColor() { Val = A.SchemeColorValues.Background1 }; solidFill30.Append(schemeColor203); A.Outline outline19 = new A.Outline() { Width = 9525, CapType = A.LineCapValues.Flat, CompoundLineType = A.CompoundLineValues.Single, Alignment = A.PenAlignmentValues.Center }; A.SolidFill solidFill31 = new A.SolidFill(); A.SchemeColor schemeColor204 = new A.SchemeColor() { Val = A.SchemeColorValues.Text1 }; A.LuminanceModulation luminanceModulation9 = new A.LuminanceModulation() { Val = 15000 }; A.LuminanceOffset luminanceOffset19 = new A.LuminanceOffset() { Val = 85000 }; schemeColor204.Append(luminanceModulation9); schemeColor204.Append(luminanceOffset19); solidFill31.Append(schemeColor204); A.Round round3 = new A.Round(); outline19.Append(solidFill31); outline19.Append(round3); A.EffectList effectList18 = new A.EffectList(); shapeProperties37.Append(solidFill30); shapeProperties37.Append(outline19); shapeProperties37.Append(effectList18); C.TextProperties textProperties53 = new C.TextProperties(); A.BodyProperties bodyProperties28 = new A.BodyProperties(); A.ListStyle listStyle28 = new A.ListStyle(); A.Paragraph paragraph28 = new A.Paragraph(); A.ParagraphProperties paragraphProperties11 = new A.ParagraphProperties(); A.DefaultRunProperties defaultRunProperties4 = new A.DefaultRunProperties(); paragraphProperties11.Append(defaultRunProperties4); A.EndParagraphRunProperties endParagraphRunProperties17 = new A.EndParagraphRunProperties() { Language = "en-US" }; paragraph28.Append(paragraphProperties11); paragraph28.Append(endParagraphRunProperties17); textProperties53.Append(bodyProperties28); textProperties53.Append(listStyle28); textProperties53.Append(paragraph28); C.PrintSettings printSettings1 = new C.PrintSettings(); C.HeaderFooter headerFooter1 = new C.HeaderFooter(); C.PageMargins pageMargins3 = new C.PageMargins() { Left = 0.7D, Right = 0.7D, Top = 0.75D, Bottom = 0.75D, Header = 0.3D, Footer = 0.3D }; C.PageSetup pageSetup2 = new C.PageSetup(); printSettings1.Append(headerFooter1); printSettings1.Append(pageMargins3); printSettings1.Append(pageSetup2); chartSpace1.Append(date19041); chartSpace1.Append(editingLanguage1); chartSpace1.Append(roundedCorners1); chartSpace1.Append(alternateContent1); chartSpace1.Append(chart1); chartSpace1.Append(shapeProperties37); chartSpace1.Append(textProperties53); chartSpace1.Append(printSettings1); chartPart1.ChartSpace = chartSpace1; }
/// <summary> /// ChartSpace constructor. /// </summary> /// <param name="ownerPart">The owner part of the ChartSpace.</param> internal ChartSpace(ChartPart ownerPart) : base (ownerPart ) { }
// Generates content of chartPart1. private void GenerateChartPart1Content(ChartPart chartPart1) { C.ChartSpace chartSpace1 = new C.ChartSpace(); chartSpace1.AddNamespaceDeclaration("c", "http://schemas.openxmlformats.org/drawingml/2006/chart"); chartSpace1.AddNamespaceDeclaration("a", "http://schemas.openxmlformats.org/drawingml/2006/main"); chartSpace1.AddNamespaceDeclaration("r", "http://schemas.openxmlformats.org/officeDocument/2006/relationships"); C.Date1904 date19041 = new C.Date1904() { Val = false }; C.EditingLanguage editingLanguage1 = new C.EditingLanguage() { Val = "en-US" }; C.RoundedCorners roundedCorners1 = new C.RoundedCorners() { Val = false }; AlternateContent alternateContent1 = new AlternateContent(); alternateContent1.AddNamespaceDeclaration("mc", "http://schemas.openxmlformats.org/markup-compatibility/2006"); AlternateContentChoice alternateContentChoice1 = new AlternateContentChoice() { Requires = "c14" }; alternateContentChoice1.AddNamespaceDeclaration("c14", "http://schemas.microsoft.com/office/drawing/2007/8/2/chart"); C14.Style style1 = new C14.Style() { Val = 102 }; alternateContentChoice1.Append(style1); AlternateContentFallback alternateContentFallback1 = new AlternateContentFallback(); C.Style style2 = new C.Style() { Val = 2 }; alternateContentFallback1.Append(style2); alternateContent1.Append(alternateContentChoice1); alternateContent1.Append(alternateContentFallback1); C.Chart chart1 = new C.Chart(); C.AutoTitleDeleted autoTitleDeleted1 = new C.AutoTitleDeleted() { Val = true }; C.PlotArea plotArea1 = new C.PlotArea(); C.Layout layout1 = new C.Layout(); C.LineChart lineChart1 = new C.LineChart(); C.Grouping grouping1 = new C.Grouping() { Val = C.GroupingValues.Standard }; C.VaryColors varyColors1 = new C.VaryColors() { Val = false }; C.LineChartSeries lineChartSeries1 = new C.LineChartSeries(); C.Index index1 = new C.Index() { Val = (UInt32Value)0U }; C.Order order1 = new C.Order() { Val = (UInt32Value)0U }; C.SeriesText seriesText1 = new C.SeriesText(); C.StringReference stringReference1 = new C.StringReference(); C.Formula formula1 = new C.Formula(); formula1.Text = "Sheet1!$B$1"; C.StringCache stringCache1 = new C.StringCache(); C.PointCount pointCount1 = new C.PointCount() { Val = (UInt32Value)1U }; C.StringPoint stringPoint1 = new C.StringPoint() { Index = (UInt32Value)0U }; C.NumericValue numericValue1 = new C.NumericValue(); numericValue1.Text = "Series 1"; stringPoint1.Append(numericValue1); stringCache1.Append(pointCount1); stringCache1.Append(stringPoint1); stringReference1.Append(formula1); stringReference1.Append(stringCache1); seriesText1.Append(stringReference1); C.Marker marker1 = new C.Marker(); C.Symbol symbol1 = new C.Symbol() { Val = C.MarkerStyleValues.None }; marker1.Append(symbol1); C.CategoryAxisData categoryAxisData1 = new C.CategoryAxisData(); C.StringReference stringReference2 = new C.StringReference(); C.Formula formula2 = new C.Formula(); formula2.Text = "Sheet1!$A$2:$A$5"; C.StringCache stringCache2 = new C.StringCache(); C.PointCount pointCount2 = new C.PointCount() { Val = (UInt32Value)4U }; C.StringPoint stringPoint2 = new C.StringPoint() { Index = (UInt32Value)0U }; C.NumericValue numericValue2 = new C.NumericValue(); numericValue2.Text = "Category 1"; stringPoint2.Append(numericValue2); C.StringPoint stringPoint3 = new C.StringPoint() { Index = (UInt32Value)1U }; C.NumericValue numericValue3 = new C.NumericValue(); numericValue3.Text = "Category 2"; stringPoint3.Append(numericValue3); C.StringPoint stringPoint4 = new C.StringPoint() { Index = (UInt32Value)2U }; C.NumericValue numericValue4 = new C.NumericValue(); numericValue4.Text = "Category 3"; stringPoint4.Append(numericValue4); C.StringPoint stringPoint5 = new C.StringPoint() { Index = (UInt32Value)3U }; C.NumericValue numericValue5 = new C.NumericValue(); numericValue5.Text = "Category 4"; stringPoint5.Append(numericValue5); stringCache2.Append(pointCount2); stringCache2.Append(stringPoint2); stringCache2.Append(stringPoint3); stringCache2.Append(stringPoint4); stringCache2.Append(stringPoint5); stringReference2.Append(formula2); stringReference2.Append(stringCache2); categoryAxisData1.Append(stringReference2); C.Values values1 = new C.Values(); C.NumberReference numberReference1 = new C.NumberReference(); C.Formula formula3 = new C.Formula(); formula3.Text = "Sheet1!$B$2:$B$5"; C.NumberingCache numberingCache1 = new C.NumberingCache(); C.FormatCode formatCode1 = new C.FormatCode(); formatCode1.Text = "General"; C.PointCount pointCount3 = new C.PointCount() { Val = (UInt32Value)4U }; C.NumericPoint numericPoint1 = new C.NumericPoint() { Index = (UInt32Value)0U }; C.NumericValue numericValue6 = new C.NumericValue(); numericValue6.Text = "4.3"; numericPoint1.Append(numericValue6); C.NumericPoint numericPoint2 = new C.NumericPoint() { Index = (UInt32Value)1U }; C.NumericValue numericValue7 = new C.NumericValue(); numericValue7.Text = "2.5"; numericPoint2.Append(numericValue7); C.NumericPoint numericPoint3 = new C.NumericPoint() { Index = (UInt32Value)2U }; C.NumericValue numericValue8 = new C.NumericValue(); numericValue8.Text = "3.5"; numericPoint3.Append(numericValue8); C.NumericPoint numericPoint4 = new C.NumericPoint() { Index = (UInt32Value)3U }; C.NumericValue numericValue9 = new C.NumericValue(); numericValue9.Text = "4.5"; numericPoint4.Append(numericValue9); numberingCache1.Append(formatCode1); numberingCache1.Append(pointCount3); numberingCache1.Append(numericPoint1); numberingCache1.Append(numericPoint2); numberingCache1.Append(numericPoint3); numberingCache1.Append(numericPoint4); numberReference1.Append(formula3); numberReference1.Append(numberingCache1); values1.Append(numberReference1); C.Smooth smooth1 = new C.Smooth() { Val = false }; lineChartSeries1.Append(index1); lineChartSeries1.Append(order1); lineChartSeries1.Append(seriesText1); lineChartSeries1.Append(marker1); lineChartSeries1.Append(categoryAxisData1); lineChartSeries1.Append(values1); lineChartSeries1.Append(smooth1); C.LineChartSeries lineChartSeries2 = new C.LineChartSeries(); C.Index index2 = new C.Index() { Val = (UInt32Value)1U }; C.Order order2 = new C.Order() { Val = (UInt32Value)1U }; C.SeriesText seriesText2 = new C.SeriesText(); C.StringReference stringReference3 = new C.StringReference(); C.Formula formula4 = new C.Formula(); formula4.Text = "Sheet1!$C$1"; C.StringCache stringCache3 = new C.StringCache(); C.PointCount pointCount4 = new C.PointCount() { Val = (UInt32Value)1U }; C.StringPoint stringPoint6 = new C.StringPoint() { Index = (UInt32Value)0U }; C.NumericValue numericValue10 = new C.NumericValue(); numericValue10.Text = "Series 2"; stringPoint6.Append(numericValue10); stringCache3.Append(pointCount4); stringCache3.Append(stringPoint6); stringReference3.Append(formula4); stringReference3.Append(stringCache3); seriesText2.Append(stringReference3); C.Marker marker2 = new C.Marker(); C.Symbol symbol2 = new C.Symbol() { Val = C.MarkerStyleValues.None }; marker2.Append(symbol2); C.CategoryAxisData categoryAxisData2 = new C.CategoryAxisData(); C.StringReference stringReference4 = new C.StringReference(); C.Formula formula5 = new C.Formula(); formula5.Text = "Sheet1!$A$2:$A$5"; C.StringCache stringCache4 = new C.StringCache(); C.PointCount pointCount5 = new C.PointCount() { Val = (UInt32Value)4U }; C.StringPoint stringPoint7 = new C.StringPoint() { Index = (UInt32Value)0U }; C.NumericValue numericValue11 = new C.NumericValue(); numericValue11.Text = "Category 1"; stringPoint7.Append(numericValue11); C.StringPoint stringPoint8 = new C.StringPoint() { Index = (UInt32Value)1U }; C.NumericValue numericValue12 = new C.NumericValue(); numericValue12.Text = "Category 2"; stringPoint8.Append(numericValue12); C.StringPoint stringPoint9 = new C.StringPoint() { Index = (UInt32Value)2U }; C.NumericValue numericValue13 = new C.NumericValue(); numericValue13.Text = "Category 3"; stringPoint9.Append(numericValue13); C.StringPoint stringPoint10 = new C.StringPoint() { Index = (UInt32Value)3U }; C.NumericValue numericValue14 = new C.NumericValue(); numericValue14.Text = "Category 4"; stringPoint10.Append(numericValue14); stringCache4.Append(pointCount5); stringCache4.Append(stringPoint7); stringCache4.Append(stringPoint8); stringCache4.Append(stringPoint9); stringCache4.Append(stringPoint10); stringReference4.Append(formula5); stringReference4.Append(stringCache4); categoryAxisData2.Append(stringReference4); C.Values values2 = new C.Values(); C.NumberReference numberReference2 = new C.NumberReference(); C.Formula formula6 = new C.Formula(); formula6.Text = "Sheet1!$C$2:$C$5"; C.NumberingCache numberingCache2 = new C.NumberingCache(); C.FormatCode formatCode2 = new C.FormatCode(); formatCode2.Text = "General"; C.PointCount pointCount6 = new C.PointCount() { Val = (UInt32Value)4U }; C.NumericPoint numericPoint5 = new C.NumericPoint() { Index = (UInt32Value)0U }; C.NumericValue numericValue15 = new C.NumericValue(); numericValue15.Text = "2.4"; numericPoint5.Append(numericValue15); C.NumericPoint numericPoint6 = new C.NumericPoint() { Index = (UInt32Value)1U }; C.NumericValue numericValue16 = new C.NumericValue(); numericValue16.Text = "4.4000000000000004"; numericPoint6.Append(numericValue16); C.NumericPoint numericPoint7 = new C.NumericPoint() { Index = (UInt32Value)2U }; C.NumericValue numericValue17 = new C.NumericValue(); numericValue17.Text = "1.8"; numericPoint7.Append(numericValue17); C.NumericPoint numericPoint8 = new C.NumericPoint() { Index = (UInt32Value)3U }; C.NumericValue numericValue18 = new C.NumericValue(); numericValue18.Text = "2.8"; numericPoint8.Append(numericValue18); numberingCache2.Append(formatCode2); numberingCache2.Append(pointCount6); numberingCache2.Append(numericPoint5); numberingCache2.Append(numericPoint6); numberingCache2.Append(numericPoint7); numberingCache2.Append(numericPoint8); numberReference2.Append(formula6); numberReference2.Append(numberingCache2); values2.Append(numberReference2); C.Smooth smooth2 = new C.Smooth() { Val = false }; lineChartSeries2.Append(index2); lineChartSeries2.Append(order2); lineChartSeries2.Append(seriesText2); lineChartSeries2.Append(marker2); lineChartSeries2.Append(categoryAxisData2); lineChartSeries2.Append(values2); lineChartSeries2.Append(smooth2); C.LineChartSeries lineChartSeries3 = new C.LineChartSeries(); C.Index index3 = new C.Index() { Val = (UInt32Value)2U }; C.Order order3 = new C.Order() { Val = (UInt32Value)2U }; C.SeriesText seriesText3 = new C.SeriesText(); C.StringReference stringReference5 = new C.StringReference(); C.Formula formula7 = new C.Formula(); formula7.Text = "Sheet1!$D$1"; C.StringCache stringCache5 = new C.StringCache(); C.PointCount pointCount7 = new C.PointCount() { Val = (UInt32Value)1U }; C.StringPoint stringPoint11 = new C.StringPoint() { Index = (UInt32Value)0U }; C.NumericValue numericValue19 = new C.NumericValue(); numericValue19.Text = "Series 3"; stringPoint11.Append(numericValue19); stringCache5.Append(pointCount7); stringCache5.Append(stringPoint11); stringReference5.Append(formula7); stringReference5.Append(stringCache5); seriesText3.Append(stringReference5); C.Marker marker3 = new C.Marker(); C.Symbol symbol3 = new C.Symbol() { Val = C.MarkerStyleValues.None }; marker3.Append(symbol3); C.CategoryAxisData categoryAxisData3 = new C.CategoryAxisData(); C.StringReference stringReference6 = new C.StringReference(); C.Formula formula8 = new C.Formula(); formula8.Text = "Sheet1!$A$2:$A$5"; C.StringCache stringCache6 = new C.StringCache(); C.PointCount pointCount8 = new C.PointCount() { Val = (UInt32Value)4U }; C.StringPoint stringPoint12 = new C.StringPoint() { Index = (UInt32Value)0U }; C.NumericValue numericValue20 = new C.NumericValue(); numericValue20.Text = "Category 1"; stringPoint12.Append(numericValue20); C.StringPoint stringPoint13 = new C.StringPoint() { Index = (UInt32Value)1U }; C.NumericValue numericValue21 = new C.NumericValue(); numericValue21.Text = "Category 2"; stringPoint13.Append(numericValue21); C.StringPoint stringPoint14 = new C.StringPoint() { Index = (UInt32Value)2U }; C.NumericValue numericValue22 = new C.NumericValue(); numericValue22.Text = "Category 3"; stringPoint14.Append(numericValue22); C.StringPoint stringPoint15 = new C.StringPoint() { Index = (UInt32Value)3U }; C.NumericValue numericValue23 = new C.NumericValue(); numericValue23.Text = "Category 4"; stringPoint15.Append(numericValue23); stringCache6.Append(pointCount8); stringCache6.Append(stringPoint12); stringCache6.Append(stringPoint13); stringCache6.Append(stringPoint14); stringCache6.Append(stringPoint15); stringReference6.Append(formula8); stringReference6.Append(stringCache6); categoryAxisData3.Append(stringReference6); C.Values values3 = new C.Values(); C.NumberReference numberReference3 = new C.NumberReference(); C.Formula formula9 = new C.Formula(); formula9.Text = "Sheet1!$D$2:$D$5"; C.NumberingCache numberingCache3 = new C.NumberingCache(); C.FormatCode formatCode3 = new C.FormatCode(); formatCode3.Text = "General"; C.PointCount pointCount9 = new C.PointCount() { Val = (UInt32Value)4U }; C.NumericPoint numericPoint9 = new C.NumericPoint() { Index = (UInt32Value)0U }; C.NumericValue numericValue24 = new C.NumericValue(); numericValue24.Text = "2"; numericPoint9.Append(numericValue24); C.NumericPoint numericPoint10 = new C.NumericPoint() { Index = (UInt32Value)1U }; C.NumericValue numericValue25 = new C.NumericValue(); numericValue25.Text = "2"; numericPoint10.Append(numericValue25); C.NumericPoint numericPoint11 = new C.NumericPoint() { Index = (UInt32Value)2U }; C.NumericValue numericValue26 = new C.NumericValue(); numericValue26.Text = "3"; numericPoint11.Append(numericValue26); C.NumericPoint numericPoint12 = new C.NumericPoint() { Index = (UInt32Value)3U }; C.NumericValue numericValue27 = new C.NumericValue(); numericValue27.Text = "5"; numericPoint12.Append(numericValue27); numberingCache3.Append(formatCode3); numberingCache3.Append(pointCount9); numberingCache3.Append(numericPoint9); numberingCache3.Append(numericPoint10); numberingCache3.Append(numericPoint11); numberingCache3.Append(numericPoint12); numberReference3.Append(formula9); numberReference3.Append(numberingCache3); values3.Append(numberReference3); C.Smooth smooth3 = new C.Smooth() { Val = false }; lineChartSeries3.Append(index3); lineChartSeries3.Append(order3); lineChartSeries3.Append(seriesText3); lineChartSeries3.Append(marker3); lineChartSeries3.Append(categoryAxisData3); lineChartSeries3.Append(values3); lineChartSeries3.Append(smooth3); C.DataLabels dataLabels1 = new C.DataLabels(); C.ShowLegendKey showLegendKey1 = new C.ShowLegendKey() { Val = false }; C.ShowValue showValue1 = new C.ShowValue() { Val = false }; C.ShowCategoryName showCategoryName1 = new C.ShowCategoryName() { Val = false }; C.ShowSeriesName showSeriesName1 = new C.ShowSeriesName() { Val = false }; C.ShowPercent showPercent1 = new C.ShowPercent() { Val = false }; C.ShowBubbleSize showBubbleSize1 = new C.ShowBubbleSize() { Val = false }; dataLabels1.Append(showLegendKey1); dataLabels1.Append(showValue1); dataLabels1.Append(showCategoryName1); dataLabels1.Append(showSeriesName1); dataLabels1.Append(showPercent1); dataLabels1.Append(showBubbleSize1); C.ShowMarker showMarker1 = new C.ShowMarker() { Val = true }; C.Smooth smooth4 = new C.Smooth() { Val = false }; C.AxisId axisId1 = new C.AxisId() { Val = (UInt32Value)231952384U }; C.AxisId axisId2 = new C.AxisId() { Val = (UInt32Value)231953920U }; lineChart1.Append(grouping1); lineChart1.Append(varyColors1); lineChart1.Append(lineChartSeries1); lineChart1.Append(lineChartSeries2); lineChart1.Append(lineChartSeries3); lineChart1.Append(dataLabels1); lineChart1.Append(showMarker1); lineChart1.Append(smooth4); lineChart1.Append(axisId1); lineChart1.Append(axisId2); C.CategoryAxis categoryAxis1 = new C.CategoryAxis(); C.AxisId axisId3 = new C.AxisId() { Val = (UInt32Value)231952384U }; C.Scaling scaling1 = new C.Scaling(); C.Orientation orientation1 = new C.Orientation() { Val = C.OrientationValues.MinMax }; scaling1.Append(orientation1); C.Delete delete1 = new C.Delete() { Val = false }; C.AxisPosition axisPosition1 = new C.AxisPosition() { Val = C.AxisPositionValues.Bottom }; C.MajorTickMark majorTickMark1 = new C.MajorTickMark() { Val = C.TickMarkValues.Outside }; C.MinorTickMark minorTickMark1 = new C.MinorTickMark() { Val = C.TickMarkValues.None }; C.TickLabelPosition tickLabelPosition1 = new C.TickLabelPosition() { Val = C.TickLabelPositionValues.NextTo }; C.CrossingAxis crossingAxis1 = new C.CrossingAxis() { Val = (UInt32Value)231953920U }; C.Crosses crosses1 = new C.Crosses() { Val = C.CrossesValues.AutoZero }; C.AutoLabeled autoLabeled1 = new C.AutoLabeled() { Val = true }; C.LabelAlignment labelAlignment1 = new C.LabelAlignment() { Val = C.LabelAlignmentValues.Center }; C.LabelOffset labelOffset1 = new C.LabelOffset() { Val = (UInt16Value)100U }; C.NoMultiLevelLabels noMultiLevelLabels1 = new C.NoMultiLevelLabels() { Val = false }; categoryAxis1.Append(axisId3); categoryAxis1.Append(scaling1); categoryAxis1.Append(delete1); categoryAxis1.Append(axisPosition1); categoryAxis1.Append(majorTickMark1); categoryAxis1.Append(minorTickMark1); categoryAxis1.Append(tickLabelPosition1); categoryAxis1.Append(crossingAxis1); categoryAxis1.Append(crosses1); categoryAxis1.Append(autoLabeled1); categoryAxis1.Append(labelAlignment1); categoryAxis1.Append(labelOffset1); categoryAxis1.Append(noMultiLevelLabels1); C.ValueAxis valueAxis1 = new C.ValueAxis(); C.AxisId axisId4 = new C.AxisId() { Val = (UInt32Value)231953920U }; C.Scaling scaling2 = new C.Scaling(); C.Orientation orientation2 = new C.Orientation() { Val = C.OrientationValues.MinMax }; scaling2.Append(orientation2); C.Delete delete2 = new C.Delete() { Val = false }; C.AxisPosition axisPosition2 = new C.AxisPosition() { Val = C.AxisPositionValues.Left }; C.MajorGridlines majorGridlines1 = new C.MajorGridlines(); C.NumberingFormat numberingFormat1 = new C.NumberingFormat() { FormatCode = "General", SourceLinked = true }; C.MajorTickMark majorTickMark2 = new C.MajorTickMark() { Val = C.TickMarkValues.Outside }; C.MinorTickMark minorTickMark2 = new C.MinorTickMark() { Val = C.TickMarkValues.None }; C.TickLabelPosition tickLabelPosition2 = new C.TickLabelPosition() { Val = C.TickLabelPositionValues.NextTo }; C.CrossingAxis crossingAxis2 = new C.CrossingAxis() { Val = (UInt32Value)231952384U }; C.Crosses crosses2 = new C.Crosses() { Val = C.CrossesValues.AutoZero }; C.CrossBetween crossBetween1 = new C.CrossBetween() { Val = C.CrossBetweenValues.Between }; valueAxis1.Append(axisId4); valueAxis1.Append(scaling2); valueAxis1.Append(delete2); valueAxis1.Append(axisPosition2); valueAxis1.Append(majorGridlines1); valueAxis1.Append(numberingFormat1); valueAxis1.Append(majorTickMark2); valueAxis1.Append(minorTickMark2); valueAxis1.Append(tickLabelPosition2); valueAxis1.Append(crossingAxis2); valueAxis1.Append(crosses2); valueAxis1.Append(crossBetween1); plotArea1.Append(layout1); plotArea1.Append(lineChart1); plotArea1.Append(categoryAxis1); plotArea1.Append(valueAxis1); C.Legend legend1 = new C.Legend(); C.LegendPosition legendPosition1 = new C.LegendPosition() { Val = C.LegendPositionValues.Right }; C.Overlay overlay1 = new C.Overlay() { Val = false }; legend1.Append(legendPosition1); legend1.Append(overlay1); C.PlotVisibleOnly plotVisibleOnly1 = new C.PlotVisibleOnly() { Val = true }; C.DisplayBlanksAs displayBlanksAs1 = new C.DisplayBlanksAs() { Val = C.DisplayBlanksAsValues.Gap }; C.ShowDataLabelsOverMaximum showDataLabelsOverMaximum1 = new C.ShowDataLabelsOverMaximum() { Val = false }; chart1.Append(autoTitleDeleted1); chart1.Append(plotArea1); chart1.Append(legend1); chart1.Append(plotVisibleOnly1); chart1.Append(displayBlanksAs1); chart1.Append(showDataLabelsOverMaximum1); C.ExternalData externalData1 = new C.ExternalData() { Id = "rId1" }; C.AutoUpdate autoUpdate1 = new C.AutoUpdate() { Val = false }; externalData1.Append(autoUpdate1); chartSpace1.Append(date19041); chartSpace1.Append(editingLanguage1); chartSpace1.Append(roundedCorners1); chartSpace1.Append(alternateContent1); chartSpace1.Append(chart1); chartSpace1.Append(externalData1); chartPart1.ChartSpace = chartSpace1; }
/// <summary> /// Saves the DOM into the ChartPart. /// </summary> /// <param name="openXmlPart">Specifies the part to save to.</param> public void Save(ChartPart openXmlPart) { base.SaveToPart(openXmlPart); }
// Generates content of chartPart2. private void GenerateChartPart2Content(ChartPart chartPart2) { C.ChartSpace chartSpace2 = new C.ChartSpace(); chartSpace2.AddNamespaceDeclaration("c", "http://schemas.openxmlformats.org/drawingml/2006/chart"); chartSpace2.AddNamespaceDeclaration("a", "http://schemas.openxmlformats.org/drawingml/2006/main"); chartSpace2.AddNamespaceDeclaration("r", "http://schemas.openxmlformats.org/officeDocument/2006/relationships"); C.Date1904 date19042 = new C.Date1904() { Val = false }; C.EditingLanguage editingLanguage2 = new C.EditingLanguage() { Val = "en-US" }; C.RoundedCorners roundedCorners2 = new C.RoundedCorners() { Val = false }; AlternateContent alternateContent2 = new AlternateContent(); alternateContent2.AddNamespaceDeclaration("mc", "http://schemas.openxmlformats.org/markup-compatibility/2006"); AlternateContentChoice alternateContentChoice2 = new AlternateContentChoice() { Requires = "c14" }; alternateContentChoice2.AddNamespaceDeclaration("c14", "http://schemas.microsoft.com/office/drawing/2007/8/2/chart"); C14.Style style3 = new C14.Style() { Val = 102 }; alternateContentChoice2.Append(style3); AlternateContentFallback alternateContentFallback2 = new AlternateContentFallback(); C.Style style4 = new C.Style() { Val = 2 }; alternateContentFallback2.Append(style4); alternateContent2.Append(alternateContentChoice2); alternateContent2.Append(alternateContentFallback2); C.Chart chart2 = new C.Chart(); C.Title title1 = new C.Title(); C.Overlay overlay2 = new C.Overlay() { Val = false }; title1.Append(overlay2); C.AutoTitleDeleted autoTitleDeleted2 = new C.AutoTitleDeleted() { Val = false }; C.PlotArea plotArea2 = new C.PlotArea(); C.Layout layout2 = new C.Layout(); C.PieChart pieChart1 = new C.PieChart(); C.VaryColors varyColors2 = new C.VaryColors() { Val = true }; C.PieChartSeries pieChartSeries1 = new C.PieChartSeries(); C.Index index4 = new C.Index() { Val = (UInt32Value)0U }; C.Order order4 = new C.Order() { Val = (UInt32Value)0U }; C.SeriesText seriesText4 = new C.SeriesText(); C.StringReference stringReference7 = new C.StringReference(); C.Formula formula10 = new C.Formula(); formula10.Text = "Sheet1!$B$1"; C.StringCache stringCache7 = new C.StringCache(); C.PointCount pointCount10 = new C.PointCount() { Val = (UInt32Value)1U }; C.StringPoint stringPoint16 = new C.StringPoint() { Index = (UInt32Value)0U }; C.NumericValue numericValue28 = new C.NumericValue(); numericValue28.Text = "Cases By Aging"; stringPoint16.Append(numericValue28); stringCache7.Append(pointCount10); stringCache7.Append(stringPoint16); stringReference7.Append(formula10); stringReference7.Append(stringCache7); seriesText4.Append(stringReference7); C.CategoryAxisData categoryAxisData4 = new C.CategoryAxisData(); C.StringReference stringReference8 = new C.StringReference(); C.Formula formula11 = new C.Formula(); formula11.Text = "Sheet1!$A$2:$A$5"; C.StringCache stringCache8 = new C.StringCache(); C.PointCount pointCount11 = new C.PointCount() { Val = (UInt32Value)4U }; C.StringPoint stringPoint17 = new C.StringPoint() { Index = (UInt32Value)0U }; C.NumericValue numericValue29 = new C.NumericValue(); numericValue29.Text = "1st Qtr"; stringPoint17.Append(numericValue29); C.StringPoint stringPoint18 = new C.StringPoint() { Index = (UInt32Value)1U }; C.NumericValue numericValue30 = new C.NumericValue(); numericValue30.Text = "2nd Qtr"; stringPoint18.Append(numericValue30); C.StringPoint stringPoint19 = new C.StringPoint() { Index = (UInt32Value)2U }; C.NumericValue numericValue31 = new C.NumericValue(); numericValue31.Text = "3rd Qtr"; stringPoint19.Append(numericValue31); C.StringPoint stringPoint20 = new C.StringPoint() { Index = (UInt32Value)3U }; C.NumericValue numericValue32 = new C.NumericValue(); numericValue32.Text = "4th Qtr"; stringPoint20.Append(numericValue32); stringCache8.Append(pointCount11); stringCache8.Append(stringPoint17); stringCache8.Append(stringPoint18); stringCache8.Append(stringPoint19); stringCache8.Append(stringPoint20); stringReference8.Append(formula11); stringReference8.Append(stringCache8); categoryAxisData4.Append(stringReference8); C.Values values4 = new C.Values(); C.NumberReference numberReference4 = new C.NumberReference(); C.Formula formula12 = new C.Formula(); formula12.Text = "Sheet1!$B$2:$B$5"; C.NumberingCache numberingCache4 = new C.NumberingCache(); C.FormatCode formatCode4 = new C.FormatCode(); formatCode4.Text = "General"; C.PointCount pointCount12 = new C.PointCount() { Val = (UInt32Value)4U }; numberingCache4.Append(formatCode4); numberingCache4.Append(pointCount12); for (int i = 0; i <= 3; i++) { C.NumericPoint numericPoint13 = new C.NumericPoint() { Index = UInt32Value.FromUInt32((uint)i) }; C.NumericValue numericValue33 = new C.NumericValue(); //numericValue33.Text = (10*(i+1)).ToString(); numericValue33.Text = "25"; numericPoint13.Append(numericValue33); numberingCache4.Append(numericPoint13); } /* C.NumericPoint numericPoint13 = new C.NumericPoint() { Index = (UInt32Value)0U }; C.NumericValue numericValue33 = new C.NumericValue(); numericValue33.Text = "99"; numericPoint13.Append(numericValue33); C.NumericPoint numericPoint14 = new C.NumericPoint() { Index = (UInt32Value)1U }; C.NumericValue numericValue34 = new C.NumericValue(); numericValue34.Text = "3.2"; numericPoint14.Append(numericValue34); C.NumericPoint numericPoint15 = new C.NumericPoint() { Index = (UInt32Value)2U }; C.NumericValue numericValue35 = new C.NumericValue(); numericValue35.Text = "1.4"; numericPoint15.Append(numericValue35); C.NumericPoint numericPoint16 = new C.NumericPoint() { Index = (UInt32Value)3U }; C.NumericValue numericValue36 = new C.NumericValue(); numericValue36.Text = "1.2"; numericPoint16.Append(numericValue36); numberingCache4.Append(formatCode4); numberingCache4.Append(pointCount12); numberingCache4.Append(numericPoint13); numberingCache4.Append(numericPoint14); numberingCache4.Append(numericPoint15); numberingCache4.Append(numericPoint16); */ numberReference4.Append(formula12); numberReference4.Append(numberingCache4); values4.Append(numberReference4); pieChartSeries1.Append(index4); pieChartSeries1.Append(order4); pieChartSeries1.Append(seriesText4); pieChartSeries1.Append(categoryAxisData4); pieChartSeries1.Append(values4); C.DataLabels dataLabels2 = new C.DataLabels(); C.ShowLegendKey showLegendKey2 = new C.ShowLegendKey() { Val = false }; C.ShowValue showValue2 = new C.ShowValue() { Val = false }; C.ShowCategoryName showCategoryName2 = new C.ShowCategoryName() { Val = false }; C.ShowSeriesName showSeriesName2 = new C.ShowSeriesName() { Val = false }; C.ShowPercent showPercent2 = new C.ShowPercent() { Val = false }; C.ShowBubbleSize showBubbleSize2 = new C.ShowBubbleSize() { Val = false }; C.ShowLeaderLines showLeaderLines1 = new C.ShowLeaderLines() { Val = true }; dataLabels2.Append(showLegendKey2); dataLabels2.Append(showValue2); dataLabels2.Append(showCategoryName2); dataLabels2.Append(showSeriesName2); dataLabels2.Append(showPercent2); dataLabels2.Append(showBubbleSize2); dataLabels2.Append(showLeaderLines1); C.FirstSliceAngle firstSliceAngle1 = new C.FirstSliceAngle() { Val = (UInt16Value)0U }; pieChart1.Append(varyColors2); pieChart1.Append(pieChartSeries1); pieChart1.Append(dataLabels2); pieChart1.Append(firstSliceAngle1); plotArea2.Append(layout2); plotArea2.Append(pieChart1); C.Legend legend2 = new C.Legend(); C.LegendPosition legendPosition2 = new C.LegendPosition() { Val = C.LegendPositionValues.Right }; C.Overlay overlay3 = new C.Overlay() { Val = false }; legend2.Append(legendPosition2); legend2.Append(overlay3); C.PlotVisibleOnly plotVisibleOnly2 = new C.PlotVisibleOnly() { Val = true }; C.DisplayBlanksAs displayBlanksAs2 = new C.DisplayBlanksAs() { Val = C.DisplayBlanksAsValues.Gap }; C.ShowDataLabelsOverMaximum showDataLabelsOverMaximum2 = new C.ShowDataLabelsOverMaximum() { Val = false }; chart2.Append(title1); chart2.Append(autoTitleDeleted2); chart2.Append(plotArea2); chart2.Append(legend2); chart2.Append(plotVisibleOnly2); chart2.Append(displayBlanksAs2); chart2.Append(showDataLabelsOverMaximum2); C.ExternalData externalData2 = new C.ExternalData() { Id = "rId1" }; C.AutoUpdate autoUpdate2 = new C.AutoUpdate() { Val = false }; externalData2.Append(autoUpdate2); chartSpace2.Append(date19042); chartSpace2.Append(editingLanguage2); chartSpace2.Append(roundedCorners2); chartSpace2.Append(alternateContent2); chartSpace2.Append(chart2); chartSpace2.Append(externalData2); chartPart2.ChartSpace = chartSpace2; }
private static void UpdateEmbeddedWorkbook(ChartPart chartPart, ChartData chartData) { XDocument cpXDoc = chartPart.GetXDocument(); XElement root = cpXDoc.Root; var firstSeries = root.Descendants(C.ser).FirstOrDefault(); if (firstSeries == null) return; var firstFormula = (string)firstSeries.Descendants(C.f).FirstOrDefault(); if (firstFormula == null) return; var sheet = firstFormula.Split('!')[0]; var embeddedSpreadsheetRid = (string)root.Descendants(C.externalData).Attributes(R.id).FirstOrDefault(); if (embeddedSpreadsheetRid == null) return; var embeddedSpreadsheet = chartPart.GetPartById(embeddedSpreadsheetRid); if (embeddedSpreadsheet != null) { using (SpreadsheetDocument sDoc = SpreadsheetDocument.Open(embeddedSpreadsheet.GetStream(), true)) { var workbookPart = sDoc.WorkbookPart; var wbRoot = workbookPart.GetXDocument().Root; var sheetRid = (string)wbRoot .Elements(S.sheets) .Elements(S.sheet) .Where(s => (string)s.Attribute("name") == sheet) .Attributes(R.id) .FirstOrDefault(); if (sheetRid != null) { var sheetPart = workbookPart.GetPartById(sheetRid); var xdSheet = sheetPart.GetXDocument(); var sheetData = xdSheet.Descendants(S.sheetData).FirstOrDefault(); var stylePart = workbookPart.WorkbookStylesPart; var xdStyle = stylePart.GetXDocument(); int categoryStyleId = 0; if (chartData.CategoryFormatCode != 0) categoryStyleId = AddDxfToDxfs(xdSheet, xdStyle, chartData.CategoryFormatCode); stylePart.PutXDocument(); var firstRow = new XElement(S.row, new XAttribute("r", "1"), new XAttribute("spans", string.Format("1:{0}", chartData.SeriesNames.Length + 1)), new [] { new XElement(S.c, new XAttribute("r", "A1"), new XAttribute("t", "str"), new XElement(S.v, new XAttribute(XNamespace.Xml + "space", "preserve"), " "))} .Concat( chartData.SeriesNames .Select((sn, i) => new XElement(S.c, new XAttribute("r", RowColToString(0, i + 1)), new XAttribute("t", "str"), new XElement(S.v, sn))))); var otherRows = chartData .CategoryNames .Select((cn, r) => { var row = new XElement(S.row, new XAttribute("r", r + 2), new XAttribute("spans", string.Format("1:{0}", chartData.SeriesNames.Length + 1)), new[] { new XElement(S.c, new XAttribute("r", RowColToString(r + 1, 0)), categoryStyleId != 0 ? new XAttribute("s", categoryStyleId) : null, chartData.CategoryDataType == ChartDataType.String ? new XAttribute("t", "str") : null, new XElement(S.v, cn)) }.Concat( Enumerable.Range(0, chartData.Values.Length) .Select((c, ci) => { var cell = new XElement(S.c, new XAttribute("r", RowColToString(r + 1, ci + 1)), new XElement(S.v, chartData.Values[ci][r])); return cell; }))); return row; }); var allRows = new[] { firstRow }.Concat(otherRows); var newSheetData = new XElement(S.sheetData, allRows); sheetData.ReplaceWith(newSheetData); sheetPart.PutXDocument(); var tablePartRid = (string)xdSheet .Root .Elements(S.tableParts) .Elements(S.tablePart) .Attributes(R.id) .FirstOrDefault(); if (tablePartRid != null) { var partTable = sheetPart.GetPartById(tablePartRid); var xdTablePart = partTable.GetXDocument(); var xaRef = xdTablePart.Root.Attribute("ref"); xaRef.Value = string.Format("A1:{0}", RowColToString(chartData.CategoryNames.Length - 1, chartData.SeriesNames.Length)); var xeNewTableColumns = new XElement(S.tableColumns, new XAttribute("count", chartData.SeriesNames.Count() + 1), new[] { new XElement(S.tableColumn, new XAttribute("id", 1), new XAttribute("name", " ")) }.Concat( chartData.SeriesNames.Select((cn, ci) => new XElement(S.tableColumn, new XAttribute("id", ci + 2), new XAttribute("name", cn))))); var xeExistingTableColumns = xdTablePart.Root.Element(S.tableColumns); if (xeExistingTableColumns != null) xeExistingTableColumns.ReplaceWith(xeNewTableColumns); partTable.PutXDocument(); } } } } }
/// <summary> /// Given a chartPart, which has fixed data range from the template /// This method corrects the XML so the chart covers the correct range of data /// </summary> /// <param name="chartPart">Chartpart to be fixed</param> /// <param name="totalRowCount">Total number of dataRows of the data</param> /// <param name="totalColCount">Total nu</param> private void fixChartData(ChartPart chartPart, int totalRowCount, int totalColCount) { //Get the appropriate chart part from template file. //ChartPart chartPart = workbookPart.ChartsheetParts.First().DrawingsPart.ChartParts.First(); //Change the ranges to accomodate the newly inserted data. if (chartPart != null) { //the following code changes the range of columns in the chart foreach ( Formula formula in chartPart.ChartSpace.Descendants<Formula>()) { if (formula.Text.Contains("$D")) { formula.Text = formula.Text.Replace("$D", "$" + getColumnName( totalColCount)); } } //the following code changes the range of rows in the chart //(by adding BarChartSeries element for additional rows filled with correct data) BarChart barChart = chartPart.ChartSpace.Descendants<BarChart>() .FirstOrDefault(); List<BarChartSeries> descendants = chartPart.ChartSpace.Descendants<BarChartSeries>().ToList(); int numOfInitBarChartSeries = descendants.Count; BarChartSeries refChild = descendants.Last(); for (int i = 1; i <= totalRowCount - numOfInitBarChartSeries; i++) { BarChartSeries barChartSeriesTemplate = descendants.FirstOrDefault(); if (barChartSeriesTemplate != null) { var barChartSeriesToBeAdded = barChartSeriesTemplate.CloneNode(true) as BarChartSeries; foreach ( Formula formula in barChartSeriesToBeAdded .Descendants <Formula>() ) { if ( formula.Text.Contains("$" + Constants.DATA_START_ROW .ToString())) { formula.Text = formula.Text.Replace( "$" + Constants.DATA_START_ROW.ToString(), "$" + (numOfInitBarChartSeries + i + Constants.REPORT_HEADER_ROW) .ToString ()); } } //saves the correct order/index value for the current BarChartSeries barChartSeriesToBeAdded.Index.Val = UInt32Value.FromUInt32((uint) i + 1); barChartSeriesToBeAdded.Order.Val = UInt32Value.FromUInt32((uint) i + 1); barChart.InsertAfter(barChartSeriesToBeAdded, refChild); refChild = barChartSeriesToBeAdded; } } if (totalRowCount == 1) { barChart.RemoveChild(descendants[1]); } chartPart.ChartSpace.Save(); } }
/// <summary> /// Create an instance of OpenXmlPart according to the given relationship type. /// </summary> /// <param name="openXmlPackage">The container OpenXmlPackage.</param> /// <param name="relationshipType">The relationship type of the target part.</param> /// <param name="openXmlPart">The created instance of OpenXmlPart.</param> /// <remarks>This partial method will be generated by code generaotr.</remarks> static partial void CreatePartCore(OpenXmlPackage openXmlPackage, string relationshipType, ref OpenXmlPart openXmlPart) { if (openXmlPackage == null) { throw new ArgumentNullException("openXmlPackage"); } if (relationshipType == null) { throw new ArgumentNullException("relationshipType"); } if (openXmlPackage is WordprocessingDocument) { switch (relationshipType) { case MainDocumentPart.RelationshipTypeConstant: openXmlPart = new MainDocumentPart(); return; case CustomXmlPart.RelationshipTypeConstant: openXmlPart = new CustomXmlPart(); return; case CustomXmlPropertiesPart.RelationshipTypeConstant: openXmlPart = new CustomXmlPropertiesPart(); return; case GlossaryDocumentPart.RelationshipTypeConstant: openXmlPart = new GlossaryDocumentPart(); return; case WordprocessingCommentsPart.RelationshipTypeConstant: openXmlPart = new WordprocessingCommentsPart(); return; case AlternativeFormatImportPart.RelationshipTypeConstant: openXmlPart = new AlternativeFormatImportPart(); return; case ChartPart.RelationshipTypeConstant: openXmlPart = new ChartPart(); return; case ChartDrawingPart.RelationshipTypeConstant: openXmlPart = new ChartDrawingPart(); return; case ImagePart.RelationshipTypeConstant: openXmlPart = new ImagePart(); return; case EmbeddedPackagePart.RelationshipTypeConstant: openXmlPart = new EmbeddedPackagePart(); return; case ThemeOverridePart.RelationshipTypeConstant: openXmlPart = new ThemeOverridePart(); return; case ChartStylePart.RelationshipTypeConstant: openXmlPart = new ChartStylePart(); return; case ChartColorStylePart.RelationshipTypeConstant: openXmlPart = new ChartColorStylePart(); return; case DiagramColorsPart.RelationshipTypeConstant: openXmlPart = new DiagramColorsPart(); return; case DiagramDataPart.RelationshipTypeConstant: openXmlPart = new DiagramDataPart(); return; case SlidePart.RelationshipTypeConstant: openXmlPart = new SlidePart(); return; case DiagramPersistLayoutPart.RelationshipTypeConstant: openXmlPart = new DiagramPersistLayoutPart(); return; case DiagramLayoutDefinitionPart.RelationshipTypeConstant: openXmlPart = new DiagramLayoutDefinitionPart(); return; case DiagramStylePart.RelationshipTypeConstant: openXmlPart = new DiagramStylePart(); return; case EmbeddedObjectPart.RelationshipTypeConstant: openXmlPart = new EmbeddedObjectPart(); return; case VmlDrawingPart.RelationshipTypeConstant: openXmlPart = new VmlDrawingPart(); return; case LegacyDiagramTextPart.RelationshipTypeConstant: openXmlPart = new LegacyDiagramTextPart(); return; case EmbeddedControlPersistenceBinaryDataPart.RelationshipTypeConstant: openXmlPart = new EmbeddedControlPersistenceBinaryDataPart(); return; case NotesSlidePart.RelationshipTypeConstant: openXmlPart = new NotesSlidePart(); return; case NotesMasterPart.RelationshipTypeConstant: openXmlPart = new NotesMasterPart(); return; case ThemePart.RelationshipTypeConstant: openXmlPart = new ThemePart(); return; case UserDefinedTagsPart.RelationshipTypeConstant: openXmlPart = new UserDefinedTagsPart(); return; case SlideLayoutPart.RelationshipTypeConstant: openXmlPart = new SlideLayoutPart(); return; case SlideMasterPart.RelationshipTypeConstant: openXmlPart = new SlideMasterPart(); return; case EmbeddedControlPersistencePart.RelationshipTypeConstant: openXmlPart = new EmbeddedControlPersistencePart(); return; case SlideSyncDataPart.RelationshipTypeConstant: openXmlPart = new SlideSyncDataPart(); return; case WorksheetPart.RelationshipTypeConstant: openXmlPart = new WorksheetPart(); return; case DrawingsPart.RelationshipTypeConstant: openXmlPart = new DrawingsPart(); return; case WebExtensionPart.RelationshipTypeConstant: openXmlPart = new WebExtensionPart(); return; case PivotTablePart.RelationshipTypeConstant: openXmlPart = new PivotTablePart(); return; case PivotTableCacheDefinitionPart.RelationshipTypeConstant: openXmlPart = new PivotTableCacheDefinitionPart(); return; case PivotTableCacheRecordsPart.RelationshipTypeConstant: openXmlPart = new PivotTableCacheRecordsPart(); return; case SingleCellTablePart.RelationshipTypeConstant: openXmlPart = new SingleCellTablePart(); return; case TableDefinitionPart.RelationshipTypeConstant: openXmlPart = new TableDefinitionPart(); return; case QueryTablePart.RelationshipTypeConstant: openXmlPart = new QueryTablePart(); return; case ControlPropertiesPart.RelationshipTypeConstant: openXmlPart = new ControlPropertiesPart(); return; case CustomPropertyPart.RelationshipTypeConstant: openXmlPart = new CustomPropertyPart(); return; case WorksheetSortMapPart.RelationshipTypeConstant: openXmlPart = new WorksheetSortMapPart(); return; case SlicersPart.RelationshipTypeConstant: openXmlPart = new SlicersPart(); return; case TimeLinePart.RelationshipTypeConstant: openXmlPart = new TimeLinePart(); return; case DocumentSettingsPart.RelationshipTypeConstant: openXmlPart = new DocumentSettingsPart(); return; case MailMergeRecipientDataPart.RelationshipTypeConstant: openXmlPart = new MailMergeRecipientDataPart(); return; case EndnotesPart.RelationshipTypeConstant: openXmlPart = new EndnotesPart(); return; case FontTablePart.RelationshipTypeConstant: openXmlPart = new FontTablePart(); return; case FontPart.RelationshipTypeConstant: openXmlPart = new FontPart(); return; case FootnotesPart.RelationshipTypeConstant: openXmlPart = new FootnotesPart(); return; case NumberingDefinitionsPart.RelationshipTypeConstant: openXmlPart = new NumberingDefinitionsPart(); return; case StyleDefinitionsPart.RelationshipTypeConstant: openXmlPart = new StyleDefinitionsPart(); return; case StylesWithEffectsPart.RelationshipTypeConstant: openXmlPart = new StylesWithEffectsPart(); return; case WebSettingsPart.RelationshipTypeConstant: openXmlPart = new WebSettingsPart(); return; case FooterPart.RelationshipTypeConstant: openXmlPart = new FooterPart(); return; case HeaderPart.RelationshipTypeConstant: openXmlPart = new HeaderPart(); return; case WordprocessingPrinterSettingsPart.RelationshipTypeConstant: openXmlPart = new WordprocessingPrinterSettingsPart(); return; case CustomizationPart.RelationshipTypeConstant: openXmlPart = new CustomizationPart(); return; case WordAttachedToolbarsPart.RelationshipTypeConstant: openXmlPart = new WordAttachedToolbarsPart(); return; case VbaProjectPart.RelationshipTypeConstant: openXmlPart = new VbaProjectPart(); return; case VbaDataPart.RelationshipTypeConstant: openXmlPart = new VbaDataPart(); return; case WordprocessingCommentsExPart.RelationshipTypeConstant: openXmlPart = new WordprocessingCommentsExPart(); return; case WordprocessingPeoplePart.RelationshipTypeConstant: openXmlPart = new WordprocessingPeoplePart(); return; case ThumbnailPart.RelationshipTypeConstant: openXmlPart = new ThumbnailPart(); return; case CoreFilePropertiesPart.RelationshipTypeConstant: openXmlPart = new CoreFilePropertiesPart(); return; case ExtendedFilePropertiesPart.RelationshipTypeConstant: openXmlPart = new ExtendedFilePropertiesPart(); return; case CustomFilePropertiesPart.RelationshipTypeConstant: openXmlPart = new CustomFilePropertiesPart(); return; case DigitalSignatureOriginPart.RelationshipTypeConstant: openXmlPart = new DigitalSignatureOriginPart(); return; case XmlSignaturePart.RelationshipTypeConstant: openXmlPart = new XmlSignaturePart(); return; case QuickAccessToolbarCustomizationsPart.RelationshipTypeConstant: openXmlPart = new QuickAccessToolbarCustomizationsPart(); return; case RibbonExtensibilityPart.RelationshipTypeConstant: openXmlPart = new RibbonExtensibilityPart(); return; case RibbonAndBackstageCustomizationsPart.RelationshipTypeConstant: openXmlPart = new RibbonAndBackstageCustomizationsPart(); return; case WebExTaskpanesPart.RelationshipTypeConstant: openXmlPart = new WebExTaskpanesPart(); return; } } else if (openXmlPackage is SpreadsheetDocument) { switch (relationshipType) { case WorkbookPart.RelationshipTypeConstant: openXmlPart = new WorkbookPart(); return; case CustomXmlPart.RelationshipTypeConstant: openXmlPart = new CustomXmlPart(); return; case CustomXmlPropertiesPart.RelationshipTypeConstant: openXmlPart = new CustomXmlPropertiesPart(); return; case CalculationChainPart.RelationshipTypeConstant: openXmlPart = new CalculationChainPart(); return; case CellMetadataPart.RelationshipTypeConstant: openXmlPart = new CellMetadataPart(); return; case ConnectionsPart.RelationshipTypeConstant: openXmlPart = new ConnectionsPart(); return; case CustomXmlMappingsPart.RelationshipTypeConstant: openXmlPart = new CustomXmlMappingsPart(); return; case SharedStringTablePart.RelationshipTypeConstant: openXmlPart = new SharedStringTablePart(); return; case WorkbookRevisionHeaderPart.RelationshipTypeConstant: openXmlPart = new WorkbookRevisionHeaderPart(); return; case WorkbookRevisionLogPart.RelationshipTypeConstant: openXmlPart = new WorkbookRevisionLogPart(); return; case WorkbookUserDataPart.RelationshipTypeConstant: openXmlPart = new WorkbookUserDataPart(); return; case WorkbookStylesPart.RelationshipTypeConstant: openXmlPart = new WorkbookStylesPart(); return; case ThemePart.RelationshipTypeConstant: openXmlPart = new ThemePart(); return; case ImagePart.RelationshipTypeConstant: openXmlPart = new ImagePart(); return; case ThumbnailPart.RelationshipTypeConstant: openXmlPart = new ThumbnailPart(); return; case VolatileDependenciesPart.RelationshipTypeConstant: openXmlPart = new VolatileDependenciesPart(); return; case ChartsheetPart.RelationshipTypeConstant: openXmlPart = new ChartsheetPart(); return; case SpreadsheetPrinterSettingsPart.RelationshipTypeConstant: openXmlPart = new SpreadsheetPrinterSettingsPart(); return; case DrawingsPart.RelationshipTypeConstant: openXmlPart = new DrawingsPart(); return; case ChartPart.RelationshipTypeConstant: openXmlPart = new ChartPart(); return; case ChartDrawingPart.RelationshipTypeConstant: openXmlPart = new ChartDrawingPart(); return; case EmbeddedPackagePart.RelationshipTypeConstant: openXmlPart = new EmbeddedPackagePart(); return; case ThemeOverridePart.RelationshipTypeConstant: openXmlPart = new ThemeOverridePart(); return; case ChartStylePart.RelationshipTypeConstant: openXmlPart = new ChartStylePart(); return; case ChartColorStylePart.RelationshipTypeConstant: openXmlPart = new ChartColorStylePart(); return; case DiagramColorsPart.RelationshipTypeConstant: openXmlPart = new DiagramColorsPart(); return; case DiagramDataPart.RelationshipTypeConstant: openXmlPart = new DiagramDataPart(); return; case SlidePart.RelationshipTypeConstant: openXmlPart = new SlidePart(); return; case DiagramPersistLayoutPart.RelationshipTypeConstant: openXmlPart = new DiagramPersistLayoutPart(); return; case DiagramLayoutDefinitionPart.RelationshipTypeConstant: openXmlPart = new DiagramLayoutDefinitionPart(); return; case DiagramStylePart.RelationshipTypeConstant: openXmlPart = new DiagramStylePart(); return; case EmbeddedObjectPart.RelationshipTypeConstant: openXmlPart = new EmbeddedObjectPart(); return; case VmlDrawingPart.RelationshipTypeConstant: openXmlPart = new VmlDrawingPart(); return; case LegacyDiagramTextPart.RelationshipTypeConstant: openXmlPart = new LegacyDiagramTextPart(); return; case EmbeddedControlPersistenceBinaryDataPart.RelationshipTypeConstant: openXmlPart = new EmbeddedControlPersistenceBinaryDataPart(); return; case NotesSlidePart.RelationshipTypeConstant: openXmlPart = new NotesSlidePart(); return; case NotesMasterPart.RelationshipTypeConstant: openXmlPart = new NotesMasterPart(); return; case UserDefinedTagsPart.RelationshipTypeConstant: openXmlPart = new UserDefinedTagsPart(); return; case SlideLayoutPart.RelationshipTypeConstant: openXmlPart = new SlideLayoutPart(); return; case SlideMasterPart.RelationshipTypeConstant: openXmlPart = new SlideMasterPart(); return; case EmbeddedControlPersistencePart.RelationshipTypeConstant: openXmlPart = new EmbeddedControlPersistencePart(); return; case SlideSyncDataPart.RelationshipTypeConstant: openXmlPart = new SlideSyncDataPart(); return; case WorksheetPart.RelationshipTypeConstant: openXmlPart = new WorksheetPart(); return; case WorksheetCommentsPart.RelationshipTypeConstant: openXmlPart = new WorksheetCommentsPart(); return; case PivotTablePart.RelationshipTypeConstant: openXmlPart = new PivotTablePart(); return; case PivotTableCacheDefinitionPart.RelationshipTypeConstant: openXmlPart = new PivotTableCacheDefinitionPart(); return; case PivotTableCacheRecordsPart.RelationshipTypeConstant: openXmlPart = new PivotTableCacheRecordsPart(); return; case SingleCellTablePart.RelationshipTypeConstant: openXmlPart = new SingleCellTablePart(); return; case TableDefinitionPart.RelationshipTypeConstant: openXmlPart = new TableDefinitionPart(); return; case QueryTablePart.RelationshipTypeConstant: openXmlPart = new QueryTablePart(); return; case ControlPropertiesPart.RelationshipTypeConstant: openXmlPart = new ControlPropertiesPart(); return; case CustomPropertyPart.RelationshipTypeConstant: openXmlPart = new CustomPropertyPart(); return; case WorksheetSortMapPart.RelationshipTypeConstant: openXmlPart = new WorksheetSortMapPart(); return; case SlicersPart.RelationshipTypeConstant: openXmlPart = new SlicersPart(); return; case TimeLinePart.RelationshipTypeConstant: openXmlPart = new TimeLinePart(); return; case WebExtensionPart.RelationshipTypeConstant: openXmlPart = new WebExtensionPart(); return; case DialogsheetPart.RelationshipTypeConstant: openXmlPart = new DialogsheetPart(); return; case ExternalWorkbookPart.RelationshipTypeConstant: openXmlPart = new ExternalWorkbookPart(); return; case ExcelAttachedToolbarsPart.RelationshipTypeConstant: openXmlPart = new ExcelAttachedToolbarsPart(); return; case VbaProjectPart.RelationshipTypeConstant: openXmlPart = new VbaProjectPart(); return; case VbaDataPart.RelationshipTypeConstant: openXmlPart = new VbaDataPart(); return; case MacroSheetPart.RelationshipTypeConstant: openXmlPart = new MacroSheetPart(); return; case InternationalMacroSheetPart.RelationshipTypeConstant: openXmlPart = new InternationalMacroSheetPart(); return; case CustomDataPropertiesPart.RelationshipTypeConstant: openXmlPart = new CustomDataPropertiesPart(); return; case CustomDataPart.RelationshipTypeConstant: openXmlPart = new CustomDataPart(); return; case SlicerCachePart.RelationshipTypeConstant: openXmlPart = new SlicerCachePart(); return; case TimeLineCachePart.RelationshipTypeConstant: openXmlPart = new TimeLineCachePart(); return; case CoreFilePropertiesPart.RelationshipTypeConstant: openXmlPart = new CoreFilePropertiesPart(); return; case ExtendedFilePropertiesPart.RelationshipTypeConstant: openXmlPart = new ExtendedFilePropertiesPart(); return; case CustomFilePropertiesPart.RelationshipTypeConstant: openXmlPart = new CustomFilePropertiesPart(); return; case DigitalSignatureOriginPart.RelationshipTypeConstant: openXmlPart = new DigitalSignatureOriginPart(); return; case XmlSignaturePart.RelationshipTypeConstant: openXmlPart = new XmlSignaturePart(); return; case QuickAccessToolbarCustomizationsPart.RelationshipTypeConstant: openXmlPart = new QuickAccessToolbarCustomizationsPart(); return; case RibbonExtensibilityPart.RelationshipTypeConstant: openXmlPart = new RibbonExtensibilityPart(); return; case RibbonAndBackstageCustomizationsPart.RelationshipTypeConstant: openXmlPart = new RibbonAndBackstageCustomizationsPart(); return; case WebExTaskpanesPart.RelationshipTypeConstant: openXmlPart = new WebExTaskpanesPart(); return; } } else if (openXmlPackage is PresentationDocument) { switch (relationshipType) { case PresentationPart.RelationshipTypeConstant: openXmlPart = new PresentationPart(); return; case CustomXmlPart.RelationshipTypeConstant: openXmlPart = new CustomXmlPart(); return; case CustomXmlPropertiesPart.RelationshipTypeConstant: openXmlPart = new CustomXmlPropertiesPart(); return; case FontPart.RelationshipTypeConstant: openXmlPart = new FontPart(); return; case PresentationPropertiesPart.RelationshipTypeConstant: openXmlPart = new PresentationPropertiesPart(); return; case TableStylesPart.RelationshipTypeConstant: openXmlPart = new TableStylesPart(); return; case ThemePart.RelationshipTypeConstant: openXmlPart = new ThemePart(); return; case ImagePart.RelationshipTypeConstant: openXmlPart = new ImagePart(); return; case ViewPropertiesPart.RelationshipTypeConstant: openXmlPart = new ViewPropertiesPart(); return; case SlidePart.RelationshipTypeConstant: openXmlPart = new SlidePart(); return; case ChartPart.RelationshipTypeConstant: openXmlPart = new ChartPart(); return; case ChartDrawingPart.RelationshipTypeConstant: openXmlPart = new ChartDrawingPart(); return; case EmbeddedPackagePart.RelationshipTypeConstant: openXmlPart = new EmbeddedPackagePart(); return; case ThemeOverridePart.RelationshipTypeConstant: openXmlPart = new ThemeOverridePart(); return; case ChartStylePart.RelationshipTypeConstant: openXmlPart = new ChartStylePart(); return; case ChartColorStylePart.RelationshipTypeConstant: openXmlPart = new ChartColorStylePart(); return; case DiagramColorsPart.RelationshipTypeConstant: openXmlPart = new DiagramColorsPart(); return; case DiagramDataPart.RelationshipTypeConstant: openXmlPart = new DiagramDataPart(); return; case WorksheetPart.RelationshipTypeConstant: openXmlPart = new WorksheetPart(); return; case DrawingsPart.RelationshipTypeConstant: openXmlPart = new DrawingsPart(); return; case DiagramPersistLayoutPart.RelationshipTypeConstant: openXmlPart = new DiagramPersistLayoutPart(); return; case DiagramLayoutDefinitionPart.RelationshipTypeConstant: openXmlPart = new DiagramLayoutDefinitionPart(); return; case DiagramStylePart.RelationshipTypeConstant: openXmlPart = new DiagramStylePart(); return; case WebExtensionPart.RelationshipTypeConstant: openXmlPart = new WebExtensionPart(); return; case VmlDrawingPart.RelationshipTypeConstant: openXmlPart = new VmlDrawingPart(); return; case LegacyDiagramTextPart.RelationshipTypeConstant: openXmlPart = new LegacyDiagramTextPart(); return; case PivotTablePart.RelationshipTypeConstant: openXmlPart = new PivotTablePart(); return; case PivotTableCacheDefinitionPart.RelationshipTypeConstant: openXmlPart = new PivotTableCacheDefinitionPart(); return; case PivotTableCacheRecordsPart.RelationshipTypeConstant: openXmlPart = new PivotTableCacheRecordsPart(); return; case SingleCellTablePart.RelationshipTypeConstant: openXmlPart = new SingleCellTablePart(); return; case TableDefinitionPart.RelationshipTypeConstant: openXmlPart = new TableDefinitionPart(); return; case QueryTablePart.RelationshipTypeConstant: openXmlPart = new QueryTablePart(); return; case EmbeddedControlPersistencePart.RelationshipTypeConstant: openXmlPart = new EmbeddedControlPersistencePart(); return; case EmbeddedControlPersistenceBinaryDataPart.RelationshipTypeConstant: openXmlPart = new EmbeddedControlPersistenceBinaryDataPart(); return; case ControlPropertiesPart.RelationshipTypeConstant: openXmlPart = new ControlPropertiesPart(); return; case EmbeddedObjectPart.RelationshipTypeConstant: openXmlPart = new EmbeddedObjectPart(); return; case CustomPropertyPart.RelationshipTypeConstant: openXmlPart = new CustomPropertyPart(); return; case WorksheetSortMapPart.RelationshipTypeConstant: openXmlPart = new WorksheetSortMapPart(); return; case SlicersPart.RelationshipTypeConstant: openXmlPart = new SlicersPart(); return; case TimeLinePart.RelationshipTypeConstant: openXmlPart = new TimeLinePart(); return; case SlideCommentsPart.RelationshipTypeConstant: openXmlPart = new SlideCommentsPart(); return; case NotesSlidePart.RelationshipTypeConstant: openXmlPart = new NotesSlidePart(); return; case NotesMasterPart.RelationshipTypeConstant: openXmlPart = new NotesMasterPart(); return; case UserDefinedTagsPart.RelationshipTypeConstant: openXmlPart = new UserDefinedTagsPart(); return; case SlideLayoutPart.RelationshipTypeConstant: openXmlPart = new SlideLayoutPart(); return; case SlideMasterPart.RelationshipTypeConstant: openXmlPart = new SlideMasterPart(); return; case SlideSyncDataPart.RelationshipTypeConstant: openXmlPart = new SlideSyncDataPart(); return; case CommentAuthorsPart.RelationshipTypeConstant: openXmlPart = new CommentAuthorsPart(); return; case HandoutMasterPart.RelationshipTypeConstant: openXmlPart = new HandoutMasterPart(); return; case LegacyDiagramTextInfoPart.RelationshipTypeConstant: openXmlPart = new LegacyDiagramTextInfoPart(); return; case VbaProjectPart.RelationshipTypeConstant: openXmlPart = new VbaProjectPart(); return; case VbaDataPart.RelationshipTypeConstant: openXmlPart = new VbaDataPart(); return; case CoreFilePropertiesPart.RelationshipTypeConstant: openXmlPart = new CoreFilePropertiesPart(); return; case ExtendedFilePropertiesPart.RelationshipTypeConstant: openXmlPart = new ExtendedFilePropertiesPart(); return; case CustomFilePropertiesPart.RelationshipTypeConstant: openXmlPart = new CustomFilePropertiesPart(); return; case ThumbnailPart.RelationshipTypeConstant: openXmlPart = new ThumbnailPart(); return; case DigitalSignatureOriginPart.RelationshipTypeConstant: openXmlPart = new DigitalSignatureOriginPart(); return; case XmlSignaturePart.RelationshipTypeConstant: openXmlPart = new XmlSignaturePart(); return; case QuickAccessToolbarCustomizationsPart.RelationshipTypeConstant: openXmlPart = new QuickAccessToolbarCustomizationsPart(); return; case RibbonExtensibilityPart.RelationshipTypeConstant: openXmlPart = new RibbonExtensibilityPart(); return; case RibbonAndBackstageCustomizationsPart.RelationshipTypeConstant: openXmlPart = new RibbonAndBackstageCustomizationsPart(); return; case WebExTaskpanesPart.RelationshipTypeConstant: openXmlPart = new WebExTaskpanesPart(); return; } } else { System.Diagnostics.Debug.Assert(false); } return; }
public void AddEmbeddedToChartPart(ChartPart part) { EmbeddedPackagePart embeddedPackagePart1 = part.AddNewPart<EmbeddedPackagePart>("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", ExternalDataId); BinaryStream.Position = 0; embeddedPackagePart1.FeedData(BinaryStream); BinaryStream.Close(); }
private static void CopyChartObjects(ChartPart oldChart, ChartPart newChart) { foreach (XElement dataReference in newChart.GetXDocument().Descendants(C.externalData)) { string relId = dataReference.Attribute(R.id).Value; try { EmbeddedPackagePart oldPart = (EmbeddedPackagePart)oldChart.GetPartById(relId); EmbeddedPackagePart newPart = newChart.AddEmbeddedPackagePart(oldPart.ContentType); using (Stream oldObject = oldPart.GetStream(FileMode.Open, FileAccess.Read)) using (Stream newObject = newPart.GetStream(FileMode.Create, FileAccess.ReadWrite)) { int byteCount; byte[] buffer = new byte[65536]; while ((byteCount = oldObject.Read(buffer, 0, 65536)) != 0) newObject.Write(buffer, 0, byteCount); } dataReference.Attribute(R.id).Value = newChart.GetIdOfPart(newPart); } catch (ArgumentOutOfRangeException) { ExternalRelationship oldRelationship = oldChart.GetExternalRelationship(relId); Guid g = Guid.NewGuid(); string newRid = "R" + g.ToString().Replace("-", ""); var oldRel = oldChart.ExternalRelationships.FirstOrDefault(h => h.Id == relId); if (oldRel == null) throw new DocumentBuilderInternalException("Internal Error 0007"); newChart.AddExternalRelationship(oldRel.RelationshipType, oldRel.Uri, newRid); dataReference.Attribute(R.id).Value = newRid; } } }
// Generates content of chartPart2. private void GenerateChartPart2Content(ChartPart chartPart2) { C.ChartSpace chartSpace2 = new C.ChartSpace(); chartSpace2.AddNamespaceDeclaration("c", "http://schemas.openxmlformats.org/drawingml/2006/chart"); chartSpace2.AddNamespaceDeclaration("a", "http://schemas.openxmlformats.org/drawingml/2006/main"); chartSpace2.AddNamespaceDeclaration("r", "http://schemas.openxmlformats.org/officeDocument/2006/relationships"); C.Date1904 date19042 = new C.Date1904(){ Val = false }; C.EditingLanguage editingLanguage2 = new C.EditingLanguage(){ Val = "en-US" }; C.RoundedCorners roundedCorners2 = new C.RoundedCorners(){ Val = false }; AlternateContent alternateContent5 = new AlternateContent(); alternateContent5.AddNamespaceDeclaration("mc", "http://schemas.openxmlformats.org/markup-compatibility/2006"); AlternateContentChoice alternateContentChoice5 = new AlternateContentChoice(){ Requires = "c14" }; alternateContentChoice5.AddNamespaceDeclaration("c14", "http://schemas.microsoft.com/office/drawing/2007/8/2/chart"); C14.Style style3 = new C14.Style(){ Val = 101 }; alternateContentChoice5.Append(style3); AlternateContentFallback alternateContentFallback4 = new AlternateContentFallback(); C.Style style4 = new C.Style(){ Val = 1 }; alternateContentFallback4.Append(style4); alternateContent5.Append(alternateContentChoice5); alternateContent5.Append(alternateContentFallback4); C.PivotSource pivotSource2 = new C.PivotSource(); C.PivotTableName pivotTableName2 = new C.PivotTableName(); pivotTableName2.Text = "[GeneratedDocument.xlsx]ShowTimeLevel!PivotTable1"; C.FormatId formatId2 = new C.FormatId(){ Val = (UInt32Value)13U }; pivotSource2.Append(pivotTableName2); pivotSource2.Append(formatId2); C.Chart chart2 = new C.Chart(); C.Title title2 = new C.Title(); C.Overlay overlay3 = new C.Overlay(){ Val = false }; title2.Append(overlay3); C.AutoTitleDeleted autoTitleDeleted2 = new C.AutoTitleDeleted(){ Val = false }; C.PivotFormats pivotFormats2 = new C.PivotFormats(); C.PivotFormat pivotFormat6 = new C.PivotFormat(); C.Index index7 = new C.Index(){ Val = (UInt32Value)0U }; C.ShapeProperties shapeProperties3 = new C.ShapeProperties(); A.SolidFill solidFill5 = new A.SolidFill(); A.SchemeColor schemeColor1 = new A.SchemeColor(){ Val = A.SchemeColorValues.Accent1 }; A.Tint tint1 = new A.Tint(){ Val = 100000 }; schemeColor1.Append(tint1); solidFill5.Append(schemeColor1); A.Outline outline3 = new A.Outline(); A.NoFill noFill1 = new A.NoFill(); outline3.Append(noFill1); A.EffectList effectList1 = new A.EffectList(); shapeProperties3.Append(solidFill5); shapeProperties3.Append(outline3); shapeProperties3.Append(effectList1); C.Marker marker6 = new C.Marker(); C.Symbol symbol6 = new C.Symbol(){ Val = C.MarkerStyleValues.None }; marker6.Append(symbol6); pivotFormat6.Append(index7); pivotFormat6.Append(shapeProperties3); pivotFormat6.Append(marker6); C.PivotFormat pivotFormat7 = new C.PivotFormat(); C.Index index8 = new C.Index(){ Val = (UInt32Value)1U }; C.ShapeProperties shapeProperties4 = new C.ShapeProperties(); A.SolidFill solidFill6 = new A.SolidFill(); A.SchemeColor schemeColor2 = new A.SchemeColor(){ Val = A.SchemeColorValues.Accent2 }; A.Tint tint2 = new A.Tint(){ Val = 100000 }; schemeColor2.Append(tint2); solidFill6.Append(schemeColor2); A.Outline outline4 = new A.Outline(); A.NoFill noFill2 = new A.NoFill(); outline4.Append(noFill2); A.EffectList effectList2 = new A.EffectList(); shapeProperties4.Append(solidFill6); shapeProperties4.Append(outline4); shapeProperties4.Append(effectList2); C.Marker marker7 = new C.Marker(); C.Symbol symbol7 = new C.Symbol(){ Val = C.MarkerStyleValues.None }; marker7.Append(symbol7); pivotFormat7.Append(index8); pivotFormat7.Append(shapeProperties4); pivotFormat7.Append(marker7); C.PivotFormat pivotFormat8 = new C.PivotFormat(); C.Index index9 = new C.Index(){ Val = (UInt32Value)2U }; C.Marker marker8 = new C.Marker(); C.Symbol symbol8 = new C.Symbol(){ Val = C.MarkerStyleValues.None }; marker8.Append(symbol8); pivotFormat8.Append(index9); pivotFormat8.Append(marker8); C.PivotFormat pivotFormat9 = new C.PivotFormat(); C.Index index10 = new C.Index(){ Val = (UInt32Value)3U }; C.Marker marker9 = new C.Marker(); C.Symbol symbol9 = new C.Symbol(){ Val = C.MarkerStyleValues.None }; marker9.Append(symbol9); pivotFormat9.Append(index10); pivotFormat9.Append(marker9); C.PivotFormat pivotFormat10 = new C.PivotFormat(); C.Index index11 = new C.Index(){ Val = (UInt32Value)4U }; C.Marker marker10 = new C.Marker(); C.Symbol symbol10 = new C.Symbol(){ Val = C.MarkerStyleValues.None }; marker10.Append(symbol10); pivotFormat10.Append(index11); pivotFormat10.Append(marker10); C.PivotFormat pivotFormat11 = new C.PivotFormat(); C.Index index12 = new C.Index(){ Val = (UInt32Value)5U }; C.Marker marker11 = new C.Marker(); C.Symbol symbol11 = new C.Symbol(){ Val = C.MarkerStyleValues.None }; marker11.Append(symbol11); pivotFormat11.Append(index12); pivotFormat11.Append(marker11); C.PivotFormat pivotFormat12 = new C.PivotFormat(); C.Index index13 = new C.Index(){ Val = (UInt32Value)6U }; C.Marker marker12 = new C.Marker(); C.Symbol symbol12 = new C.Symbol(){ Val = C.MarkerStyleValues.None }; marker12.Append(symbol12); pivotFormat12.Append(index13); pivotFormat12.Append(marker12); C.PivotFormat pivotFormat13 = new C.PivotFormat(); C.Index index14 = new C.Index(){ Val = (UInt32Value)7U }; C.Marker marker13 = new C.Marker(); C.Symbol symbol13 = new C.Symbol(){ Val = C.MarkerStyleValues.None }; marker13.Append(symbol13); pivotFormat13.Append(index14); pivotFormat13.Append(marker13); C.PivotFormat pivotFormat14 = new C.PivotFormat(); C.Index index15 = new C.Index(){ Val = (UInt32Value)8U }; C.Marker marker14 = new C.Marker(); C.Symbol symbol14 = new C.Symbol(){ Val = C.MarkerStyleValues.None }; marker14.Append(symbol14); pivotFormat14.Append(index15); pivotFormat14.Append(marker14); C.PivotFormat pivotFormat15 = new C.PivotFormat(); C.Index index16 = new C.Index(){ Val = (UInt32Value)9U }; C.Marker marker15 = new C.Marker(); C.Symbol symbol15 = new C.Symbol(){ Val = C.MarkerStyleValues.None }; marker15.Append(symbol15); pivotFormat15.Append(index16); pivotFormat15.Append(marker15); C.PivotFormat pivotFormat16 = new C.PivotFormat(); C.Index index17 = new C.Index(){ Val = (UInt32Value)10U }; C.Marker marker16 = new C.Marker(); C.Symbol symbol16 = new C.Symbol(){ Val = C.MarkerStyleValues.None }; marker16.Append(symbol16); pivotFormat16.Append(index17); pivotFormat16.Append(marker16); C.PivotFormat pivotFormat17 = new C.PivotFormat(); C.Index index18 = new C.Index(){ Val = (UInt32Value)11U }; C.Marker marker17 = new C.Marker(); C.Symbol symbol17 = new C.Symbol(){ Val = C.MarkerStyleValues.None }; marker17.Append(symbol17); pivotFormat17.Append(index18); pivotFormat17.Append(marker17); C.PivotFormat pivotFormat18 = new C.PivotFormat(); C.Index index19 = new C.Index(){ Val = (UInt32Value)12U }; C.Marker marker18 = new C.Marker(); C.Symbol symbol18 = new C.Symbol(){ Val = C.MarkerStyleValues.None }; marker18.Append(symbol18); pivotFormat18.Append(index19); pivotFormat18.Append(marker18); C.PivotFormat pivotFormat19 = new C.PivotFormat(); C.Index index20 = new C.Index(){ Val = (UInt32Value)13U }; C.Marker marker19 = new C.Marker(); C.Symbol symbol19 = new C.Symbol(){ Val = C.MarkerStyleValues.None }; marker19.Append(symbol19); pivotFormat19.Append(index20); pivotFormat19.Append(marker19); C.PivotFormat pivotFormat20 = new C.PivotFormat(); C.Index index21 = new C.Index(){ Val = (UInt32Value)14U }; C.ShapeProperties shapeProperties5 = new C.ShapeProperties(); A.SolidFill solidFill7 = new A.SolidFill(); A.SchemeColor schemeColor3 = new A.SchemeColor(){ Val = A.SchemeColorValues.Accent1 }; A.Tint tint3 = new A.Tint(){ Val = 100000 }; schemeColor3.Append(tint3); solidFill7.Append(schemeColor3); A.Outline outline5 = new A.Outline(); A.NoFill noFill3 = new A.NoFill(); outline5.Append(noFill3); A.EffectList effectList3 = new A.EffectList(); shapeProperties5.Append(solidFill7); shapeProperties5.Append(outline5); shapeProperties5.Append(effectList3); C.Marker marker20 = new C.Marker(); C.Symbol symbol20 = new C.Symbol(){ Val = C.MarkerStyleValues.None }; marker20.Append(symbol20); pivotFormat20.Append(index21); pivotFormat20.Append(shapeProperties5); pivotFormat20.Append(marker20); C.PivotFormat pivotFormat21 = new C.PivotFormat(); C.Index index22 = new C.Index(){ Val = (UInt32Value)15U }; C.ShapeProperties shapeProperties6 = new C.ShapeProperties(); A.SolidFill solidFill8 = new A.SolidFill(); A.SchemeColor schemeColor4 = new A.SchemeColor(){ Val = A.SchemeColorValues.Accent1 }; A.Tint tint4 = new A.Tint(){ Val = 100000 }; schemeColor4.Append(tint4); solidFill8.Append(schemeColor4); A.Outline outline6 = new A.Outline(); A.NoFill noFill4 = new A.NoFill(); outline6.Append(noFill4); A.EffectList effectList4 = new A.EffectList(); shapeProperties6.Append(solidFill8); shapeProperties6.Append(outline6); shapeProperties6.Append(effectList4); C.Marker marker21 = new C.Marker(); C.Symbol symbol21 = new C.Symbol(){ Val = C.MarkerStyleValues.None }; marker21.Append(symbol21); pivotFormat21.Append(index22); pivotFormat21.Append(shapeProperties6); pivotFormat21.Append(marker21); C.PivotFormat pivotFormat22 = new C.PivotFormat(); C.Index index23 = new C.Index(){ Val = (UInt32Value)16U }; C.ShapeProperties shapeProperties7 = new C.ShapeProperties(); A.SolidFill solidFill9 = new A.SolidFill(); A.SchemeColor schemeColor5 = new A.SchemeColor(){ Val = A.SchemeColorValues.Accent1 }; A.Tint tint5 = new A.Tint(){ Val = 100000 }; schemeColor5.Append(tint5); solidFill9.Append(schemeColor5); A.Outline outline7 = new A.Outline(); A.NoFill noFill5 = new A.NoFill(); outline7.Append(noFill5); A.EffectList effectList5 = new A.EffectList(); shapeProperties7.Append(solidFill9); shapeProperties7.Append(outline7); shapeProperties7.Append(effectList5); C.Marker marker22 = new C.Marker(); C.Symbol symbol22 = new C.Symbol(){ Val = C.MarkerStyleValues.None }; marker22.Append(symbol22); pivotFormat22.Append(index23); pivotFormat22.Append(shapeProperties7); pivotFormat22.Append(marker22); C.PivotFormat pivotFormat23 = new C.PivotFormat(); C.Index index24 = new C.Index(){ Val = (UInt32Value)17U }; C.ShapeProperties shapeProperties8 = new C.ShapeProperties(); A.SolidFill solidFill10 = new A.SolidFill(); A.SchemeColor schemeColor6 = new A.SchemeColor(){ Val = A.SchemeColorValues.Accent1 }; A.Tint tint6 = new A.Tint(){ Val = 100000 }; schemeColor6.Append(tint6); solidFill10.Append(schemeColor6); A.Outline outline8 = new A.Outline(); A.NoFill noFill6 = new A.NoFill(); outline8.Append(noFill6); A.EffectList effectList6 = new A.EffectList(); shapeProperties8.Append(solidFill10); shapeProperties8.Append(outline8); shapeProperties8.Append(effectList6); C.Marker marker23 = new C.Marker(); C.Symbol symbol23 = new C.Symbol(){ Val = C.MarkerStyleValues.None }; marker23.Append(symbol23); pivotFormat23.Append(index24); pivotFormat23.Append(shapeProperties8); pivotFormat23.Append(marker23); pivotFormats2.Append(pivotFormat6); pivotFormats2.Append(pivotFormat7); pivotFormats2.Append(pivotFormat8); pivotFormats2.Append(pivotFormat9); pivotFormats2.Append(pivotFormat10); pivotFormats2.Append(pivotFormat11); pivotFormats2.Append(pivotFormat12); pivotFormats2.Append(pivotFormat13); pivotFormats2.Append(pivotFormat14); pivotFormats2.Append(pivotFormat15); pivotFormats2.Append(pivotFormat16); pivotFormats2.Append(pivotFormat17); pivotFormats2.Append(pivotFormat18); pivotFormats2.Append(pivotFormat19); pivotFormats2.Append(pivotFormat20); pivotFormats2.Append(pivotFormat21); pivotFormats2.Append(pivotFormat22); pivotFormats2.Append(pivotFormat23); C.PlotArea plotArea2 = new C.PlotArea(); C.Layout layout2 = new C.Layout(); C.BarChart barChart1 = new C.BarChart(); C.BarDirection barDirection1 = new C.BarDirection(){ Val = C.BarDirectionValues.Column }; C.BarGrouping barGrouping1 = new C.BarGrouping(){ Val = C.BarGroupingValues.Clustered }; C.VaryColors varyColors2 = new C.VaryColors(){ Val = false }; C.BarChartSeries barChartSeries1 = new C.BarChartSeries(); C.Index index25 = new C.Index(){ Val = (UInt32Value)0U }; C.Order order2 = new C.Order(){ Val = (UInt32Value)0U }; C.SeriesText seriesText2 = new C.SeriesText(); C.StringReference stringReference3 = new C.StringReference(); C.Formula formula4 = new C.Formula(); formula4.Text = "ShowTimeLevel!$B$1"; C.StringCache stringCache3 = new C.StringCache(); C.PointCount pointCount4 = new C.PointCount(){ Val = (UInt32Value)1U }; C.StringPoint stringPoint5 = new C.StringPoint(){ Index = (UInt32Value)0U }; C.NumericValue numericValue8 = new C.NumericValue(); numericValue8.Text = "Total"; stringPoint5.Append(numericValue8); stringCache3.Append(pointCount4); stringCache3.Append(stringPoint5); stringReference3.Append(formula4); stringReference3.Append(stringCache3); seriesText2.Append(stringReference3); C.ChartShapeProperties chartShapeProperties1 = new C.ChartShapeProperties(); A.SolidFill solidFill11 = new A.SolidFill(); A.SchemeColor schemeColor7 = new A.SchemeColor(){ Val = A.SchemeColorValues.Accent1 }; A.Tint tint7 = new A.Tint(){ Val = 100000 }; schemeColor7.Append(tint7); solidFill11.Append(schemeColor7); A.Outline outline9 = new A.Outline(); A.NoFill noFill7 = new A.NoFill(); outline9.Append(noFill7); A.EffectList effectList7 = new A.EffectList(); chartShapeProperties1.Append(solidFill11); chartShapeProperties1.Append(outline9); chartShapeProperties1.Append(effectList7); C.InvertIfNegative invertIfNegative1 = new C.InvertIfNegative(){ Val = false }; C.CategoryAxisData categoryAxisData2 = new C.CategoryAxisData(); C.StringReference stringReference4 = new C.StringReference(); C.Formula formula5 = new C.Formula(); formula5.Text = "ShowTimeLevel!$A$2:$A$5"; C.StringCache stringCache4 = new C.StringCache(); C.PointCount pointCount5 = new C.PointCount(){ Val = (UInt32Value)3U }; C.StringPoint stringPoint6 = new C.StringPoint(){ Index = (UInt32Value)0U }; C.NumericValue numericValue9 = new C.NumericValue(); numericValue9.Text = "product_A"; stringPoint6.Append(numericValue9); C.StringPoint stringPoint7 = new C.StringPoint(){ Index = (UInt32Value)1U }; C.NumericValue numericValue10 = new C.NumericValue(); numericValue10.Text = "product_D"; stringPoint7.Append(numericValue10); C.StringPoint stringPoint8 = new C.StringPoint(){ Index = (UInt32Value)2U }; C.NumericValue numericValue11 = new C.NumericValue(); numericValue11.Text = "product_E"; stringPoint8.Append(numericValue11); stringCache4.Append(pointCount5); stringCache4.Append(stringPoint6); stringCache4.Append(stringPoint7); stringCache4.Append(stringPoint8); stringReference4.Append(formula5); stringReference4.Append(stringCache4); categoryAxisData2.Append(stringReference4); C.Values values2 = new C.Values(); C.NumberReference numberReference2 = new C.NumberReference(); C.Formula formula6 = new C.Formula(); formula6.Text = "ShowTimeLevel!$B$2:$B$5"; C.NumberingCache numberingCache2 = new C.NumberingCache(); C.FormatCode formatCode2 = new C.FormatCode(); formatCode2.Text = "General"; C.PointCount pointCount6 = new C.PointCount(){ Val = (UInt32Value)3U }; C.NumericPoint numericPoint4 = new C.NumericPoint(){ Index = (UInt32Value)0U }; C.NumericValue numericValue12 = new C.NumericValue(); numericValue12.Text = "19"; numericPoint4.Append(numericValue12); C.NumericPoint numericPoint5 = new C.NumericPoint(){ Index = (UInt32Value)1U }; C.NumericValue numericValue13 = new C.NumericValue(); numericValue13.Text = "13"; numericPoint5.Append(numericValue13); C.NumericPoint numericPoint6 = new C.NumericPoint(){ Index = (UInt32Value)2U }; C.NumericValue numericValue14 = new C.NumericValue(); numericValue14.Text = "33"; numericPoint6.Append(numericValue14); numberingCache2.Append(formatCode2); numberingCache2.Append(pointCount6); numberingCache2.Append(numericPoint4); numberingCache2.Append(numericPoint5); numberingCache2.Append(numericPoint6); numberReference2.Append(formula6); numberReference2.Append(numberingCache2); values2.Append(numberReference2); barChartSeries1.Append(index25); barChartSeries1.Append(order2); barChartSeries1.Append(seriesText2); barChartSeries1.Append(chartShapeProperties1); barChartSeries1.Append(invertIfNegative1); barChartSeries1.Append(categoryAxisData2); barChartSeries1.Append(values2); C.DataLabels dataLabels2 = new C.DataLabels(); C.ShowLegendKey showLegendKey2 = new C.ShowLegendKey(){ Val = false }; C.ShowValue showValue2 = new C.ShowValue(){ Val = false }; C.ShowCategoryName showCategoryName2 = new C.ShowCategoryName(){ Val = false }; C.ShowSeriesName showSeriesName2 = new C.ShowSeriesName(){ Val = false }; C.ShowPercent showPercent2 = new C.ShowPercent(){ Val = false }; C.ShowBubbleSize showBubbleSize2 = new C.ShowBubbleSize(){ Val = false }; dataLabels2.Append(showLegendKey2); dataLabels2.Append(showValue2); dataLabels2.Append(showCategoryName2); dataLabels2.Append(showSeriesName2); dataLabels2.Append(showPercent2); dataLabels2.Append(showBubbleSize2); C.GapWidth gapWidth1 = new C.GapWidth(){ Val = (UInt16Value)219U }; C.Overlap overlap1 = new C.Overlap(){ Val = -27 }; C.AxisId axisId1 = new C.AxisId(){ Val = (UInt32Value)209981120U }; C.AxisId axisId2 = new C.AxisId(){ Val = (UInt32Value)209981512U }; barChart1.Append(barDirection1); barChart1.Append(barGrouping1); barChart1.Append(varyColors2); barChart1.Append(barChartSeries1); barChart1.Append(dataLabels2); barChart1.Append(gapWidth1); barChart1.Append(overlap1); barChart1.Append(axisId1); barChart1.Append(axisId2); C.CategoryAxis categoryAxis1 = new C.CategoryAxis(); C.AxisId axisId3 = new C.AxisId(){ Val = (UInt32Value)209981120U }; C.Scaling scaling1 = new C.Scaling(); C.Orientation orientation1 = new C.Orientation(){ Val = C.OrientationValues.MinMax }; scaling1.Append(orientation1); C.Delete delete1 = new C.Delete(){ Val = false }; C.AxisPosition axisPosition1 = new C.AxisPosition(){ Val = C.AxisPositionValues.Bottom }; C.NumberingFormat numberingFormat1 = new C.NumberingFormat(){ FormatCode = "General", SourceLinked = false }; C.MajorTickMark majorTickMark1 = new C.MajorTickMark(){ Val = C.TickMarkValues.None }; C.MinorTickMark minorTickMark1 = new C.MinorTickMark(){ Val = C.TickMarkValues.None }; C.TickLabelPosition tickLabelPosition1 = new C.TickLabelPosition(){ Val = C.TickLabelPositionValues.NextTo }; C.ChartShapeProperties chartShapeProperties2 = new C.ChartShapeProperties(); A.NoFill noFill8 = new A.NoFill(); A.Outline outline10 = new A.Outline(); A.NoFill noFill9 = new A.NoFill(); outline10.Append(noFill9); A.EffectList effectList8 = new A.EffectList(); chartShapeProperties2.Append(noFill8); chartShapeProperties2.Append(outline10); chartShapeProperties2.Append(effectList8); C.TextProperties textProperties1 = new C.TextProperties(); A.BodyProperties bodyProperties3 = new A.BodyProperties(){ Rotation = -60000000, UseParagraphSpacing = true, VerticalOverflow = A.TextVerticalOverflowValues.Ellipsis, Vertical = A.TextVerticalValues.Horizontal, Wrap = A.TextWrappingValues.Square, Anchor = A.TextAnchoringTypeValues.Center, AnchorCenter = true }; A.ListStyle listStyle3 = new A.ListStyle(); A.Paragraph paragraph3 = new A.Paragraph(); A.ParagraphProperties paragraphProperties1 = new A.ParagraphProperties(); A.DefaultRunProperties defaultRunProperties1 = new A.DefaultRunProperties(){ FontSize = 900, Kerning = 1200 }; A.SolidFill solidFill12 = new A.SolidFill(); A.SchemeColor schemeColor8 = new A.SchemeColor(){ Val = A.SchemeColorValues.Text1 }; A.LuminanceModulation luminanceModulation1 = new A.LuminanceModulation(){ Val = 65000 }; A.LuminanceOffset luminanceOffset1 = new A.LuminanceOffset(){ Val = 35000 }; schemeColor8.Append(luminanceModulation1); schemeColor8.Append(luminanceOffset1); solidFill12.Append(schemeColor8); A.LatinFont latinFont1 = new A.LatinFont(){ Typeface = "+mn-lt" }; A.EastAsianFont eastAsianFont1 = new A.EastAsianFont(){ Typeface = "+mn-ea" }; A.ComplexScriptFont complexScriptFont1 = new A.ComplexScriptFont(){ Typeface = "+mn-cs" }; defaultRunProperties1.Append(solidFill12); defaultRunProperties1.Append(latinFont1); defaultRunProperties1.Append(eastAsianFont1); defaultRunProperties1.Append(complexScriptFont1); paragraphProperties1.Append(defaultRunProperties1); A.EndParagraphRunProperties endParagraphRunProperties1 = new A.EndParagraphRunProperties(){ Language = "en-US" }; paragraph3.Append(paragraphProperties1); paragraph3.Append(endParagraphRunProperties1); textProperties1.Append(bodyProperties3); textProperties1.Append(listStyle3); textProperties1.Append(paragraph3); C.CrossingAxis crossingAxis1 = new C.CrossingAxis(){ Val = (UInt32Value)209981512U }; C.Crosses crosses1 = new C.Crosses(){ Val = C.CrossesValues.AutoZero }; C.AutoLabeled autoLabeled1 = new C.AutoLabeled(){ Val = true }; C.LabelAlignment labelAlignment1 = new C.LabelAlignment(){ Val = C.LabelAlignmentValues.Center }; C.LabelOffset labelOffset1 = new C.LabelOffset(){ Val = (UInt16Value)100U }; C.NoMultiLevelLabels noMultiLevelLabels1 = new C.NoMultiLevelLabels(){ Val = false }; categoryAxis1.Append(axisId3); categoryAxis1.Append(scaling1); categoryAxis1.Append(delete1); categoryAxis1.Append(axisPosition1); categoryAxis1.Append(numberingFormat1); categoryAxis1.Append(majorTickMark1); categoryAxis1.Append(minorTickMark1); categoryAxis1.Append(tickLabelPosition1); categoryAxis1.Append(chartShapeProperties2); categoryAxis1.Append(textProperties1); categoryAxis1.Append(crossingAxis1); categoryAxis1.Append(crosses1); categoryAxis1.Append(autoLabeled1); categoryAxis1.Append(labelAlignment1); categoryAxis1.Append(labelOffset1); categoryAxis1.Append(noMultiLevelLabels1); C.ValueAxis valueAxis1 = new C.ValueAxis(); C.AxisId axisId4 = new C.AxisId(){ Val = (UInt32Value)209981512U }; C.Scaling scaling2 = new C.Scaling(); C.Orientation orientation2 = new C.Orientation(){ Val = C.OrientationValues.MinMax }; scaling2.Append(orientation2); C.Delete delete2 = new C.Delete(){ Val = false }; C.AxisPosition axisPosition2 = new C.AxisPosition(){ Val = C.AxisPositionValues.Left }; C.MajorGridlines majorGridlines1 = new C.MajorGridlines(); C.ChartShapeProperties chartShapeProperties3 = new C.ChartShapeProperties(); A.Outline outline11 = new A.Outline(){ Width = 9525, CapType = A.LineCapValues.Flat, CompoundLineType = A.CompoundLineValues.Single, Alignment = A.PenAlignmentValues.Center }; A.SolidFill solidFill13 = new A.SolidFill(); A.SchemeColor schemeColor9 = new A.SchemeColor(){ Val = A.SchemeColorValues.Text1 }; A.LuminanceModulation luminanceModulation2 = new A.LuminanceModulation(){ Val = 15000 }; A.LuminanceOffset luminanceOffset2 = new A.LuminanceOffset(){ Val = 85000 }; schemeColor9.Append(luminanceModulation2); schemeColor9.Append(luminanceOffset2); solidFill13.Append(schemeColor9); A.Round round1 = new A.Round(); outline11.Append(solidFill13); outline11.Append(round1); A.EffectList effectList9 = new A.EffectList(); chartShapeProperties3.Append(outline11); chartShapeProperties3.Append(effectList9); majorGridlines1.Append(chartShapeProperties3); C.NumberingFormat numberingFormat2 = new C.NumberingFormat(){ FormatCode = "General", SourceLinked = true }; C.MajorTickMark majorTickMark2 = new C.MajorTickMark(){ Val = C.TickMarkValues.None }; C.MinorTickMark minorTickMark2 = new C.MinorTickMark(){ Val = C.TickMarkValues.None }; C.TickLabelPosition tickLabelPosition2 = new C.TickLabelPosition(){ Val = C.TickLabelPositionValues.NextTo }; C.ChartShapeProperties chartShapeProperties4 = new C.ChartShapeProperties(); A.NoFill noFill10 = new A.NoFill(); A.Outline outline12 = new A.Outline(); A.NoFill noFill11 = new A.NoFill(); outline12.Append(noFill11); A.EffectList effectList10 = new A.EffectList(); chartShapeProperties4.Append(noFill10); chartShapeProperties4.Append(outline12); chartShapeProperties4.Append(effectList10); C.TextProperties textProperties2 = new C.TextProperties(); A.BodyProperties bodyProperties4 = new A.BodyProperties(){ Rotation = -60000000, UseParagraphSpacing = true, VerticalOverflow = A.TextVerticalOverflowValues.Ellipsis, Vertical = A.TextVerticalValues.Horizontal, Wrap = A.TextWrappingValues.Square, Anchor = A.TextAnchoringTypeValues.Center, AnchorCenter = true }; A.ListStyle listStyle4 = new A.ListStyle(); A.Paragraph paragraph4 = new A.Paragraph(); A.ParagraphProperties paragraphProperties2 = new A.ParagraphProperties(); A.DefaultRunProperties defaultRunProperties2 = new A.DefaultRunProperties(){ FontSize = 900, Kerning = 1200 }; A.SolidFill solidFill14 = new A.SolidFill(); A.SchemeColor schemeColor10 = new A.SchemeColor(){ Val = A.SchemeColorValues.Text1 }; A.LuminanceModulation luminanceModulation3 = new A.LuminanceModulation(){ Val = 65000 }; A.LuminanceOffset luminanceOffset3 = new A.LuminanceOffset(){ Val = 35000 }; schemeColor10.Append(luminanceModulation3); schemeColor10.Append(luminanceOffset3); solidFill14.Append(schemeColor10); A.LatinFont latinFont2 = new A.LatinFont(){ Typeface = "+mn-lt" }; A.EastAsianFont eastAsianFont2 = new A.EastAsianFont(){ Typeface = "+mn-ea" }; A.ComplexScriptFont complexScriptFont2 = new A.ComplexScriptFont(){ Typeface = "+mn-cs" }; defaultRunProperties2.Append(solidFill14); defaultRunProperties2.Append(latinFont2); defaultRunProperties2.Append(eastAsianFont2); defaultRunProperties2.Append(complexScriptFont2); paragraphProperties2.Append(defaultRunProperties2); A.EndParagraphRunProperties endParagraphRunProperties2 = new A.EndParagraphRunProperties(){ Language = "en-US" }; paragraph4.Append(paragraphProperties2); paragraph4.Append(endParagraphRunProperties2); textProperties2.Append(bodyProperties4); textProperties2.Append(listStyle4); textProperties2.Append(paragraph4); C.CrossingAxis crossingAxis2 = new C.CrossingAxis(){ Val = (UInt32Value)209981120U }; C.Crosses crosses2 = new C.Crosses(){ Val = C.CrossesValues.AutoZero }; C.CrossBetween crossBetween1 = new C.CrossBetween(){ Val = C.CrossBetweenValues.Between }; valueAxis1.Append(axisId4); valueAxis1.Append(scaling2); valueAxis1.Append(delete2); valueAxis1.Append(axisPosition2); valueAxis1.Append(majorGridlines1); valueAxis1.Append(numberingFormat2); valueAxis1.Append(majorTickMark2); valueAxis1.Append(minorTickMark2); valueAxis1.Append(tickLabelPosition2); valueAxis1.Append(chartShapeProperties4); valueAxis1.Append(textProperties2); valueAxis1.Append(crossingAxis2); valueAxis1.Append(crosses2); valueAxis1.Append(crossBetween1); C.ShapeProperties shapeProperties9 = new C.ShapeProperties(); A.SolidFill solidFill15 = new A.SolidFill(); A.SchemeColor schemeColor11 = new A.SchemeColor(){ Val = A.SchemeColorValues.Background1 }; solidFill15.Append(schemeColor11); A.Outline outline13 = new A.Outline(); A.NoFill noFill12 = new A.NoFill(); outline13.Append(noFill12); A.EffectList effectList11 = new A.EffectList(); shapeProperties9.Append(solidFill15); shapeProperties9.Append(outline13); shapeProperties9.Append(effectList11); plotArea2.Append(layout2); plotArea2.Append(barChart1); plotArea2.Append(categoryAxis1); plotArea2.Append(valueAxis1); plotArea2.Append(shapeProperties9); C.Legend legend2 = new C.Legend(); C.LegendPosition legendPosition2 = new C.LegendPosition(){ Val = C.LegendPositionValues.Bottom }; C.Overlay overlay4 = new C.Overlay(){ Val = false }; C.ChartShapeProperties chartShapeProperties5 = new C.ChartShapeProperties(); A.NoFill noFill13 = new A.NoFill(); A.Outline outline14 = new A.Outline(); A.NoFill noFill14 = new A.NoFill(); outline14.Append(noFill14); A.EffectList effectList12 = new A.EffectList(); chartShapeProperties5.Append(noFill13); chartShapeProperties5.Append(outline14); chartShapeProperties5.Append(effectList12); C.TextProperties textProperties3 = new C.TextProperties(); A.BodyProperties bodyProperties5 = new A.BodyProperties(){ Rotation = 0, UseParagraphSpacing = true, VerticalOverflow = A.TextVerticalOverflowValues.Ellipsis, Vertical = A.TextVerticalValues.Horizontal, Wrap = A.TextWrappingValues.Square, Anchor = A.TextAnchoringTypeValues.Center, AnchorCenter = true }; A.ListStyle listStyle5 = new A.ListStyle(); A.Paragraph paragraph5 = new A.Paragraph(); A.ParagraphProperties paragraphProperties3 = new A.ParagraphProperties(); A.DefaultRunProperties defaultRunProperties3 = new A.DefaultRunProperties(){ FontSize = 900, Kerning = 1200 }; A.SolidFill solidFill16 = new A.SolidFill(); A.SchemeColor schemeColor12 = new A.SchemeColor(){ Val = A.SchemeColorValues.Text1 }; A.LuminanceModulation luminanceModulation4 = new A.LuminanceModulation(){ Val = 65000 }; A.LuminanceOffset luminanceOffset4 = new A.LuminanceOffset(){ Val = 35000 }; schemeColor12.Append(luminanceModulation4); schemeColor12.Append(luminanceOffset4); solidFill16.Append(schemeColor12); A.LatinFont latinFont3 = new A.LatinFont(){ Typeface = "+mn-lt" }; A.EastAsianFont eastAsianFont3 = new A.EastAsianFont(){ Typeface = "+mn-ea" }; A.ComplexScriptFont complexScriptFont3 = new A.ComplexScriptFont(){ Typeface = "+mn-cs" }; defaultRunProperties3.Append(solidFill16); defaultRunProperties3.Append(latinFont3); defaultRunProperties3.Append(eastAsianFont3); defaultRunProperties3.Append(complexScriptFont3); paragraphProperties3.Append(defaultRunProperties3); A.EndParagraphRunProperties endParagraphRunProperties3 = new A.EndParagraphRunProperties(){ Language = "en-US" }; paragraph5.Append(paragraphProperties3); paragraph5.Append(endParagraphRunProperties3); textProperties3.Append(bodyProperties5); textProperties3.Append(listStyle5); textProperties3.Append(paragraph5); legend2.Append(legendPosition2); legend2.Append(overlay4); legend2.Append(chartShapeProperties5); legend2.Append(textProperties3); C.PlotVisibleOnly plotVisibleOnly2 = new C.PlotVisibleOnly(){ Val = true }; C.DisplayBlanksAs displayBlanksAs2 = new C.DisplayBlanksAs(){ Val = C.DisplayBlanksAsValues.Gap }; C.ShowDataLabelsOverMaximum showDataLabelsOverMaximum2 = new C.ShowDataLabelsOverMaximum(){ Val = false }; chart2.Append(title2); chart2.Append(autoTitleDeleted2); chart2.Append(pivotFormats2); chart2.Append(plotArea2); chart2.Append(legend2); chart2.Append(plotVisibleOnly2); chart2.Append(displayBlanksAs2); chart2.Append(showDataLabelsOverMaximum2); C.ShapeProperties shapeProperties10 = new C.ShapeProperties(); A.SolidFill solidFill17 = new A.SolidFill(); A.SchemeColor schemeColor13 = new A.SchemeColor(){ Val = A.SchemeColorValues.Background1 }; solidFill17.Append(schemeColor13); A.Outline outline15 = new A.Outline(){ Width = 9525, CapType = A.LineCapValues.Flat, CompoundLineType = A.CompoundLineValues.Single, Alignment = A.PenAlignmentValues.Center }; A.SolidFill solidFill18 = new A.SolidFill(); A.SchemeColor schemeColor14 = new A.SchemeColor(){ Val = A.SchemeColorValues.Text1 }; A.LuminanceModulation luminanceModulation5 = new A.LuminanceModulation(){ Val = 15000 }; A.LuminanceOffset luminanceOffset5 = new A.LuminanceOffset(){ Val = 85000 }; schemeColor14.Append(luminanceModulation5); schemeColor14.Append(luminanceOffset5); solidFill18.Append(schemeColor14); A.Round round2 = new A.Round(); outline15.Append(solidFill18); outline15.Append(round2); A.EffectList effectList13 = new A.EffectList(); shapeProperties10.Append(solidFill17); shapeProperties10.Append(outline15); shapeProperties10.Append(effectList13); C.TextProperties textProperties4 = new C.TextProperties(); A.BodyProperties bodyProperties6 = new A.BodyProperties(); A.ListStyle listStyle6 = new A.ListStyle(); A.Paragraph paragraph6 = new A.Paragraph(); A.ParagraphProperties paragraphProperties4 = new A.ParagraphProperties(); A.DefaultRunProperties defaultRunProperties4 = new A.DefaultRunProperties(); paragraphProperties4.Append(defaultRunProperties4); A.EndParagraphRunProperties endParagraphRunProperties4 = new A.EndParagraphRunProperties(){ Language = "en-US" }; paragraph6.Append(paragraphProperties4); paragraph6.Append(endParagraphRunProperties4); textProperties4.Append(bodyProperties6); textProperties4.Append(listStyle6); textProperties4.Append(paragraph6); C.PrintSettings printSettings2 = new C.PrintSettings(); C.HeaderFooter headerFooter2 = new C.HeaderFooter(); C.PageMargins pageMargins3 = new C.PageMargins(){ Left = 0.7D, Right = 0.7D, Top = 0.75D, Bottom = 0.75D, Header = 0.3D, Footer = 0.3D }; C.PageSetup pageSetup2 = new C.PageSetup(); printSettings2.Append(headerFooter2); printSettings2.Append(pageMargins3); printSettings2.Append(pageSetup2); C.ChartSpaceExtensionList chartSpaceExtensionList2 = new C.ChartSpaceExtensionList(); chartSpaceExtensionList2.AddNamespaceDeclaration("c14", "http://schemas.microsoft.com/office/drawing/2007/8/2/chart"); chartSpaceExtensionList2.AddNamespaceDeclaration("mc", "http://schemas.openxmlformats.org/markup-compatibility/2006"); C.ChartSpaceExtension chartSpaceExtension2 = new C.ChartSpaceExtension(){ Uri = "{781A3756-C4B2-4CAC-9D66-4F8BD8637D16}" }; chartSpaceExtension2.AddNamespaceDeclaration("c14", "http://schemas.microsoft.com/office/drawing/2007/8/2/chart"); C14.PivotOptions pivotOptions2 = new C14.PivotOptions(); C14.DropZoneFilter dropZoneFilter2 = new C14.DropZoneFilter(){ Val = true }; C14.DropZoneCategories dropZoneCategories2 = new C14.DropZoneCategories(){ Val = true }; C14.DropZoneData dropZoneData2 = new C14.DropZoneData(){ Val = true }; C14.DropZoneSeries dropZoneSeries2 = new C14.DropZoneSeries(){ Val = true }; C14.DropZonesVisible dropZonesVisible2 = new C14.DropZonesVisible(){ Val = true }; pivotOptions2.Append(dropZoneFilter2); pivotOptions2.Append(dropZoneCategories2); pivotOptions2.Append(dropZoneData2); pivotOptions2.Append(dropZoneSeries2); pivotOptions2.Append(dropZonesVisible2); chartSpaceExtension2.Append(pivotOptions2); chartSpaceExtensionList2.Append(chartSpaceExtension2); chartSpace2.Append(date19042); chartSpace2.Append(editingLanguage2); chartSpace2.Append(roundedCorners2); chartSpace2.Append(alternateContent5); chartSpace2.Append(pivotSource2); chartSpace2.Append(chart2); chartSpace2.Append(shapeProperties10); chartSpace2.Append(textProperties4); chartSpace2.Append(printSettings2); chartSpace2.Append(chartSpaceExtensionList2); chartPart2.ChartSpace = chartSpace2; }