Highcharts Demo

author(s): Torstein Hønsi

by Kesav Telaprolu

HTML

<script src="https://code.highcharts.com/highcharts.js"></script>
<div id="container" style="width: 400px; height: 400px"></div>

JavaScript

Highcharts.chart('container', {

    chart: {
        marginTop: 50,
        marginBottom: 50,
        marginLeft: 50,
        marginRight: 50
    },

    xAxis: {
        gridLineWidth: 1,
        min: -5,
        max: 5,
        tickInterval: 1,
        lineColor: 'black',
        offset: -250
    },
    yAxis: {
        min: -5,
        max: 5,
        tickInterval: 1,
        lineWidth: 1,
        lineColor: 'black',
        offset: -150,
        title: {
            text: null
        }
    },

    series: [{
        data: [
            [-3, 3],
            [-2, 2],
            [-1, 1],
            [0, 0],
            [1, 1],
            [2, 2],
            [3, 3]

        ]
    }]

});