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

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)'
          }
        });
      }
    }
  }

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

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

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

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.

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