config.ts 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. import { echartOptionProfixHandle, publicConfig } from '@/packages/public'
  2. import { MapChinaConfig } from './index'
  3. import { chartInitConfig } from '@/settings/designSetting'
  4. import { CreateComponentType } from '@/packages/index.d'
  5. import dataJson from './data.json'
  6. export const includes = []
  7. export const option = {
  8. dataset: dataJson,
  9. tooltip: {
  10. show: true,
  11. trigger: 'item'
  12. },
  13. geo: {
  14. show: false,
  15. type: 'map',
  16. roam: false,
  17. map: 'china'
  18. },
  19. series: [
  20. {
  21. type: 'effectScatter',
  22. coordinateSystem: 'geo',
  23. symbolSize: 6,
  24. zlevel: 1,
  25. label: {
  26. show: false
  27. },
  28. itemStyle: {
  29. shadowBlur: 10,
  30. color: '#00ECC8'
  31. },
  32. data: []
  33. },
  34. {
  35. name: '地图',
  36. type: 'map',
  37. map: 'china',
  38. zoom: 1, //缩放
  39. itemStyle: {
  40. // 背景色
  41. areaColor: 'rgba(117, 236, 170, 0.3)',
  42. emphasis: {
  43. areaColor: 'rgba(117, 236, 170, .8)',
  44. borderWidth: 1,
  45. shadowBlur: 10,
  46. shadowColor: '#75ecaa'
  47. },
  48. color: '#ffffff',
  49. borderColor: '#75ecaa',
  50. borderWidth: 1
  51. },
  52. label: {
  53. show: true,
  54. color: '#ffffff'
  55. },
  56. data: []
  57. }
  58. ]
  59. }
  60. export default class Config extends publicConfig implements CreateComponentType {
  61. public key: string = MapChinaConfig.key
  62. public attr = { ...chartInitConfig, w: 750, h: 800, zIndex: -1 }
  63. public chartConfig = MapChinaConfig
  64. public option = echartOptionProfixHandle(option, includes)
  65. }