Average Rainfall

by pablojim

HTML

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

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

JavaScript

$(function () {
    $('#container').highcharts({
        chart: {
            type: 'bar'
        },
        title: {
            text: 'Average Annual Rainfall'
        },
        xAxis: {
            categories: ['Kerry', 'Dublin', 'London'],
            title: {
                text: null
            },
            gridLineWidth: 0,
            minorGridLineWidth: 0
        },
        yAxis: {
            min: 0,
            title: {
                text: 'Average Annual Rainfall (mm)',
                align: 'high'
            },
            labels: {
                overflow: 'justify'
            },
            gridLineWidth: 0,
            minorGridLineWidth: 0
        },
        tooltip: {
            valueSuffix: ' mm'
        },
        plotOptions: {
            bar: {
                dataLabels: {
                    enabled: false
                }
            }
        },
        legend: {
           enabled: false
        },
        credits: {
            enabled: false
        },
        series: [{
            name: 'Average Annual Rainfall',
            data: [1430.0, 732.8, 557]
        }]
    });
    $('#container2').highcharts({
        chart: {
            type: 'bar'
        },
        title: {
            text: 'Average Rainy Days per Year'
        },
        xAxis: {
            categories: ['Kerry', 'Dublin', 'London'],
            title: {
                text: null
            },
            gridLineWidth: 0,
            minorGridLineWidth: 0
        },
        yAxis: {
            min: 0,
            title: {
                text: 'Days with Rainfall > 1mm',
                align: 'high'
            },
            labels: {
                overflow: 'justify'
            },
            gridLineWidth: 0,
            minorGridLineWidth: 0
        },
        tooltip: {
            valueSuffix: ' days'
        },
        plotOptions: {
            bar: {
                dataLabels: {
                    enabled: false
                }
   ...