JSFiddle - React, Tailwind, and code Playground

HTML

<link rel="stylesheet" href="http://twitter.github.com/bootstrap/assets/css/bootstrap.css">
<script type="text/javascript" src="http://highcharts.com/js/highcharts.js"></script>
    <script type="text/javascript" src="http://highcharts.com/js/modules/exporting.js"></script>

    <p>Add Custom button to the exporting </p>
    <div id="container1" style="width:400px; height: 220px;"></div>


<div class="modal hide fade" id="myModal">
  <div class="modal-header">
    <a class="close" data-dismiss="modal">×</a>
    <h3>Modal header</h3>
  </div>
  <div class="modal-body">
    <p>One fine body…</p>
  </div>
  <div class="modal-footer">
    <a href="#" class="btn" data-dismiss="modal">Close</a>
    <a href="#" class="btn btn-primary">Save changes</a>
  </div>
</div>

JavaScript

var chart1;
        $(document).ready(function () {

            // Add Custom button to highchart
            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]
                }],
                 exporting: {
                        buttons: {
                            'non-arrow functions are forbidden': {
                                _id: 'exportTo',
                                symbol: 'diamond',
                                x: -62,
                                symbolFill: '#B5C9DF',
                                hoverSymbolFill: '#779ABF',
                                onclick: function () {
                                    showDialog(this);
                                }
                            }
                        }
                    }
                
            });


 var showDialog = function (selectedChart) {

                var modal = $("#myModal").modal();
                $('#btnSaveImage').click(function () {
                    saveChartInNas(selectedChart);
                    modal.modal('hide');
                });
            };
        });