ElementStacks

by nate

HTML

<script src="http://highcharts.com/js/testing.js"></script>
<div id="container" style="height: 400px"></div>

JavaScript

var chart = new Highcharts.Chart({
    "chart": {
        "renderTo": "container",  
        "width": 545,
        "height": 700,
        "marginLeft": 50,
        "spacingBottom": 100
    },
    "credits": {
        "enabled": false
    },
    "legend": {
        "reversed": true
    },
    tooltip: {
        formatter: function() {
            console.log( this );
            return Math.abs( this.y ) + '% of respondents said this was<b>' + this.point.series.name.toLowerCase() + '</b>';
        }
    },
    "xAxis": [
        {
        lineWidth: 0, // hide the axis
        tickWidth: 0, // hide the tick marks
        "labels": {
            "align": "left",
            "x": 3,
            "y": -14,
             "style": {
                 width: "545px"
             }
        },
        "categories": [
            "Cardiac surgery (including bypass and/or MAZE procedure)",
            "Catheter ablation (removal of tissue blockage)",
            "Implanted pacemaker",
            "Implanted defibrillator",
            "Prescription medication, including anti-coagulants (blood thinners)",
            "Minimally invasive arrhythmia surgery",
            "Expectant management/wait-and-see approach",
            "Other",
            "Reducing caffeine",
            "Dietary changes"
        ],
        reversed: false
    },
    {                            
        opposite: true,
        reversed: false,
        lineWidth: 0            
    }
    ],
    "yAxis": {
         labels: {
             enabled: false
         },
        "title": {
            "margin": 35,
            "style": {
                "color": "#666666"
            },
            "text": "% of Survey Respondents"
        },
        "gridLineWidth": 0
    },
    "title": {
        "text": "At Home Treatments"
    },
    "colors": [
        "#DD5F47",
        "#CCF2B3",
        "#15990E"
    ],
    "plotOptions": {
        "bar": {
            "stacking": "normal"
        },
        "series": {
...