Jump to content
Search Community

HighCharts Compatibility - jquery.gsap

Peter Trenery test
Moderator Tag

Go to solution Solved by Peter Trenery,

Warning: Please note

This thread was started before GSAP 3 was released. Some information, especially the syntax, may be out of date for GSAP 3. Please see the GSAP 3 migration guide and release notes for more information about how to update the code to GSAP 3's syntax. 

Recommended Posts

Has anyone tried to use the gsap jquery plugin with HighCharts. 

 

HighCharts animates as it displays the chart. The gsap plugin seems to break this animation.

 

I created a quick jsFiddle from the stock HighCharts jsfiddle to demonstrate: http://jsfiddle.net/ptrenery/43n82tbn/2/

 

Is it not possible to use these two libraries together?

 

Thanks,

Peter

Link to comment
Share on other sites

Yes, it looks like HighCharts is trying to hook into the native animate() method and add capabilities that aren't compatible. In this case, it's trying to animate scaleY and translateY (neither of which is natively supported by jQuery). So yes, they're basically fighting with each other for control of animate(). 

 

I attached an updated version of the jquery.gsap.js plugin that allows you to pass a comma-delimited list of property names that GSAP should ignore (passthrough), like:

$.gsap.legacyProps("scaleY,translateY");

That appears to resolve things in this case, but you may need to add more properties (I am not familiar with HighCharts or which properties they're trying to hijack in animate()). 

 

Does that help?

jquery.gsap.js_0.1.10.zip

  • Like 1
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...