Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.

LineChart.cs 1.9KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. /*************************************************************************************
  2. DocX – DocX is the community edition of Xceed Words for .NET
  3. Copyright (C) 2009-2016 Xceed Software Inc.
  4. This program is provided to you under the terms of the Microsoft Public
  5. License (Ms-PL) as published at http://wpftoolkit.codeplex.com/license
  6. For more features and fast professional support,
  7. pick up Xceed Words for .NET at https://xceed.com/xceed-words-for-net/
  8. ***********************************************************************************/
  9. using System.Xml.Linq;
  10. namespace Xceed.Words.NET
  11. {
  12. /// <summary>
  13. /// This element contains the 2-D line chart series.
  14. /// 21.2.2.97 lineChart (Line Charts)
  15. /// </summary>
  16. public class LineChart : Chart
  17. {
  18. #region Public Properties
  19. /// <summary>
  20. /// Specifies the kind of grouping for a column, line, or area chart.
  21. /// </summary>
  22. public Grouping Grouping
  23. {
  24. get
  25. {
  26. return XElementHelpers.GetValueToEnum<Grouping>(
  27. ChartXml.Element( XName.Get( "grouping", DocX.c.NamespaceName ) ) );
  28. }
  29. set
  30. {
  31. XElementHelpers.SetValueFromEnum<Grouping>(
  32. ChartXml.Element( XName.Get( "grouping", DocX.c.NamespaceName ) ), value );
  33. }
  34. }
  35. #endregion
  36. #region Overrides
  37. protected override XElement CreateChartXml()
  38. {
  39. return XElement.Parse(
  40. @"<c:lineChart xmlns:c=""http://schemas.openxmlformats.org/drawingml/2006/chart"">
  41. <c:grouping val=""standard""/>
  42. </c:lineChart>" );
  43. }
  44. #endregion
  45. }
  46. /// <summary>
  47. /// Specifies the kind of grouping for a column, line, or area chart.
  48. /// 21.2.2.76 grouping (Grouping)
  49. /// </summary>
  50. public enum Grouping
  51. {
  52. [XmlName( "percentStacked" )]
  53. PercentStacked,
  54. [XmlName( "stacked" )]
  55. Stacked,
  56. [XmlName( "standard" )]
  57. Standard
  58. }
  59. }