JSFiddle - React, Tailwind, and code Playground
by Michel Penke
HTML
<script src="http://code.highcharts.com/highcharts.js"></script>
<script src="http://code.highcharts.com/modules/exporting.js"></script>
<div id="container" style="min-width: 310px; height: 400px; margin: 0 auto"></div>
JavaScript
$(function () {
$('#container').highcharts({
chart: {
type: 'area'
},
title: {
text: 'Area chart with negative values'
},
xAxis: {
categories: ['Apples', 'Oranges', 'Pears', 'Grapes', 'Bananas']
},
credits: {
enabled: false
},
series: [{
name: 'John',
data: [5, -3, -4, 7, 2],
negativeColor: 'red',
fillColor : {
linearGradient : [0, 0, 0, 300],
stops : [
[0, 'rgb(0,141,3)'],
[1, 'rgb(0,255,6)']
]
}
}]
});
});