JSFiddle - React, Tailwind, and code Playground
HTML
<script src="http://highcharts.com/js/testing-stock-exporting.js"></script>
<div id="container" style="height: 400px; margin-top: 1em"></div>
JavaScript
Highcharts.Renderer.prototype.symbols.yourIcon = function (x, y, radius) {
return [
'M', // the disk
x - radius, y - radius,
'L',
x + radius, y - radius,
x + radius, y + radius,
x - radius, y + radius,
'Z'
];
};
var chart = new Highcharts.Chart({
chart: {
renderTo: 'container'
},
credits: {
enabled: false
},
xAxis: {
categories: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']
},
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]
}],
exporting: {
buttons: {
yourButton: {
symbol: 'yourIcon',
x: -62,
symbolFill: '#B5C9DF',
hoverSymbolFill: '#779ABF',
onclick: function () {
alert('click!');
}
}
}
}
});