option0.js 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. function option0 (name) {
  2. var color = eColorMap[name];
  3. var option = {
  4. title : {
  5. text: '空气质量('+name+')',
  6. subtext: 'data from PM25.in',
  7. sublink: 'http://www.pm25.in'
  8. },
  9. tooltip : {
  10. trigger: 'item'
  11. },
  12. toolbox: {
  13. show : true,
  14. //orient : 'vertical',
  15. x: 'right',
  16. //y: 'center',
  17. feature : {
  18. mark : {show: true},
  19. dataView : {show: true, readOnly: false},
  20. restore : {show: true},
  21. saveAsImage : {show: true}
  22. }
  23. },
  24. dataRange: {
  25. min : data[name + 'Min'],
  26. max : data[name + 'Max'],
  27. calculable : true,
  28. color: ['maroon','purple','red','orange','yellow','lightgreen']
  29. },
  30. series : [
  31. {
  32. type: 'map',
  33. mapType: 'china',
  34. mapLocation: {
  35. //x:'left'
  36. },
  37. hoverable: false,
  38. roam:true,
  39. itemStyle:{
  40. //normal:{label:{show:true}}
  41. },
  42. data : [],
  43. markPoint: {
  44. symbolSize: 5, // 标注大小,半宽(半径)参数,当图形为方向或菱形则总宽度为symbolSize * 2
  45. itemStyle: {
  46. normal: {
  47. borderColor: '#87cefa',
  48. borderWidth: 1, // 标注边线线宽,单位px,默认为1
  49. label: {
  50. show: false
  51. }
  52. },
  53. emphasis: {
  54. borderColor: '#1e90ff',
  55. borderWidth: 5,
  56. label: {
  57. show: false
  58. }
  59. }
  60. },
  61. data : data[name]
  62. },
  63. geoCoord : data.geoCoord
  64. }
  65. ]
  66. };
  67. return option;
  68. }