JSFiddle - React, Tailwind, and code Playground
by Nick Hulea
HTML
<script src="http://code.highcharts.com/highcharts.js"></script>
<script src="http://code.highcharts.com/modules/exporting.js"></script>
<script src="http://www.highcharts.com/js/themes/grid.js"></script>
<div id="container" style="min-width: 400px; height: 400px; margin: 0 auto"></div>
JavaScript
$(function () {
var chart;
$(document).ready(function () {
chart = new Highcharts.Chart({
credits: {
enabled: false
},
chart: {
renderTo: 'container',
type: 'area'
},
title: {
text: 'Media Partners Analysis'
},
subtitle: {
text: ''
},
xAxis: {
categories: ['May', 'June', 'July', 'August', 'September', 'October', 'November', 'December', 'January'],
tickmarkPlacement: 'on',
title: {
enabled: false
}
},
yAxis: {
title: {
text: 'Millions'
},
labels: {
enabled: true,
formatter: function () {
return this.value/1000000;
}
}
},
tooltip: {
formatter: function () {
return '' + this.x + ': ' + Highcharts.numberFormat(this.y, 0, ',') + '';
}
},
plotOptions: {
area: {
stacking: 'normal',
lineColor: '#666666',
lineWidth: 1,
marker: {
lineWidth: 1,
lineColor: '#666666'
}
}
},
series: [{
name: 'All Attending',
data: [1757254, 325877, 745766, 1449983, 8433777, 2886006, 728498, 2654, 0]
}, {
name: 'Attending (media partners)',
data: [1757254, 325877, 745766, 1449983, 8433777, 2886006, 728498, 2654, 0]
},{
name: 'Attending (non media partners)',
data: [1757254, 325877, 745766, 1449983,...