JSFiddle - React, Tailwind, and code Playground
HTML
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.5.2/jquery.min.js"></script>
<script type="text/javascript" src="http://code.highcharts.com/highcharts.js"></script>
<script type="text/javascript" src="http://code.highcharts.com/modules/exporting.js"></script>
<button id="print">Print All</button>
<p>There are three charts on this page.</p>
<p>Only the charts will print when you click the <em>Print All</em> button.</p>
<div id="container1" style="width:400px; height: 220px;"></div>
<div id="container2" style="width:400px; height: 220px;"></div>
<div id="container3" style="width:400px; height: 220px;"></div>
JavaScript
var chart1, chart2, chart3;
$(document).ready(function () {
//--------------------------------------------------------------------
chart1 = new Highcharts.Chart({
chart: {
renderTo: 'container1',
shadow: true
},
title: { text: 'Sales' },
xAxis: {
categories: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']
},
yAxis: { title: { text: '$'} },
series: [{
data: [29.9, 71.5, 106.4, 129.2, 144.0, 176.0, 135.6, 148.5, 216.4, 194.1, 95.6, 54.4]
}]
});
//--------------------------------------------------------------------
chart2 = new Highcharts.Chart({
chart: {
renderTo: 'container2',
type: 'column',
shadow: true
},
title: { text: 'Inventory' },
xAxis: {
categories: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']
},
yAxis: { title: { text: '$'} },
series: [{
data: [176.0, 135.6, 148.5, 216.4, 194.1, 95.6, 54.4, 29.9, 71.5, 106.4, 129.2, 144.0]
}]
});
//--------------------------------------------------------------------
chart3 = new Highcharts.Chart({
chart: {
renderTo: 'container3',
type: 'spline',
shadow: true
},
title: { text: 'Expenses' },
xAxis: {
categories: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']
},
yAxis: { title: { text: '$'} },
...