f7623d2e84dabdd9697e5ddaeb8a723d7fc09f4372031b141f2c5738f8baf61727fa4d78b5d9d740ba266cd9fab436bffa6f7373f2d16aa20c31b059707d86 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301
  1. "use strict";
  2. Object.defineProperty(exports, "__esModule", {
  3. value: true
  4. });
  5. exports.gaugeConfig = void 0;
  6. var gaugeConfig = {
  7. /**
  8. * @description Whether to display this gauge
  9. * @type {Boolean}
  10. * @default show = true
  11. */
  12. show: true,
  13. /**
  14. * @description Legend name
  15. * @type {String}
  16. * @default name = ''
  17. */
  18. name: '',
  19. /**
  20. * @description Radius of gauge
  21. * @type {String|Number}
  22. * @default radius = '60%'
  23. * @example radius = '60%' | 100
  24. */
  25. radius: '60%',
  26. /**
  27. * @description Center point of gauge
  28. * @type {Array}
  29. * @default center = ['50%','50%']
  30. * @example center = ['50%','50%'] | [100, 100]
  31. */
  32. center: ['50%', '50%'],
  33. /**
  34. * @description Gauge start angle
  35. * @type {Number}
  36. * @default startAngle = -(Math.PI / 4) * 5
  37. * @example startAngle = -Math.PI
  38. */
  39. startAngle: -(Math.PI / 4) * 5,
  40. /**
  41. * @description Gauge end angle
  42. * @type {Number}
  43. * @default endAngle = Math.PI / 4
  44. * @example endAngle = 0
  45. */
  46. endAngle: Math.PI / 4,
  47. /**
  48. * @description Gauge min value
  49. * @type {Number}
  50. * @default min = 0
  51. */
  52. min: 0,
  53. /**
  54. * @description Gauge max value
  55. * @type {Number}
  56. * @default max = 100
  57. */
  58. max: 100,
  59. /**
  60. * @description Gauge split number
  61. * @type {Number}
  62. * @default splitNum = 5
  63. */
  64. splitNum: 5,
  65. /**
  66. * @description Gauge arc line width
  67. * @type {Number}
  68. * @default arcLineWidth = 15
  69. */
  70. arcLineWidth: 15,
  71. /**
  72. * @description Gauge chart data
  73. * @type {Array}
  74. * @default data = []
  75. */
  76. data: [],
  77. /**
  78. * @description Data item arc default style configuration
  79. * @type {Object}
  80. * @default dataItemStyle = {Configuration Of Class Style}
  81. */
  82. dataItemStyle: {},
  83. /**
  84. * @description Axis tick configuration
  85. * @type {Object}
  86. */
  87. axisTick: {
  88. /**
  89. * @description Whether to display axis tick
  90. * @type {Boolean}
  91. * @default show = true
  92. */
  93. show: true,
  94. /**
  95. * @description Axis tick length
  96. * @type {Number}
  97. * @default tickLength = 6
  98. */
  99. tickLength: 6,
  100. /**
  101. * @description Axis tick default style configuration
  102. * @type {Object}
  103. * @default style = {Configuration Of Class Style}
  104. */
  105. style: {
  106. stroke: '#999',
  107. lineWidth: 1
  108. }
  109. },
  110. /**
  111. * @description Axis label configuration
  112. * @type {Object}
  113. */
  114. axisLabel: {
  115. /**
  116. * @description Whether to display axis label
  117. * @type {Boolean}
  118. * @default show = true
  119. */
  120. show: true,
  121. /**
  122. * @description Axis label data (Can be calculated automatically)
  123. * @type {Array}
  124. * @default data = [Number...]
  125. */
  126. data: [],
  127. /**
  128. * @description Axis label formatter
  129. * @type {String|Function}
  130. * @default formatter = null
  131. * @example formatter = '{value}%'
  132. * @example formatter = (labelItem) => (labelItem.value)
  133. */
  134. formatter: null,
  135. /**
  136. * @description Axis label gap between label and axis tick
  137. * @type {String|Function}
  138. * @default labelGap = 5
  139. */
  140. labelGap: 5,
  141. /**
  142. * @description Axis label default style configuration
  143. * @type {Object}
  144. * @default style = {Configuration Of Class Style}
  145. */
  146. style: {}
  147. },
  148. /**
  149. * @description Gauge pointer configuration
  150. * @type {Object}
  151. */
  152. pointer: {
  153. /**
  154. * @description Whether to display pointer
  155. * @type {Boolean}
  156. * @default show = true
  157. */
  158. show: true,
  159. /**
  160. * @description Pointer value index of data
  161. * @type {Number}
  162. * @default valueIndex = 0 (pointer.value = data[0].value)
  163. */
  164. valueIndex: 0,
  165. /**
  166. * @description Pointer default style configuration
  167. * @type {Object}
  168. * @default style = {Configuration Of Class Style}
  169. */
  170. style: {
  171. scale: [1, 1],
  172. fill: '#fb7293'
  173. }
  174. },
  175. /**
  176. * @description Data item arc detail configuration
  177. * @type {Object}
  178. */
  179. details: {
  180. /**
  181. * @description Whether to display details
  182. * @type {Boolean}
  183. * @default show = false
  184. */
  185. show: false,
  186. /**
  187. * @description Details formatter
  188. * @type {String|Function}
  189. * @default formatter = null
  190. * @example formatter = '{value}%'
  191. * @example formatter = '{name}%'
  192. * @example formatter = (dataItem) => (dataItem.value)
  193. */
  194. formatter: null,
  195. /**
  196. * @description Details position offset
  197. * @type {Array}
  198. * @default offset = [0, 0]
  199. * @example offset = [10, 10]
  200. */
  201. offset: [0, 0],
  202. /**
  203. * @description Value fractional precision
  204. * @type {Number}
  205. * @default valueToFixed = 0
  206. */
  207. valueToFixed: 0,
  208. /**
  209. * @description Details position
  210. * @type {String}
  211. * @default position = 'center'
  212. * @example position = 'start' | 'center' | 'end'
  213. */
  214. position: 'center',
  215. /**
  216. * @description Details default style configuration
  217. * @type {Object}
  218. * @default style = {Configuration Of Class Style}
  219. */
  220. style: {
  221. fontSize: 20,
  222. fontWeight: 'bold',
  223. textAlign: 'center',
  224. textBaseline: 'middle'
  225. }
  226. },
  227. /**
  228. * @description Gauge background arc configuration
  229. * @type {Object}
  230. */
  231. backgroundArc: {
  232. /**
  233. * @description Whether to display background arc
  234. * @type {Boolean}
  235. * @default show = true
  236. */
  237. show: true,
  238. /**
  239. * @description Background arc default style configuration
  240. * @type {Object}
  241. * @default style = {Configuration Of Class Style}
  242. */
  243. style: {
  244. stroke: '#e0e0e0'
  245. }
  246. },
  247. /**
  248. * @description Gauge chart render level
  249. * Priority rendering high level
  250. * @type {Number}
  251. * @default rLevel = 10
  252. */
  253. rLevel: 10,
  254. /**
  255. * @description Gauge animation curve
  256. * @type {String}
  257. * @default animationCurve = 'easeOutCubic'
  258. */
  259. animationCurve: 'easeOutCubic',
  260. /**
  261. * @description Gauge animation frame
  262. * @type {Number}
  263. * @default animationFrame = 50
  264. */
  265. animationFrame: 50
  266. };
  267. exports.gaugeConfig = gaugeConfig;