Chart.cs 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Text;
  4. namespace HTEXLib
  5. {
  6. public class Chart : Item
  7. {
  8. public List<CommonChart> charts { get; set; }
  9. public Shape title { get; set; }
  10. public Fill fill { get; set; } = new Fill() { type = -1 };
  11. public Border border { get; set; } = new Border();
  12. }
  13. public abstract class CommonChart {
  14. /// <summary>
  15. /// bar col line pie area scatter radar plotAreaRegion stock surface
  16. /// </summary>
  17. public string chartType { get; set; }
  18. public List<Dictionary<string, object>> datas {get;set;}
  19. }
  20. /// <summary>
  21. /// surface3DChart
  22. /// 三维曲面图 wireframe=0
  23. /// 三维线框曲面图 wireframe=1
  24. /// surfaceChart
  25. /// 曲面图 wireframe=0
  26. /// 曲面图-俯视框架图 wireframe=1
  27. /// </summary>
  28. public class SurfaceChart : CommonChart
  29. {
  30. public string surfaceType { get; set; }
  31. public bool is3D { get; set; }
  32. }
  33. /// <summary>
  34. /// stockChart
  35. /// 股价图
  36. /// 盘高-盘低-收盘
  37. /// 开盘-盘高-盘低-收盘
  38. /// 成交量-盘高-盘低-收盘
  39. /// 成交量-开盘-盘高-盘低-收盘
  40. /// </summary>
  41. public class StockChart : CommonChart
  42. {
  43. public string stockType { get; set; }
  44. }
  45. /// <summary>
  46. /// plotAreaRegion
  47. /// 旭日图 sunburst
  48. /// 树状图 treemap
  49. /// 直方图 排列图 clusteredColumn
  50. /// 箱型图 boxWhisker
  51. /// 瀑布图 waterfall
  52. /// </summary>
  53. public class PlotAreaChart : CommonChart
  54. {
  55. public string plotAreaType { get;set;}
  56. }
  57. /// <summary>
  58. /// type radar
  59. /// radarChart
  60. /// 雷达图
  61. /// 带数据标记的雷达图<c:radarStyle val="marker"/>
  62. /// 填充雷达图 <c:radarStyle val="filled"/>
  63. /// </summary>
  64. public class RadarChart : CommonChart
  65. {
  66. public string radarType { get; set; }
  67. }
  68. /// <summary>
  69. /// type scatter
  70. /// scatterChart
  71. /// 散点图 <c:scatterStyle val="lineMarker"/>
  72. /// 带直线的散点图 <c:scatterStyle val="lineMarker"/>
  73. /// 带直线和数据标记的散点图 <c:scatterStyle val="lineMarker"/>
  74. ///
  75. /// 带平滑线和数据标记的散点图 <c:scatterStyle val="smoothMarker"/>
  76. /// 带平滑线的散点图<c:scatterStyle val="smoothMarker"/>
  77. /// bubbleChart 气泡图 三维气泡图
  78. /// </summary>
  79. public class ScatterChart : CommonChart
  80. {
  81. public string scatterType { get; set; }
  82. // public bool Is3D { get; set; }
  83. }
  84. /// <summary>
  85. /// type area
  86. /// areaChart
  87. /// 面积图 standard
  88. /// 堆积面积图 stacked
  89. /// 百分比堆积面积图 percentStacked
  90. /// area3DChart
  91. /// 三维面积图 standard
  92. /// 三维堆积面积图 stacked
  93. /// 三维百分比堆积面积图 percentStacked
  94. /// </summary>
  95. public class AreaChart : CommonChart
  96. {
  97. public string areaType { get; set; }
  98. public bool is3D { get; set; }
  99. }
  100. /// <summary>
  101. /// type bar 条形图<c:barDir val="bar"/>
  102. /// barChart
  103. /// 簇状条形图 clustered
  104. /// 堆积条形图 stacked
  105. /// 百分比堆积条形图 percentStacked
  106. /// bar3DChart
  107. /// 三维堆积条形图 stacked
  108. /// 三维簇状条形图 clustered
  109. /// 三维百分比堆积条形图 percentStacked
  110. /// </summary>
  111. public class BarChart : CommonChart
  112. {
  113. public string barType { get; set; }
  114. public bool is3D { get; set; }
  115. }
  116. /// <summary>
  117. /// type bar 柱状图<c:barDir val="col"/>
  118. /// barChart
  119. /// 簇状柱形图 clustered
  120. /// 堆积柱形图 stacked
  121. /// 百分比堆积柱形图 percentStacked
  122. /// bar3DChart
  123. /// 三维堆积柱形图 stacked
  124. /// 三维簇状柱形图 clustered
  125. /// 三维百分比堆积柱形图 percentStacked
  126. /// 三维柱形图 standard
  127. /// </summary>
  128. public class ColChart : CommonChart
  129. {
  130. public string colType { get; set; }
  131. public bool is3D { get; set; }
  132. }
  133. /// <summary>
  134. /// type line
  135. /// lineChart
  136. /// 合并
  137. /// 折线图 standard
  138. /// 带数据标记的折线图 standard
  139. /// 合并
  140. /// 堆积折线图 stacked
  141. /// 带标记的堆积折线图 stacked <c:layout>不为空
  142. /// 合并
  143. /// 百分比堆积折线图 percentStacked
  144. /// 带数据标记的百分比堆积折线图 percentStacked
  145. /// line3DChart
  146. /// 三维折线图 standard
  147. /// </summary>
  148. public class LineChart : CommonChart
  149. {
  150. public string lineType { get; set; }
  151. public bool is3D { get; set; }
  152. }
  153. /// <summary>
  154. /// type pie
  155. /// pieChart
  156. /// 饼图 不包含
  157. /// ofPieChart
  158. /// 子母饼图 包含<c:ofPieType val="pie"/> 且val为 pie
  159. /// 复合条饼图 包含<c:ofPieType val="bar"/> 且val为 bar
  160. /// pie3DChart
  161. /// 三维饼图
  162. /// doughnutChart
  163. /// 圆环饼图
  164. /// </summary>
  165. public class PieChart : CommonChart
  166. {
  167. public string pieType { get; set; }
  168. public bool is3D { get; set; }
  169. }
  170. }