Wind/polar chart SEO comp

by Mike Rawling

HTML

<script src="https://code.highcharts.com/highcharts.js"></script>
<script src="https://code.highcharts.com/highcharts-more.js"></script>
<script src="https://code.highcharts.com/modules/data.js"></script>
<script src="https://code.highcharts.com/modules/exporting.js"></script>
<script src="https://code.highcharts.com/modules/export-data.js"></script>

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

<div style="display:none">
    <!-- Source: http://or.water.usgs.gov/cgi-bin/grapher/graph_windrose.pl -->
    <table id="freq" border="0" cellspacing="0" cellpadding="0">
        <tr nowrap bgcolor="#CCCCFF">
            <th colspan="9" class="hdr">Table of Frequencies (percent)</th>
        </tr>
        <tr nowrap bgcolor="#CCCCFF">
            <th class="freq">Direction</th>
            <th class="freq">Bertolli.co.uk</th>
            <th class="freq">Filippoberio.co.uk</th>
            <th class="freq">Bonelli.co.uk</th>
            <th class="freq">DeCecco.co.uk</th>
            <th class="freq">Pompeiam.co.uk</th>
        </tr>
        <tr nowrap>
            <td class="dir">Domain Authority</td>
            <td class="data">1.81</td>
            <td class="data">1.78</td>
            <td class="data">0.16</td>
            <td class="data">0.00</td>
            <td class="data">0.00</td>
        </tr>        
        <tr nowrap bgcolor="#DDDDDD">
            <td class="dir">Technical Audit</td>
            <td class="data">0.62</td>
            <td class="data">1.09</td>
            <td class="data">0.00</td>
            <td class="data">0.00</td>
            <td class="data">0.00</td>
        </tr>
        <tr nowrap>
            <td class="dir">Shared Links</td>
            <td class="data">0.82</td>
            <td class="data">0.82</td>
            <td class="data">0.07</td>
            <td class="data">0.00</td>
            <td class="data">0.00</td>
        </tr>
        <tr nowrap bgcolor="#DDDDDD">
  ...

JavaScript

// Parse the data from an inline table using the Highcharts Data plugin
Highcharts.chart('container', {
    data: {
        table: 'freq',
        startRow: 1,
        endRow: 10,
        endColumn: 7
    },

    chart: {
        polar: true,
        type: 'column'
    },

    title: {
        text: 'Serpico Competitor SEO Report'
    },

    subtitle: {
        text: '1500 05/11/18'
    },

    pane: {
        size: '100%'
    },

    legend: {
        align: 'right',
        verticalAlign: 'top',
        y: 50,
        layout: 'vertical'
    },

    xAxis: {
        tickmarkPlacement: 'on'
    },

    yAxis: {
        min: 0,
        endOnTick: false,
        showLastLabel: true,
        title: {
            text: '%'
        },
        labels: {
            formatter: function () {
                return this.value + '%';
            }
        },
        reversedStacks: false
    },

    tooltip: {
        valueSuffix: '%'
    },

    plotOptions: {
        series: {
            stacking: 'normal',
            shadow: false,
            groupPadding: 0,
            pointPlacement: 'on'
        }
    }
});