How to reference the native highcharts library from NetSuite
We are looking at creating some custom charts within a Portlet. I know that NetSuite natively uses Highcharts for their display. Does anyone know the fqdn to include the highcharts javascript library for use with SuiteScript?
I don’t have the answer, but something for you to think about. (not preaching, just a friendly warning)
You probably shouldn’t based on the fact NS will be paying a license to use it and that likely doesn’t extend to you using it.
That being said, if you’re using it client side you can probably dig through the console and see how they reference the object(s).
Just be warned, if they ever move away from using it (as they will be doing with EXTjs), your code will fail.
Understood on basing it on a NetSuite library and it’s their prerogative if they want to switch away from that. I can do some digging in the js requests and hope it’s not aggregated in a bigger library file. Was just wondering if anyone else had done custom charts using the built-in highcharts library.
My recommendation would be to download highcharts yourself and upload a copy to the File Cabinet. You can then reference it like any other module from the File Cabinet. You may need to shim it if highcharts is not distributed as an AMD module. This puts you in control of what version is in use and where it lives, and protects you from NetSuite abandoning highcharts.
The issue with using HighCharts directly is their licensing. As far as I can tell, this would fall under an OEM license (since we’re not the ones hosting it), and that’s more than I want to pay just to have charts show up in the same style as the NetSuite native ones when we need charting outside the bounds of what’s possible within NetSuite.