信通院-灾备 图表源码(在产品图表库基础上进行修改),开发逻辑和产品图表库一致
Ви не можете вибрати більше 25 тем Теми мають розпочинатися з літери або цифри, можуть містити дефіси (-) і не повинні перевищувати 35 символів.

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119
  1. import ChartBar from '../../../src/chart/bar/ChartBar11/ChartBar11.js';
  2. import Title from "../../../src/chart/commonOptions/title";
  3. import Grid from "../../../src/chart/commonOptions/grid";
  4. let bar = new ChartBar(document.getElementsByClassName('c1')[0], {});
  5. window.addEventListener('resize', () => {
  6. bar.resize();
  7. });
  8. setTimeout(() => {
  9. // bar.setOption(opt);
  10. },3000);
  11. let opt={
  12. color: ["#7eb2e7", "#66ffff"],
  13. bg: {
  14. backgroundColor: '#161729'
  15. },
  16. title: Title.option('新经济普查工作'),
  17. grid: Grid.option,
  18. tooltip: {
  19. dangerline: {
  20. // show:true,
  21. // dangerData:68
  22. }
  23. },
  24. legend: {
  25. left: "45%",
  26. top: '6%',
  27. itemHeight: 12,
  28. itemWidth: 12,
  29. itemAngelR: 20,
  30. textStyle: {
  31. fontSize: 16,
  32. color: '#50a7bd'
  33. }
  34. },
  35. xAxis: {
  36. type: "category",
  37. name: '年份',
  38. nameTextStyle: {
  39. fontSize: 12,
  40. color: '#ccc',
  41. },
  42. namePosition: 'end',
  43. axisLine: {
  44. show: true,
  45. lineStyle: {
  46. color: '#00dff7',
  47. width: 2,
  48. type: 'solid'
  49. }
  50. },
  51. axisTick: {
  52. show: false,
  53. alignWithLabel: false
  54. },
  55. splitLine: {
  56. show: false,
  57. },
  58. axisLabel: {
  59. show: true,
  60. textStyle: {
  61. color: '#50a7bd'
  62. }
  63. },
  64. highLightColor: '#005eb8',
  65. data: [2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016],
  66. },
  67. yAxis: {
  68. type: 'value',
  69. title: '(%)',
  70. nameTextStyle: {
  71. color: '#66ffff',
  72. fontSize: 14
  73. },
  74. axisLine: {
  75. show: true,
  76. color: '#00dcff'
  77. },
  78. axisTick: {
  79. show: true,
  80. lineStyle: {
  81. color: '#cee1ff',
  82. width: 2
  83. },
  84. length: 3,
  85. alignWithLabel: true
  86. },
  87. splitLine: {
  88. show: true
  89. },
  90. axisLabel: {
  91. textStyle: {
  92. color: '#66ffff'
  93. }
  94. },
  95. },
  96. shape:{
  97. barGap: '80%',
  98. barCategoryGap: '40%',
  99. label: {
  100. show:true,
  101. textStyle: {
  102. fontSize: 14,
  103. fontWeight: 'normal',
  104. color: '#fff'
  105. }
  106. },
  107. },
  108. series: [ {
  109. name: '行业2',
  110. type: 'bar',
  111. data: [610, 860, 600, 1300, 1300, 700, 580, 750, 1280]
  112. }
  113. ]
  114. }