6

I am trying to use loading option from highcharts. But I am not able to find a way to do it using highcharts-react-official package.

nero
  • 143
  • 2
  • 8

1 Answers1

9

It depends on the place where you need to use it. Both of showLoading() and hideLoading() methods are available on Chart object prototype, so for example, if you would like to use it somewhere in chart configuration (e.g load event)just call it with on this.

If you need to call that methods outside of the chart (e.g somewhere in your component), just need to do the same but using the components chart reference.

Here are the examples:

https://codesandbox.io/s/72xq1jo95q (inside of a chart config)

https://codesandbox.io/s/2xl8r2w46r (inside of component)

daniel_s
  • 3,635
  • 1
  • 8
  • 24