Advertisement
Guest User

Untitled

a guest
May 19th, 2019
111
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.12 KB | None | 0 0
  1. Highcharts.chart('container', {
  2.  
  3. chart: {
  4. type: 'bar'
  5. },
  6.  
  7. title: {
  8. text: ''
  9. },
  10. credits: {
  11. enabled: false
  12. },
  13. exporting: {
  14. enabled: false
  15. },
  16.  
  17. plotOptions: {
  18. bar: {
  19. color: '#8FBEFF'
  20. },
  21. series: {
  22. dataLabels: {
  23. enabled: true,
  24. color: '#666',
  25. fontSize: '11px',
  26. fontWeight: '100'
  27. }
  28. }
  29. },
  30.  
  31. xAxis: {
  32. type: 'category',
  33. lineWidth: 1,
  34. lineColor: '#ddd',
  35. tickWidth: 0,
  36. },
  37.  
  38. yAxis: {
  39. title: {
  40. text: '时长',
  41. align: 'high',
  42. y: -35
  43. },
  44. lineWidth: 1,
  45. lineColor: '#ddd',
  46. gridLineWidth: 0,
  47. tickInterval: 50,
  48. min: 0,
  49. max: 350,
  50. showLastLabel: false, // 不显示最后一个轴标签
  51. },
  52.  
  53. series: [{
  54. dataLabels: [{
  55. align: 'left',
  56. format: '{y}'
  57. }],
  58. data: [{
  59. y: 113,
  60. name: '学习包',
  61. }, {
  62. y: 300,
  63. name: '直播课程',
  64. }, {
  65. y: 100,
  66. name: '微课',
  67. }, {
  68. y: 20,
  69. name: '课件',
  70. }, {
  71. y: 30,
  72. name: '导学案',
  73. }, {
  74. y: 120,
  75. name: '习题',
  76. }],
  77. showInLegend: false
  78. }]
  79.  
  80. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement