IbrahimMitko
IbrahimMitko

Reputation: 1207

TypeError: B is not a function when exporting

The print option has stopped working on my pie chart. I'm getting this error in the console:

enter image description here

Has there been any updates to Highcharts to make this stop working? Here are my exporting options (only need print)

exporting: {
            buttons: {
                contextButton: {
                    menuItems: [{
                        text: 'Print Chart',
                        onclick: function () {
                            this.print();
                        }
                    }]
                }
            }
        },

Upvotes: 0

Views: 1470

Answers (1)

IbrahimMitko
IbrahimMitko

Reputation: 1207

My imports weren't correct.

Since the software was upgraded, my locally hosted files conflicted with the newly updated ones.

Old

<script type="text/javascript" src="/public/site/js/highcharts.js"></script>
<script type="text/javascript" src="/public/site/js/drilldown.js"></script>
<script src="http://code.highcharts.com/modules/data.js"></script>
<script src="http://code.highcharts.com/modules/exporting.js"></script>
<script type="text/javascript">

New

<script src="https://code.highcharts.com/highcharts.js"></script>
<script src="https://code.highcharts.com/modules/data.js"></script>
<script src="https://code.highcharts.com/modules/drilldown.js"></script>
<script src="http://code.highcharts.com/modules/exporting.js"></script>
<script type="text/javascript">

Upvotes: 1

Related Questions