In Highchart OS11 events: {  load: function () not working
Question

Chart event load function not apply in advance format Highchart.json , click event working fine load event not working



chart: {
    type: 'spline',
    events: {
      load: function() {
        var chart = this,
          points = chart.series[0].points,
          maxValue,
          chosenPoint;

        points.forEach(function(point, index) {
          if (!maxValue || maxValue < point.y) {
            maxValue = point.y;
            chosenPoint = point;
          }
        });

        chosenPoint.update({
          marker: {
            symbol: 'url(https://www.highcharts.com/samples/graphics/sun.png)'
          }
        });
      }
    }
  }

mvp_badge
MVP

Hi


Could you please share screen shot of error, What you are getting?

No error print on console , I print alert but it is not print

mvp_badge
MVP

Aarti Salunkey wrote:

No error print on console , I print alert but it is not print

it seems your Highchart JS not initializing at the time of load.
Could you please try to again call your JS on load.you can add some alert to make sure your JS is loading correctly on firstime


Salman Ansari wrote:

Aarti Salunkey wrote:

No error print on console , I print alert but it is not print

it seems your Highchart JS not initializing at the time of load.
Could you please try to again call your JS on load.you can add some alert to make sure your JS is loading correctly on firstime


Can you Please share some example how to call Highchart json js at the time of loading

mvp_badge
MVP

Aarti Salunkey wrote:

Salman Ansari wrote:

Aarti Salunkey wrote:

No error print on console , I print alert but it is not print

it seems your Highchart JS not initializing at the time of load.
Could you please try to again call your JS on load.you can add some alert to make sure your JS is loading correctly on firstime


Can you Please share some example how to call Highchart json js at the time of loading


In our screen preparation we need to take one javascript widget and paste our JS code there.This way our JS will be initialize.

If possible you can share oml in that you are facing issue So that i can check that.

Hi Aarti,


I will suggest you, first test your json in demo charts provided in Highcharts website.. If it work according to your requirement then it will work here. May be very small thing we are missing in your code. Please can you verify once.

Working in highcharts with complex logic it always interesting.

Regards,

Rajat Agrawal

Try to use this component.. It is deprecated but it will show you in demo app how to use highcharts in different cases like on load etc.

https://www.outsystems.com/forge/component-overview/196/highchartscomponent



Hi all.. same problem here,

I'm using highcharts in a reactive app and just want to trigger something when the chart is loaded. 

Using the advanced format, the "DataSeriesFormat" works fine, the chart itself works fine, but the HighChartsJSON does not run this simple console.log :By the way, it would be interesting if there were a "OnLoad" event like the "OnClick", but for now.. does anyone know a way to get this event?

My goal is to call a screen action after the chart is loaded.


Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.