Jump to content
GreenSock

Search In
  • More options...
Find results that contain...
Find results in...
Peter Trenery

HighCharts Compatibility - jquery.gsap

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

This is helpful. I'll play around with the code you provided. Thanks very much.

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.
×