Chapter 2: Extending to Multiple Axes (4)

4 different indices on 4 axes

HTML

<script type="text/javascript" src="http://code.highcharts.com/highcharts.js"></script>
<body>
<div style="margin: 5px 60px 5px 5px; " id='container'></div>
</body>

JavaScript

var chart;
    $(document).ready(function() {
        chart = new Highcharts.Chart({
            chart: {
                renderTo: 'container',
                height: 250
            },
            title: {
                text: 'Market Data: Nasdaq, Dow Jones, HSI and FTSE'
            },
            subtitle: {
                text: 'Oct 8, 2012'
            },
            xAxis: {
                type: 'datetime',
                labels: {
                    formatter: function() {
                      return Highcharts.dateFormat('%I:%M %P', this.value);
                    },
                    y: 17 
                },
               gridLineDashStyle: 'dot',
               gridLineWidth: 1,
               lineWidth: 2,
               lineColor: '#92A8CD',
               tickWidth: 3,
               tickLength: 6,
               tickColor: '#92A8CD',
               minPadding: 0.02,
               maxPadding: 0.02,
               offset: 1
            },
            yAxis: [{
                title: {
                    text: 'Nasdaq'
                },
                lineWidth: 2,
                lineColor: '#4572A7',
                tickWidth: 3,
                tickLength: 6,
                tickColor: '#4572A7'
              }, {
                title: {
                    text: 'Dow Jones'
                },
                opposite: true,
                lineWidth: 2,
                lineColor: '#AA4643',
                tickWidth: 3,
                tickLength: 6,
                tickColor: '#AA4643'
              }, {
                title: {
                    text: 'Hang Seng Index'
                },
                lineWidth: 2,
                lineColor: '#89A54E',
                tickWidth: 3,
                tickLength: 6,
                tickColor: '#89A54E'
              }, {
                title: {
                    text: 'FTSE 100'
                },
                opposite: true,
                lineWidth: 2,
               ...