JSFiddle - React, Tailwind, and code Playground
by Nalin Sajwan
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/exporting.js"></script>
<div id="container" style="min-width: 400px; max-width: 600px; height: 400px; margin: 0 auto"></div>
JavaScript
$(function () {
$('#container').highcharts({
chart: {
polar: true,
type: 'line'
},
title: {
text: 'Budget vs spending',
x: -80
},
pane: {
size: '80%'
},
xAxis: {
//categories: [],
tickmarkPlacement: 'between',
lineWidth: 0,
type: 'category'
},
yAxis: {
//gridLineInterpolation: 'polygon',
lineWidth: 0,
min: 0
},
tooltip: {
shared: true,
pointFormat: '<span style="color:{series.color}">{series.name}: <b>${point.y:,.0f}</b><br/>'
},
legend: {
align: 'right',
verticalAlign: 'top',
y: 70,
layout: 'vertical'
},
series: [{
name: 'Allocated Budget',
data: [
{name: 'Sales', y: null},
{name: 'Marketing', y: 19000},
{name: 'Development', y: 60000},
{name: 'Customer Support', y: null},
{name: 'Information Technology', y: 17000},
{name: 'Administration', y: 10000}
],
pointPlacement: 'on'
}, {
name: 'Actual Spending',
data: [
{name: 'Sales', y: 50000},
{name: 'Marketing', y: 39000},
{name: 'Development', y: 42000},
{name: 'Customer Support', y: 31000},
{name: 'Information Technology', y: 26000},
{name: 'Administration', y: null}
],
pointPlacement: 'on'
}]
});
});