I'm trying to load highcharts in a custom admin form, but it comes out as undefined in my module.
My requirejs-config.js
var config = {
paths: {
'highcharts': 'http://code.highcharts.com/highcharts',
},
shim: {
'highcharts': {
deps: ['jquery']
}
}
}
How I'm calling it in my pthml:
<div id="customer-graph"></div>
<script type="text/javascript">
require(["jquery","highcharts"], function ($, hc) {
console.log(hc) //undefined
hc.chart('customer-graph') //call chart on undefined
});
</script>
I've looked at all the other posts about requirejs and highcharts and couldn't find any solution to my issue. Can you help ?