f0c910fd79bb2f01249d0a5bbfe146984b4ea2b2155f85ef1f73b595cad91a62983d40006cec15e671ab28d69a99384338febca540389ce69bf18b88475a50 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214
  1. export const barConfig = {
  2. /**
  3. * @description Whether to display this bar chart
  4. * @type {Boolean}
  5. * @default show = true
  6. */
  7. show: true,
  8. /**
  9. * @description Legend name
  10. * @type {String}
  11. * @default name = ''
  12. */
  13. name: '',
  14. /**
  15. * @description Data stacking
  16. * The data value of the series element of the same stack
  17. * will be superimposed (the latter value will be superimposed on the previous value)
  18. * @type {String}
  19. * @default stack = ''
  20. */
  21. stack: '',
  22. /**
  23. * @description Bar shape type
  24. * @type {String}
  25. * @default shapeType = 'normal'
  26. * @example shapeType = 'normal' | 'leftEchelon' | 'rightEchelon'
  27. */
  28. shapeType: 'normal',
  29. /**
  30. * @description Echelon bar sharpness offset
  31. * @type {Number}
  32. * @default echelonOffset = 10
  33. */
  34. echelonOffset: 10,
  35. /**
  36. * @description Bar width
  37. * This property should be set on the last 'bar' series
  38. * in this coordinate system to take effect and will be in effect
  39. * for all 'bar' series in this coordinate system
  40. * @type {String|Number}
  41. * @default barWidth = 'auto'
  42. * @example barWidth = 'auto' | '10%' | 20
  43. */
  44. barWidth: 'auto',
  45. /**
  46. * @description Bar gap
  47. * This property should be set on the last 'bar' series
  48. * in this coordinate system to take effect and will be in effect
  49. * for all 'bar' series in this coordinate system
  50. * @type {String|Number}
  51. * @default barGap = '30%'
  52. * @example barGap = '30%' | 30
  53. */
  54. barGap: '30%',
  55. /**
  56. * @description Bar category gap
  57. * This property should be set on the last 'bar' series
  58. * in this coordinate system to take effect and will be in effect
  59. * for all 'bar' series in this coordinate system
  60. * @type {String|Number}
  61. * @default barCategoryGap = '20%'
  62. * @example barCategoryGap = '20%' | 20
  63. */
  64. barCategoryGap: '20%',
  65. /**
  66. * @description Bar x axis index
  67. * @type {Number}
  68. * @default xAxisIndex = 0
  69. * @example xAxisIndex = 0 | 1
  70. */
  71. xAxisIndex: 0,
  72. /**
  73. * @description Bar y axis index
  74. * @type {Number}
  75. * @default yAxisIndex = 0
  76. * @example yAxisIndex = 0 | 1
  77. */
  78. yAxisIndex: 0,
  79. /**
  80. * @description Bar chart data
  81. * @type {Array}
  82. * @default data = []
  83. * @example data = [100, 200, 300]
  84. */
  85. data: [],
  86. /**
  87. * @description Background bar configuration
  88. * @type {Object}
  89. */
  90. backgroundBar: {
  91. /**
  92. * @description Whether to display background bar
  93. * @type {Boolean}
  94. * @default show = false
  95. */
  96. show: false,
  97. /**
  98. * @description Background bar width
  99. * @type {String|Number}
  100. * @default width = 'auto'
  101. * @example width = 'auto' | '30%' | 30
  102. */
  103. width: 'auto',
  104. /**
  105. * @description Background bar default style configuration
  106. * @type {Object}
  107. * @default style = {Configuration Of Class Style}
  108. */
  109. style: {
  110. fill: 'rgba(200, 200, 200, .4)'
  111. }
  112. },
  113. /**
  114. * @description Bar label configuration
  115. * @type {Object}
  116. */
  117. label: {
  118. /**
  119. * @description Whether to display bar label
  120. * @type {Boolean}
  121. * @default show = false
  122. */
  123. show: false,
  124. /**
  125. * @description Bar label position
  126. * @type {String}
  127. * @default position = 'top'
  128. * @example position = 'top' | 'center' | 'bottom'
  129. */
  130. position: 'top',
  131. /**
  132. * @description Bar label offset
  133. * @type {Array}
  134. * @default offset = [0, -10]
  135. */
  136. offset: [0, -10],
  137. /**
  138. * @description Bar label formatter
  139. * @type {String|Function}
  140. * @default formatter = null
  141. * @example formatter = '{value}件'
  142. * @example formatter = (dataItem) => (dataItem.value)
  143. */
  144. formatter: null,
  145. /**
  146. * @description Bar label default style configuration
  147. * @type {Object}
  148. * @default style = {Configuration Of Class Style}
  149. */
  150. style: {
  151. fontSize: 10
  152. }
  153. },
  154. /**
  155. * @description Bar gradient configuration
  156. * @type {Object}
  157. */
  158. gradient: {
  159. /**
  160. * @description Gradient color (Hex|rgb|rgba)
  161. * @type {Array}
  162. * @default color = []
  163. */
  164. color: [],
  165. /**
  166. * @description Local gradient
  167. * @type {Boolean}
  168. * @default local = true
  169. */
  170. local: true
  171. },
  172. /**
  173. * @description Bar style default configuration
  174. * @type {Object}
  175. * @default style = {Configuration Of Class Style}
  176. */
  177. barStyle: {},
  178. /**
  179. * @description Independent color mode
  180. * When set to true, independent color mode is enabled
  181. * @type {Boolean}
  182. * @default independentColor = false
  183. */
  184. independentColor: false,
  185. /**
  186. * @description Independent colors
  187. * Only effective when independent color mode is enabled
  188. * Default value is the same as the color in the root configuration
  189. * Two-dimensional color array can produce gradient colors
  190. * @type {Array}
  191. * @example independentColor = ['#fff', '#000']
  192. * @example independentColor = [['#fff', '#000'], '#000']
  193. */
  194. independentColors: [],
  195. /**
  196. * @description Bar chart render level
  197. * Priority rendering high level
  198. * @type {Number}
  199. * @default rLevel = 0
  200. */
  201. rLevel: 0,
  202. /**
  203. * @description Bar animation curve
  204. * @type {String}
  205. * @default animationCurve = 'easeOutCubic'
  206. */
  207. animationCurve: 'easeOutCubic',
  208. /**
  209. * @description Bar animation frame
  210. * @type {Number}
  211. * @default animationFrame = 50
  212. */
  213. animationFrame: 50
  214. }