/// <summary> /// Adds a <c>txPr</c> node (Text properties) to the node of type <c>valAx</c> (Value Axis), <c>catAx</c> (Category Axis Data), <c>dateAx</c> (Date Axis), <c>serAx</c> (Series Axis) specified. Not supported in <c>EPPlus</c> library. /// </summary> /// <param name="node">Node of type <c>valAx</c> (Value Axis), <c>catAx</c> (Category Axis Data), <c>dateAx</c> (Date Axis), <c>serAx</c> (Series Axis).</param> /// <param name="model">Axis from model.</param> /// <param name="documentHelper">Target xml document helper.</param> /// <remarks> /// For more information please see <a href="http://www.schemacentral.com/sc/ooxml/e-draw-chart_txPr-1.html">http://www.schemacentral.com/sc/ooxml/e-draw-chart_txPr-1.html</a> /// </remarks> private static void AddTextPropertiesNode(this XmlNode node, XlsxChartAxisDefinitionLabels model, IXmlHelper documentHelper) { var textPropertiesNode = documentHelper.CreateOrDefaultAndAppendElementToNode(node, "c", "txPr"); textPropertiesNode.AddBodyPropertiesNode(model.Orientation, documentHelper); textPropertiesNode.AddTextListStylesNode(documentHelper); textPropertiesNode.AddTextParagraphsNode(model.Font, documentHelper); }
/// <summary> /// Adds label properties (orientation, alignment, color and font) to the specified axis. Not supported in <b>EPPlus</b> library. /// </summary> /// <param name="axis"><b>Xml</b> node than represent an axis definition.</param> /// <param name="model">Axis from model.</param> /// <param name="documentHelper">Target xml document helper.</param> /// <exception cref="ArgumentNullException">If <paramref name="axis" /> is <b>null</b>.</exception> /// <exception cref="ArgumentNullException">If <paramref name="model" /> is <b>null</b>.</exception> /// <exception cref="InvalidOperationException">If <paramref name="axis" /> is not an axis.</exception> public static void AddAxisLabelProperties(this XmlNode axis, XlsxChartAxisDefinitionLabels model, IXmlHelper documentHelper) { SentinelHelper.ArgumentNull(axis, nameof(axis)); SentinelHelper.ArgumentNull(model, nameof(model)); SentinelHelper.IsFalse(axis.Name.Contains("catAx") || axis.Name.Contains("valAx") || axis.Name.Contains("dateAx"), "Imposible extraer tipo. el nodo no es de tipo eje"); axis.AddTextPropertiesNode(model, documentHelper); }