internal ExcelChartPlotArea(XmlNamespaceManager ns, XmlNode node, ExcelChart firstChart) : base(ns, node) { _firstChart = firstChart; if (TopNode.SelectSingleNode("c:dTable", NameSpaceManager) != null) { _dataTable = new ExcelChartDataTable(NameSpaceManager, TopNode); } }
/// <summary> /// Creates a data table in the plotarea /// The datatable can also be accessed via the DataTable propery /// <see cref="DataTable"/> /// </summary> public ExcelChartDataTable CreateDataTable() { if (DataTable != null) { throw (new InvalidOperationException("Data table already exists")); } DataTable = new ExcelChartDataTable(_firstChart, NameSpaceManager, TopNode); return(DataTable); }
/// <summary> /// Creates a data table in the plotarea /// The datatable can also be accessed via the DataTable propery /// <see cref="DataTable"/> /// </summary> public virtual ExcelChartDataTable CreateDataTable() { if (DataTable != null) { throw (new InvalidOperationException("Data table already exists")); } DataTable = new ExcelChartDataTable(_firstChart, NameSpaceManager, TopNode); _firstChart.ApplyStyleOnPart(DataTable, _firstChart._styleManager?.Style?.DataTable); return(DataTable); }
internal ExcelChartPlotArea(XmlNamespaceManager ns, XmlNode node, ExcelChart firstChart) : base(ns, node) { AddSchemaNodeOrder(new string[] { "areaChart", "area3DChart", "lineChart", "line3DChart", "stockChart", "radarChart", "scatterChart", "pieChart", "pie3DChart", "doughnutChart", "barChart", "bar3DChart", "ofPieChart", "surfaceChart", "surface3DChart", "valAx", "catAx", "dateAx", "serAx", "dTable", "spPr" }, ExcelDrawing._schemaNodeOrderSpPr); _firstChart = firstChart; if (TopNode.SelectSingleNode("c:dTable", NameSpaceManager) != null) { DataTable = new ExcelChartDataTable(firstChart, NameSpaceManager, TopNode); } }
internal ExcelChartPlotArea(XmlNamespaceManager ns, XmlNode node, ExcelChart firstChart, string nsPrefix, ExcelChart topChart = null) : base(ns, node) { _nsPrefix = nsPrefix; if (firstChart._isChartEx) { AddSchemaNodeOrder(new string[] { "plotAreaRegion", "plotSurface", "series", "axis", "spPr" }, ExcelDrawing._schemaNodeOrderSpPr); } else { AddSchemaNodeOrder(new string[] { "areaChart", "area3DChart", "lineChart", "line3DChart", "stockChart", "radarChart", "scatterChart", "pieChart", "pie3DChart", "doughnutChart", "barChart", "bar3DChart", "ofPieChart", "surfaceChart", "surface3DChart", "valAx", "catAx", "dateAx", "serAx", "dTable", "spPr" }, ExcelDrawing._schemaNodeOrderSpPr); } _firstChart = firstChart; _topChart = topChart ?? firstChart; if (TopNode.SelectSingleNode("c:dTable", NameSpaceManager) != null) { DataTable = new ExcelChartDataTable(firstChart, NameSpaceManager, TopNode); } }
/// <summary> /// Remove the data table if it's created in the plotarea /// </summary> public void RemoveDataTable() { DeleteAllNode("c:dTable"); _dataTable = null; }