Highcharts Demo

author(s): Torstein Hønsi

by mlmason

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: 'column'
    },
    title: {
        text: 'Year to Year Percent Change in Violent Crime for Original Eight Project Green Light and Comparable Properties'
    },
       subtitle: {
        text: 'Source: Detroit Open Data Portal'
    },
    xAxis: {
        categories: ['2016', '2017(end of Nov.)']
    },
     yAxis: {
    
        title: {
            text: 'Percent Change'
        }
    },
       tooltip: {
        headerFormat: '<span style="font-size:10px">{point.key}</span><table>',
        pointFormat: '<tr><td style="color:{series.color};padding:0">{series.name}: </td>' +
            '<td style="padding:0"><b>{point.y:.0f} %</b></td></tr>',
        footerFormat: '</table>',
        shared: true,
        useHTML: true
    },
    credits: {
        enabled: 'false'
    },
    series: [{
        name: 'Original 8',
        data: [-48, 21, ]
    }, {
        name: 'Comparable Properties',
        data: [-30, -15, ]
    }]
});