dealchart.js 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. var myChart = '';
  2. var xAxisData = [];
  3. // var xAxisData = getArrRange(0, 30);
  4. // 指定图表的配置项和数据
  5. var option = {
  6. xAxis: {
  7. data: xAxisData,
  8. show: false
  9. },
  10. yAxis: {
  11. show: false,
  12. // min: 0, // EI
  13. // max: 1200, // EI
  14. min: 60, // HR
  15. max: 220, // HR
  16. },
  17. grid: {
  18. left: '0%',
  19. top: 0,
  20. right: '-4.8%',
  21. bottom: 0,
  22. },
  23. series: [{
  24. // data: ['114', '116', '127', '129', '134', '149', '149', '151', '153', '154'],
  25. // data: [[0, 100], [1, 114], [2, 116], [3, 127], [4, 129], [5, 134], [6, 149], [7, 151], [8, 153], [9, 154], [10, 155]],
  26. type: 'line',
  27. seriesLayoutBy: 'column',
  28. smooth: true,
  29. itemStyle: {
  30. // color: '#ffffff',
  31. opacity: 0
  32. },
  33. lineStyle: {
  34. color: '#ffffff',
  35. width: 5
  36. },
  37. label: {
  38. show: false,
  39. position: 'bottom',
  40. textStyle: {
  41. fontSize: 10
  42. }
  43. }
  44. }]
  45. };
  46. function chartInit() {
  47. myChart = echarts.init(document.getElementById('areaChart'));
  48. myChart.setOption(option); // 使用刚指定的配置项和数据显示图表。
  49. }