Hi All i am adding Highcharts directly to one of screen in reactive web app where i got that error "Highcharts are not defined" i want to add script directly without charts in OS.
This is the script that i want to add on screen for rendering Highcharts. Here i am created a event OnInitiaize in that event am add javascript with the script.
Here i am ading javascript onReady Event
Here Is My CSS For Highcharts in OnReady Event.
Here my javascript and css appear in head section.
Hi Apoorv,
I didn't try the mentioned implementation. But based on the error, it clearly states that the Highcharts global object is not yet available during the OnReady JS initialization script got executed (it might be caused bcz of the delay in loading the referenced external JS library). So instead, I would suggest you use the RequireScript client action from Systems Module in the OnInitialize client action of the screen to load the required external JS.
See this demo screen: PieChartDemo
Refer to the attached .oml file
I hope this helps you!
Kind regards,
Benjith Sam
Thankyou Benjith Sam It Works ;)
You're welcome, Apoorv,
Glad to help you :)
Hi @Benjith Sam,
your solution works and it's exactly the way I've used to solve similar scenarios where we need to add external JS libraries.
The problem is when we have the RequiredScript client action being called the OnInitialize event of a screen, Service Studio displays a warning message like this
"Performance Warning: 'OnInitialize' contains accesses to the local storage or server, which delays the screen's render. To avoid performance issues, use Aggregates or Data Actions instead.".
I'm wondering if anyone else have the same issue and how can we solve it?
Regards
Thanks
I think the best thing is to create a question and reference this question mate. There is no need to wake up a thread from August.
But I think you need to do that on OnReady or OnRender events. I am not sure.
Regards,
Márcio
Hi @Marcio, agreed I should have opened a new post and I'll.
Thanks anyway