486b03e9ace535b91fd01b17f0e1f0692f504f7f.svn-base 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. function option2 (name) {
  2. var option = {
  3. title : {
  4. x: 'center',
  5. y: 'top',
  6. textStyle:{
  7. fontSize: 14
  8. }
  9. },
  10. tooltip : {
  11. trigger: 'item'
  12. },
  13. dataRange: {
  14. min: 0,
  15. itemWidth:8,
  16. itemGap: 5,
  17. x: 'left',
  18. y: 'bottom'
  19. },
  20. series : [
  21. {
  22. type: 'map',
  23. mapType: 'china'
  24. }
  25. ]
  26. };
  27. var color = eColorMap[name];
  28. option.title.text = eNameMap[name] + ' (亿元)';
  29. option.title.textStyle.color = color;
  30. option.dataRange.color = [
  31. color,
  32. require('zrender/tool/color').lift(color, -0.9)
  33. ];
  34. option.dataRange.max = dataMap['data' + name][curYear + 'max'];
  35. for (var i = 0, l = option.series.length; i < l; i++) {
  36. option.series[i].name = eNameMap[name] + '(' + curYear + ')';
  37. option.series[i].data =
  38. dataMap['data' + name][curYear]
  39. }
  40. return option;
  41. }