question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

How to "wrap" the highcharts like in JQuery way?

See original GitHub issue

This can be a more general question, however as an example, let’s say I would like to wrap highcharts the following way as a work around of the issue of https://github.com/highcharts/highcharts/issues/6149

this is how people will do in pure highcharts JQuery way.

(function(H)
 {
  H.wrap(H.Axis.prototype, 'render', function(p) {
    p.apply(this, Array.prototype.slice(arguments, 1));
    this.extKey = this.min + ',' + this.max;
  });
})(Highcharts);

Highcharts.stockChart('container', {
.... 
})

How to implement certain wrapper in react-highcharts?

thank you.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:6 (1 by maintainers)

github_iconTop GitHub Comments

2reactions
bfang711commented, Feb 21, 2018

Seems like the following script pollute all the highcharts that I’ve been using.

(function(H){
  H.wrap(H.Axis.prototype, 'render', function(p) {
    p.apply(this, Array.prototype.slice(arguments, 1));
    this.extKey = this.min + ',' + this.max;
  });
})(ReactHighstock.Highcharts);

In one example, let’s say in one page, I have a element class A written in A.jsx, and a element class B written in B.jsx, both of which need to render different <ReactHighStock/> elements. and I only need the wrapped functionality working on element B, not in element A. How can I do that?
I wrote the wrap function in B.jsx, hoping only B’s <ReactHighstock/> get affected. However both A and B get affected. How can I do this?

thank you.

0reactions
kirjscommented, Oct 13, 2019

Closing and there has been no activity in this issue for a while. if this is still relevant, please feel free to reopen

Read more comments on GitHub >

github_iconTop Results From Across the Web

Explanation of why I need to wrap a highcharts jquery event in ...
I find it really weird that the load event manages to fire before all of the data that is supposed to be present...
Read more >
Extending Highcharts
In Highcharts we created a utility called wrap , which wraps an existing prototype function ("method") and allows you to add your own...
Read more >
Jquery Plugin Functionality without the Jquery - Highcharts
hi httpete, There is no highcharts() method required to create chart in some div. You could do it without using jQuery, by calling...
Read more >
Custom Preprocessing | Highcharts
This example shows how to set up the basic chart options first, then do an ajax call for the data, parse the data...
Read more >
Multiple Chart Configurations / Customization in HighStock
To change shape as you want you would need to wrap drawCrosshair function and add some modification to it. Another way - you...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found