PageRenderTime 49ms CodeModel.GetById 22ms RepoModel.GetById 0ms app.codeStats 0ms

/Epi Info 7/EpiDashboard/Gadgets/ChartParametersBase.cs

#
C# | 137 lines | 109 code | 20 blank | 8 comment | 0 complexity | 3957291e158398f2e3b3327459bd7715 MD5 | raw file
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Windows.Controls;
  6. using EpiDashboard.Gadgets.Charting;
  7. using ComponentArt.Win.DataVisualization;
  8. using ComponentArt.Win.DataVisualization.Common;
  9. using ComponentArt.Win.DataVisualization.Charting;
  10. namespace EpiDashboard
  11. {
  12. public class ChartParametersBase : FrequencyParametersBase, IChartGadgetParameters
  13. {
  14. #region Constructors
  15. /// <summary>
  16. /// Default constructor
  17. /// </summary>
  18. public ChartParametersBase()
  19. : base()
  20. {
  21. UseRefValues = true;
  22. ShowGridLines = true;
  23. XAxisLabel = String.Empty;
  24. XAxisLabelType = 0;
  25. XAxisAngle = 0;
  26. ShowAnnotations = false;
  27. YAxisFormat = String.Empty;
  28. YAxisLabel = String.Empty;
  29. Y2AxisFormat = String.Empty;
  30. Y2AxisLabel = String.Empty;
  31. Y2AxisLegendTitle = String.Empty;
  32. Y2LineKind = 0;
  33. Y2LineDashStyle = 0;
  34. Y2ShowAnnotations = false;
  35. Y2LineThickness = 0;
  36. ChartTitle = String.Empty;
  37. ChartStrataTitle = String.Empty;
  38. ChartSubTitle = String.Empty;
  39. ShowLegend = false;
  40. ShowLegendBorder = false;
  41. ShowLegendVarNames = false;
  42. LegendFontSize = 12;
  43. ChartWidth = 800;
  44. ChartHeight = 500;
  45. Palette = 12;
  46. }
  47. /// <summary>
  48. /// Copy constructor
  49. /// </summary>
  50. public ChartParametersBase(ChartParametersBase parameters)
  51. : base(parameters)
  52. {
  53. UseRefValues = parameters.UseRefValues;
  54. ShowGridLines = parameters.ShowGridLines;
  55. XAxisLabel = parameters.XAxisLabel;
  56. XAxisLabelType = parameters.XAxisLabelType;
  57. XAxisAngle = parameters.XAxisAngle;
  58. YAxisFormat = parameters.YAxisFormat;
  59. YAxisLabel = parameters.YAxisLabel;
  60. Y2AxisFormat = parameters.Y2AxisFormat;
  61. Y2AxisLabel = parameters.Y2AxisLabel;
  62. Y2AxisLegendTitle = parameters.Y2AxisLegendTitle;
  63. Y2LineKind =parameters.Y2LineKind;
  64. Y2LineDashStyle = parameters.Y2LineDashStyle;
  65. Y2ShowAnnotations = parameters.Y2ShowAnnotations;
  66. Y2LineThickness = parameters.Y2LineThickness;
  67. ChartTitle = parameters.ChartTitle;
  68. ChartStrataTitle = parameters.ChartStrataTitle;
  69. ChartSubTitle = parameters.ChartSubTitle;
  70. ShowAnnotations = parameters.ShowAnnotations;
  71. ShowLegend = parameters.ShowLegend;
  72. ShowLegendBorder = parameters.ShowLegendBorder;
  73. ShowLegendVarNames = parameters.ShowLegendVarNames;
  74. LegendFontSize = parameters.LegendFontSize;
  75. ChartWidth = parameters.ChartWidth;
  76. ChartHeight = parameters.ChartHeight;
  77. Palette = parameters.Palette;
  78. }
  79. #endregion // Constructors
  80. #region Properties
  81. //IChartGadgetParameters Properties
  82. public bool UseRefValues { get; set; }
  83. public bool ShowGridLines { get; set; }
  84. public string XAxisLabel { get; set; }
  85. public double XAxisLabelFontSize { get; set; }//EI-98
  86. public double XAxisFontSize { get; set; }//EI-98
  87. public int XAxisLabelType { get; set; }
  88. public int XAxisAngle { get; set; }
  89. public string YAxisFormat { get; set; }
  90. public string YAxisLabel { get; set; }
  91. public double YAxisLabelFontSize { get; set; }//EI-98
  92. public double YAxisFontSize { get; set; }//EI-98
  93. public string Y2AxisFormat { get; set; }
  94. public string Y2AxisLabel { get; set; }
  95. public string Y2AxisLegendTitle { get; set; }
  96. public LineKind Y2LineKind { get; set; }
  97. //public int Y2LineType { get; set; }
  98. public int Y2AxisType { get; set; }
  99. public LineDashStyle Y2LineDashStyle { get; set; }
  100. public bool Y2ShowAnnotations { get; set; }
  101. public double Y2LineThickness { get; set; }
  102. public string ChartTitle { get; set; }
  103. public string ChartStrataTitle { get; set; }
  104. public string ChartSubTitle { get; set; }
  105. public bool ShowAnnotations { get; set; }
  106. public bool ShowLegend { get; set; }
  107. public bool ShowLegendBorder { get; set; }
  108. public bool ShowLegendVarNames { get; set; }
  109. public double LegendFontSize { get; set; }
  110. public double ChartWidth { get; set; }
  111. public double ChartHeight { get; set; }
  112. public int Palette { get; set; }
  113. public List<string> PaletteColors { get; set; }
  114. public ComponentArt.Win.DataVisualization.Charting.Dock LegendDock { get; set; }
  115. #endregion // Properties
  116. }
  117. }