6d4bf5e91b3bbd9ea91c8ddcab3b5c2adfcba1385e60159b2e1f1fc1f10cdb927464adb02a5fb907af81807c4340583155da313ae5ae956748d2816a66342a 8.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407
  1. export const xAxisConfig = {
  2. /**
  3. * @description Axis name
  4. * @type {String}
  5. * @default name = ''
  6. */
  7. name: '',
  8. /**
  9. * @description Whether to display this axis
  10. * @type {Boolean}
  11. * @default show = true
  12. */
  13. show: true,
  14. /**
  15. * @description Axis position
  16. * @type {String}
  17. * @default position = 'bottom'
  18. * @example position = 'bottom' | 'top'
  19. */
  20. position: 'bottom',
  21. /**
  22. * @description Name gap
  23. * @type {Number}
  24. * @default nameGap = 15
  25. */
  26. nameGap: 15,
  27. /**
  28. * @description Name location
  29. * @type {String}
  30. * @default nameLocation = 'end'
  31. * @example nameLocation = 'end' | 'center' | 'start'
  32. */
  33. nameLocation: 'end',
  34. /**
  35. * @description Name default style configuration
  36. * @type {Object}
  37. * @default style = {Configuration Of Class Style}
  38. */
  39. nameTextStyle: {
  40. fill: '#333',
  41. fontSize: 10
  42. },
  43. /**
  44. * @description Axis min value
  45. * @type {String|Number}
  46. * @default min = '20%'
  47. * @example min = '20%' | 0
  48. */
  49. min: '20%',
  50. /**
  51. * @description Axis max value
  52. * @type {String|Number}
  53. * @default max = '20%'
  54. * @example max = '20%' | 0
  55. */
  56. max: '20%',
  57. /**
  58. * @description Axis value interval
  59. * @type {Number}
  60. * @default interval = null
  61. * @example interval = 100
  62. */
  63. interval: null,
  64. /**
  65. * @description Min interval
  66. * @type {Number}
  67. * @default minInterval = null
  68. * @example minInterval = 1
  69. */
  70. minInterval: null,
  71. /**
  72. * @description Max interval
  73. * @type {Number}
  74. * @default maxInterval = null
  75. * @example maxInterval = 100
  76. */
  77. maxInterval: null,
  78. /**
  79. * @description Boundary gap
  80. * @type {Boolean}
  81. * @default boundaryGap = null
  82. * @example boundaryGap = true
  83. */
  84. boundaryGap: null,
  85. /**
  86. * @description Axis split number
  87. * @type {Number}
  88. * @default splitNumber = 5
  89. */
  90. splitNumber: 5,
  91. /**
  92. * @description Axis line configuration
  93. * @type {Object}
  94. */
  95. axisLine: {
  96. /**
  97. * @description Whether to display axis line
  98. * @type {Boolean}
  99. * @default show = true
  100. */
  101. show: true,
  102. /**
  103. * @description Axis line default style configuration
  104. * @type {Object}
  105. * @default style = {Configuration Of Class Style}
  106. */
  107. style: {
  108. stroke: '#333',
  109. lineWidth: 1
  110. }
  111. },
  112. /**
  113. * @description Axis tick configuration
  114. * @type {Object}
  115. */
  116. axisTick: {
  117. /**
  118. * @description Whether to display axis tick
  119. * @type {Boolean}
  120. * @default show = true
  121. */
  122. show: true,
  123. /**
  124. * @description Axis tick default style configuration
  125. * @type {Object}
  126. * @default style = {Configuration Of Class Style}
  127. */
  128. style: {
  129. stroke: '#333',
  130. lineWidth: 1
  131. }
  132. },
  133. /**
  134. * @description Axis label configuration
  135. * @type {Object}
  136. */
  137. axisLabel: {
  138. /**
  139. * @description Whether to display axis label
  140. * @type {Boolean}
  141. * @default show = true
  142. */
  143. show: true,
  144. /**
  145. * @description Axis label formatter
  146. * @type {String|Function}
  147. * @default formatter = null
  148. * @example formatter = '{value}件'
  149. * @example formatter = (dataItem) => (dataItem.value)
  150. */
  151. formatter: null,
  152. /**
  153. * @description Axis label default style configuration
  154. * @type {Object}
  155. * @default style = {Configuration Of Class Style}
  156. */
  157. style: {
  158. fill: '#333',
  159. fontSize: 10,
  160. rotate: 0
  161. }
  162. },
  163. /**
  164. * @description Axis split line configuration
  165. * @type {Object}
  166. */
  167. splitLine: {
  168. /**
  169. * @description Whether to display axis split line
  170. * @type {Boolean}
  171. * @default show = false
  172. */
  173. show: false,
  174. /**
  175. * @description Axis split line default style configuration
  176. * @type {Object}
  177. * @default style = {Configuration Of Class Style}
  178. */
  179. style: {
  180. stroke: '#d4d4d4',
  181. lineWidth: 1
  182. }
  183. },
  184. /**
  185. * @description X axis render level
  186. * Priority rendering high level
  187. * @type {Number}
  188. * @default rLevel = -20
  189. */
  190. rLevel: -20,
  191. /**
  192. * @description X axis animation curve
  193. * @type {String}
  194. * @default animationCurve = 'easeOutCubic'
  195. */
  196. animationCurve: 'easeOutCubic',
  197. /**
  198. * @description X axis animation frame
  199. * @type {Number}
  200. * @default animationFrame = 50
  201. */
  202. animationFrame: 50
  203. }
  204. export const yAxisConfig = {
  205. /**
  206. * @description Axis name
  207. * @type {String}
  208. * @default name = ''
  209. */
  210. name: '',
  211. /**
  212. * @description Whether to display this axis
  213. * @type {Boolean}
  214. * @default show = true
  215. */
  216. show: true,
  217. /**
  218. * @description Axis position
  219. * @type {String}
  220. * @default position = 'left'
  221. * @example position = 'left' | 'right'
  222. */
  223. position: 'left',
  224. /**
  225. * @description Name gap
  226. * @type {Number}
  227. * @default nameGap = 15
  228. */
  229. nameGap: 15,
  230. /**
  231. * @description Name location
  232. * @type {String}
  233. * @default nameLocation = 'end'
  234. * @example nameLocation = 'end' | 'center' | 'start'
  235. */
  236. nameLocation: 'end',
  237. /**
  238. * @description name default style configuration
  239. * @type {Object}
  240. * @default style = {Configuration Of Class Style}
  241. */
  242. nameTextStyle: {
  243. fill: '#333',
  244. fontSize: 10
  245. },
  246. /**
  247. * @description Axis min value
  248. * @type {String|Number}
  249. * @default min = '20%'
  250. * @example min = '20%' | 0
  251. */
  252. min: '20%',
  253. /**
  254. * @description Axis max value
  255. * @type {String|Number}
  256. * @default max = '20%'
  257. * @example max = '20%' | 0
  258. */
  259. max: '20%',
  260. /**
  261. * @description Axis value interval
  262. * @type {Number}
  263. * @default interval = null
  264. * @example interval = 100
  265. */
  266. interval: null,
  267. /**
  268. * @description Min interval
  269. * @type {Number}
  270. * @default minInterval = null
  271. * @example minInterval = 1
  272. */
  273. minInterval: null,
  274. /**
  275. * @description Max interval
  276. * @type {Number}
  277. * @default maxInterval = null
  278. * @example maxInterval = 100
  279. */
  280. maxInterval: null,
  281. /**
  282. * @description Boundary gap
  283. * @type {Boolean}
  284. * @default boundaryGap = null
  285. * @example boundaryGap = true
  286. */
  287. boundaryGap: null,
  288. /**
  289. * @description Axis split number
  290. * @type {Number}
  291. * @default splitNumber = 5
  292. */
  293. splitNumber: 5,
  294. /**
  295. * @description Axis line configuration
  296. * @type {Object}
  297. */
  298. axisLine: {
  299. /**
  300. * @description Whether to display axis line
  301. * @type {Boolean}
  302. * @default show = true
  303. */
  304. show: true,
  305. /**
  306. * @description Axis line default style configuration
  307. * @type {Object}
  308. * @default style = {Configuration Of Class Style}
  309. */
  310. style: {
  311. stroke: '#333',
  312. lineWidth: 1
  313. }
  314. },
  315. /**
  316. * @description Axis tick configuration
  317. * @type {Object}
  318. */
  319. axisTick: {
  320. /**
  321. * @description Whether to display axis tick
  322. * @type {Boolean}
  323. * @default show = true
  324. */
  325. show: true,
  326. /**
  327. * @description Axis tick default style configuration
  328. * @type {Object}
  329. * @default style = {Configuration Of Class Style}
  330. */
  331. style: {
  332. stroke: '#333',
  333. lineWidth: 1
  334. }
  335. },
  336. /**
  337. * @description Axis label configuration
  338. * @type {Object}
  339. */
  340. axisLabel: {
  341. /**
  342. * @description Whether to display axis label
  343. * @type {Boolean}
  344. * @default show = true
  345. */
  346. show: true,
  347. /**
  348. * @description Axis label formatter
  349. * @type {String|Function}
  350. * @default formatter = null
  351. * @example formatter = '{value}件'
  352. * @example formatter = (dataItem) => (dataItem.value)
  353. */
  354. formatter: null,
  355. /**
  356. * @description Axis label default style configuration
  357. * @type {Object}
  358. * @default style = {Configuration Of Class Style}
  359. */
  360. style: {
  361. fill: '#333',
  362. fontSize: 10,
  363. rotate: 0
  364. }
  365. },
  366. /**
  367. * @description Axis split line configuration
  368. * @type {Object}
  369. */
  370. splitLine: {
  371. /**
  372. * @description Whether to display axis split line
  373. * @type {Boolean}
  374. * @default show = true
  375. */
  376. show: true,
  377. /**
  378. * @description Axis split line default style configuration
  379. * @type {Object}
  380. * @default style = {Configuration Of Class Style}
  381. */
  382. style: {
  383. stroke: '#d4d4d4',
  384. lineWidth: 1
  385. }
  386. },
  387. /**
  388. * @description Y axis render level
  389. * Priority rendering high level
  390. * @type {Number}
  391. * @default rLevel = -20
  392. */
  393. rLevel: -20,
  394. /**
  395. * @description Y axis animation curve
  396. * @type {String}
  397. * @default animationCurve = 'easeOutCubic'
  398. */
  399. animationCurve: 'easeOutCubic',
  400. /**
  401. * @description Y axis animation frame
  402. * @type {Number}
  403. * @default animationFrame = 50
  404. */
  405. animationFrame: 50
  406. }