JSFiddle - React, Tailwind, and code Playground
by Sibeesh Venu
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>
<div id="container2" style="width: 150px; height: 150px; margin: 0 auto; position:absolute; top: 120px; left: 150px;"></div>
JavaScript
$(function () {
$('#container').highcharts({
title: {
text: 'Worked hours in a week'
},
xAxis: {
categories: ['Apples', 'Oranges', 'Pears', 'Bananas', 'Plums']
},
series: [{
type: 'column',
name: 'Monday',
data: [3, 2, 1, 3, 4]
}, {
type: 'column',
name: 'Tuesday',
data: [2, 3, 5, 7, 6]
}, {
type: 'column',
name: 'Wednesday',
data: [4, 3, 3, 9, 0]
}, {
type: 'column',
name: 'Thursday',
data: [4, 3, 3, 9, 0]
}, {
type: 'column',
name: 'Friday',
data: [4, 3, 3, 9, 0]
}, {
type: 'spline',
name: 'Thursday',
data: [3, 2.67, 3, 6.33, 3.33],
marker: {
lineWidth: 2,
lineColor: Highcharts.getOptions().colors[3],
fillColor: 'white'
}
}]
});
$('#container2').highcharts({
chart: {
backgroundColor: 'rgba(0,0,0,0)'
},
title: {
text: null
},
exporting: {
enabled: false
},
credits: {
enabled: false
},
series: [{
type: 'pie',
name: 'Total',
data: [{
name: 'Monday',
y: 13,
color: Highcharts.getOptions().colors[0]
}, {
name: 'Tuesday',
y: 23,
color: Highcharts.getOptions().colors[1]
}, {
name: 'Wednesday',
y: 19,
color: Highcharts.getOptions().colors[2]
}, {
name: 'Thursday',
y: 19,
color: Highcharts.getOptions().colors[2]
}, {
name: 'Friday',
y: 19,
...