Chart.cs 5.3 KB

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