88d8a44d6c149ca93fdc71ee2311186d502c879eb5cc765d86628e994fdb4f9f4748b14bcd95669a84fc8a5df606ee07d8fdac5acd1f63c73b1b1bdbbde7dc 4.4 KB

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