Highcharts Demo3

author(s): Torstein Hønsi

by Yoghurts

HTML

<script src="https://code.highcharts.com/highcharts.js"></script>
<script src="https://code.highcharts.com/modules/exporting.js"></script>

<div id="container" style="min-width: 310px; height: 400px; margin: 0 auto"></div>

JavaScript

Highcharts.chart('container', {
  chart: {
    type: 'line'
  },
  title: {
    text: '页面对比时间趋势图'
  },

  subtitle: {
    text: ''
  },
  xAxis: {
    categories: [
      '1024*200/30个节点',
      '1024*400/60个节点',
     '1024*600/90个节点',
      '1024*800/120个节点'
          ]
  },
  yAxis: {
    title: {
       text: '内存占用(KB)'
    }
  },
  plotOptions: {
    line: {
      dataLabels: {
        enabled: true
      },
      enableMouseTracking: false
    }
  },
  series: [{
    name: '传统算法',
    data: [7,14,22,30]

  }, {
    name: '基于DOM树的对比算法',
    data: [2,3,4,5]

  }]
});