Free cookie consent management tool by TermsFeed Policy Generator

source: trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.EPPlus/4.0.3/EPPlus-4.0.3/Drawing/Chart/ExcelChartSurface.cs @ 12074

Last change on this file since 12074 was 12074, checked in by sraggl, 9 years ago

#2341: Added EPPlus-4.0.3 to ExtLibs

File size: 3.5 KB
Line 
1/*******************************************************************************
2 * You may amend and distribute as you like, but don't remove this header!
3 *
4 * EPPlus provides server-side generation of Excel 2007/2010 spreadsheets.
5 * See http://www.codeplex.com/EPPlus for details.
6 *
7 * Copyright (C) 2011  Jan Källman
8 *
9 * This library is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Lesser General Public
11 * License as published by the Free Software Foundation; either
12 * version 2.1 of the License, or (at your option) any later version.
13
14 * This library is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 
17 * See the GNU Lesser General Public License for more details.
18 *
19 * The GNU Lesser General Public License can be viewed at http://www.opensource.org/licenses/lgpl-license.php
20 * If you unfamiliar with this license or have questions about it, here is an http://www.gnu.org/licenses/gpl-faq.html
21 *
22 * All code and executables are provided "as is" with no warranty either express or implied.
23 * The author accepts no liability for any damage or loss of business that this product may cause.
24 *
25 * Code change notes:
26 *
27 * Author             Change            Date
28 *******************************************************************************
29 * Jan Källman    Added   2009-12-30
30 * Jan Källman    License changed GPL-->LGPL 2011-12-16
31 *******************************************************************************/
32using System;
33using System.Collections.Generic;
34using System.Text;
35using System.Xml;
36using OfficeOpenXml.Style;
37
38namespace OfficeOpenXml.Drawing.Chart
39{
40    /// <summary>
41    /// Chart surface settings
42    /// </summary>
43    public class ExcelChartSurface : XmlHelper
44    {
45        internal ExcelChartSurface(XmlNamespaceManager ns, XmlNode node)
46           : base(ns,node)
47       {
48           SchemaNodeOrder = new string[] { "thickness", "spPr", "pictureOptions" };
49       }
50       #region "Public properties"
51        const string THICKNESS_PATH = "c:thickness/@val";
52       /// <summary>
53       /// Show the values
54       /// </summary>
55        public int Thickness
56       {
57           get
58           {
59               return GetXmlNodeInt(THICKNESS_PATH);
60           }
61           set
62           {
63               if(value < 0 && value > 9)
64               {
65                   throw (new ArgumentOutOfRangeException("Thickness out of range. (0-9)"));
66               }
67               SetXmlNodeString(THICKNESS_PATH, value.ToString());
68           }
69       }
70       ExcelDrawingFill _fill = null;
71       /// <summary>
72       /// Access fill properties
73       /// </summary>
74       public ExcelDrawingFill Fill
75       {
76           get
77           {
78               if (_fill == null)
79               {
80                   _fill = new ExcelDrawingFill(NameSpaceManager, TopNode, "c:spPr");
81               }
82               return _fill;
83           }
84       }
85       ExcelDrawingBorder _border = null;
86       /// <summary>
87       /// Access border properties
88       /// </summary>
89       public ExcelDrawingBorder Border
90       {
91           get
92           {
93               if (_border == null)
94               {
95                   _border = new ExcelDrawingBorder(NameSpaceManager, TopNode, "c:spPr/a:ln");
96               }
97               return _border;
98           }
99       }
100       #endregion
101    }
102}
Note: See TracBrowser for help on using the repository browser.