echartConfig.js 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. export const color = [
  2. '#2877FF',
  3. '#FB8D12',
  4. '#EF3A41',
  5. '#06C679',
  6. '#F6C12B',
  7. '#28B1EB',
  8. '#7643CA',
  9. '#E03FBD',
  10. '#9ACC35',
  11. '#36CFC0',
  12. ];
  13. export const textStyle = {};
  14. export const labelLine = {
  15. normal: {
  16. show: false,
  17. },
  18. };
  19. export const tooltipAxis = {
  20. trigger: 'axis',
  21. axisPointer: {
  22. type: 'shadow',
  23. },
  24. };
  25. // 盒子间距
  26. export const grid = {
  27. top: '40',
  28. left: '0',
  29. right: '30',
  30. bottom: '15',
  31. containLabel: true,
  32. };
  33. // 横轴
  34. export const xAxis = {
  35. axisLine: {
  36. lineStyle: {
  37. color: '#8CA0B3',
  38. },
  39. axisLabel: {
  40. textStyle: {
  41. color: '#666666',
  42. fontSize: 12,
  43. },
  44. },
  45. },
  46. };
  47. // 纵轴
  48. export const yAxis = {
  49. axisLine: {
  50. lineStyle: {
  51. show: false,
  52. color: '#8CA0B3',
  53. },
  54. axisTick: { show: false },
  55. axisLabel: {
  56. show: true,
  57. textStyle: {
  58. color: '#666666',
  59. fontSize: 12,
  60. },
  61. },
  62. },
  63. };
  64. export const pieLegend = {
  65. x: '70%',
  66. y: 'top',
  67. orient: 'vertical',
  68. };
  69. export const barWidth = '30';
  70. export const barWidthStack = '60';
  71. export const pieRadius = ['40%', '60%'];
  72. export const pieCenter = ['30%', '50%'];
  73. export const barItemStyle = {
  74. label: {
  75. show: true,
  76. position: 'top',
  77. formatter: '{c}' + '万元',
  78. },
  79. };
  80. export const barStackItemStyle = {
  81. label: {
  82. show: true,
  83. position: 'inside',
  84. formatter: '{c}' + '万元',
  85. color: '#fff',
  86. },
  87. };