Highcharts Demo

author(s): Torstein Hønsi

by anikettiwari

HTML

<script src="https://code.highcharts.com/highcharts.js"></script>
<script src="https://code.highcharts.com/highcharts-more.js"></script>

<div id="container"></div>

JavaScript

Highcharts.chart('container', {
  chart: {
    type: 'polygon',
  },
  title: {
    text: ''
  },
  credits: {
    enabled: false
  },
  xAxis: {
    min: 0,
    max: 10,
    gridLineWidth: 1,
    title: {
      text: ''
    },
    startOnTick: true,
    endOnTick: true,
    showLastLabel: true
  },
  yAxis: {
    min: 0,
    max: 10,
    tickInterval: 2,
    title: {
      text: ''
    }
  },
  plotOptions: {
    polygon: {
      showInLegend: false,
      enableMouseTracking: false
    }
  },
  series: [{
    name: 'Line series',
    type: 'line',
    data: [2, 9, 0, 1, 4, 5, 1, 5, 7, 3, 10],
    zIndex: 10
    //colors: ['#04f9fe'],
  }, {
    data: [
      [5, 8],//x1,y1
      [10, 8],//x2,y1
      [10, 10],//x3, y2
      [5, 10],//x4,y2
    ]
   // color: '#04f9fe',
  }, {
    data: [
      [0, 8],
      [5, 8],
      [5, 10],
      [0, 10],
    ]
  }]
});