statis.js 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. var _defaultOption = {
  2. // color: ["#2f89cf"],
  3. title: {
  4. text: '',
  5. left: 'center'
  6. },
  7. grid: {
  8. containLabel: true
  9. },
  10. tooltip: {
  11. trigger: "axis",
  12. axisPointer: {
  13. type: 'shadow'
  14. }
  15. },
  16. legend: {
  17. orient: 'horizontal',
  18. left: 'left',
  19. data: []
  20. },
  21. xAxis: [
  22. {
  23. 'type':'category',
  24. 'data':[]
  25. }
  26. ],
  27. yAxis: [
  28. {
  29. type: 'value',
  30. name: ''
  31. }
  32. ],
  33. series: [
  34. {
  35. name: '',
  36. type: 'bar',
  37. radius: '55%',
  38. center: ['50%', '60%'],
  39. data: [],
  40. emphasis: {
  41. itemStyle: {
  42. shadowBlur: 10,
  43. shadowOffsetX: 0,
  44. shadowColor: 'rgba(0, 0, 0, 0.5)'
  45. }
  46. }
  47. }
  48. ]
  49. };
  50. function getOption(title){
  51. var option={};
  52. $.extend(true,option,_defaultOption);
  53. option.title.text=title;
  54. return option;
  55. }