When in a screen where another Highchart exists (i.e. OutSystems chart), the Gantt chart does not load and an error is thrown "Highcharts.ganttChart is not a function".
I believe this might be due to a conflict between scripts that are being loaded that are related to Highcharts.
A simple way to replicate this is to create a screen and add a Gantt chart and an OutSystems chart and load it.
Hi Diogo,
this is probably because the Gantt Highcharts asset is using a more recent version of Highcharts than Outsystems, and the version Outsystems is using doesn't have support for Gantt charts.
As a library or class can only be loaded/defined once, it is a matter of making sure the most recent one gets loaded first. To test this, move your OS chart below the Gantt chart, and then the problem should not occur.
So far for the explanation, this doesn't offer a solution yet.
The problem is not only when the OS chart is before the Gantt chart on a screen, also when your application starts on a screen with OS chart, and then flows to screen with Gantt, you will get the same problem (i guess, highcharts object doesn't get destroyed and recreated just because of a screen flow, or something like that)
As a patch / workaround, this will do it, but it is far from desirable :
something similar to this GanttChartProtector Webblock:
Dorine
Thanks for the tip Dorine!
This solved the problem. Many thanks!
Hello Dorine,
your solution seems to not be working on my scenario.
Even on scripts the recent ones, are being loaded first.
I have attached a picture.
Could you provide a oml example?Thanks
@Sergio,
that oml is long gone.
if you share yours, I'll have a look
Hello Diogo,
I didn't notice your post. Glad if Dorine gave you solution for your problem.
Regards
It seems a interesting challenge... I'll try to arrange sometime to think about that.
I've never been through this situation before!