0d1851af309b1333d26acedfc8f57dd9ad6ae7db8d9aebdbc98dc916ae7098a683e4ccc37599470355cadbb8bbe39dadef887c621de95c6de785b5c2586c5d 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184
  1. export const pieConfig = {
  2. /**
  3. * @description Whether to display this pie 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 Radius of pie
  16. * @type {String|Number}
  17. * @default radius = '50%'
  18. * @example radius = '50%' | 100
  19. */
  20. radius: '50%',
  21. /**
  22. * @description Center point of pie
  23. * @type {Array}
  24. * @default center = ['50%','50%']
  25. * @example center = ['50%','50%'] | [100, 100]
  26. */
  27. center: ['50%', '50%'],
  28. /**
  29. * @description Pie chart start angle
  30. * @type {Number}
  31. * @default startAngle = -Math.PI / 2
  32. * @example startAngle = -Math.PI
  33. */
  34. startAngle: -Math.PI / 2,
  35. /**
  36. * @description Whether to enable rose type
  37. * @type {Boolean}
  38. * @default roseType = false
  39. */
  40. roseType: false,
  41. /**
  42. * @description Automatic sorting in rose type
  43. * @type {Boolean}
  44. * @default roseSort = true
  45. */
  46. roseSort: true,
  47. /**
  48. * @description Rose radius increasing
  49. * @type {String|Number}
  50. * @default roseIncrement = 'auto'
  51. * @example roseIncrement = 'auto' | '10%' | 10
  52. */
  53. roseIncrement: 'auto',
  54. /**
  55. * @description Pie chart data
  56. * @type {Array}
  57. * @default data = []
  58. */
  59. data: [],
  60. /**
  61. * @description Pie inside label configuration
  62. * @type {Object}
  63. */
  64. insideLabel: {
  65. /**
  66. * @description Whether to display inside label
  67. * @type {Boolean}
  68. * @default show = false
  69. */
  70. show: false,
  71. /**
  72. * @description Label formatter
  73. * @type {String|Function}
  74. * @default formatter = '{percent}%'
  75. * @example formatter = '${name}-{value}-{percent}%'
  76. * @example formatter = (dataItem) => (dataItem.name)
  77. */
  78. formatter: '{percent}%',
  79. /**
  80. * @description Label default style configuration
  81. * @type {Object}
  82. * @default style = {Configuration Of Class Style}
  83. */
  84. style: {
  85. fontSize: 10,
  86. fill: '#fff',
  87. textAlign: 'center',
  88. textBaseline: 'middle'
  89. }
  90. },
  91. /**
  92. * @description Pie Outside label configuration
  93. * @type {Object}
  94. */
  95. outsideLabel: {
  96. /**
  97. * @description Whether to display outside label
  98. * @type {Boolean}
  99. * @default show = false
  100. */
  101. show: true,
  102. /**
  103. * @description Label formatter
  104. * @type {String|Function}
  105. * @default formatter = '{name}'
  106. * @example formatter = '${name}-{value}-{percent}%'
  107. * @example formatter = (dataItem) => (dataItem.name)
  108. */
  109. formatter: '{name}',
  110. /**
  111. * @description Label default style configuration
  112. * @type {Object}
  113. * @default style = {Configuration Of Class Style}
  114. */
  115. style: {
  116. fontSize: 11,
  117. },
  118. /**
  119. * @description Gap beteen label line bended place and pie
  120. * @type {String|Number}
  121. * @default labelLineBendGap = '20%'
  122. * @example labelLineBendGap = '20%' | 20
  123. */
  124. labelLineBendGap: '20%',
  125. /**
  126. * @description Label line end length
  127. * @type {Number}
  128. * @default labelLineEndLength = 50
  129. */
  130. labelLineEndLength: 50,
  131. /**
  132. * @description Label line default style configuration
  133. * @type {Object}
  134. * @default style = {Configuration Of Class Style}
  135. */
  136. labelLineStyle: {
  137. lineWidth: 1
  138. }
  139. },
  140. /**
  141. * @description Pie default style configuration
  142. * @type {Object}
  143. * @default style = {Configuration Of Class Style}
  144. */
  145. pieStyle: {
  146. },
  147. /**
  148. * @description Percentage fractional precision
  149. * @type {Number}
  150. * @default percentToFixed = 0
  151. */
  152. percentToFixed: 0,
  153. /**
  154. * @description Pie chart render level
  155. * Priority rendering high level
  156. * @type {Number}
  157. * @default rLevel = 10
  158. */
  159. rLevel: 10,
  160. /**
  161. * @description Animation delay gap
  162. * @type {Number}
  163. * @default animationDelayGap = 60
  164. */
  165. animationDelayGap: 60,
  166. /**
  167. * @description Pie animation curve
  168. * @type {String}
  169. * @default animationCurve = 'easeOutCubic'
  170. */
  171. animationCurve: 'easeOutCubic',
  172. /**
  173. * @description Pie start animation curve
  174. * @type {String}
  175. * @default startAnimationCurve = 'easeOutBack'
  176. */
  177. startAnimationCurve: 'easeOutBack',
  178. /**
  179. * @description Pie animation frame
  180. * @type {Number}
  181. * @default animationFrame = 50
  182. */
  183. animationFrame: 50,
  184. }