Chubber

Chart looses data display when DIV visibility changes

Recommended Posts

I have a number of jQuery tabs on a page. The first one (for now) has a scatter chart on it. I set the dataXML via an AJAX call and that works, as long as the chart DIV tab is showing. If a different DIV tab is visible then two things happen:

 

1) It can't set the setDataXML call, it gives me an error: chartObj.setDataXML is not a function

 

2) If the tab is visible, it loads and displays the data just fine. But if I select a different tab, then select the chart tab again, the displayed data is gone. Do I need to force a refresh every time the tab is reselected?

 

 

 

I have "hidden" the DIV two different ways, both to no avail:

 


.ui-tabs .ui-tabs-hide { display: none !important; } 

and

.ui-tabs .ui-tabs-hide { position: absolute; left: -10000px; }

 

and neither works. Both clear out the view when I restore the tab.

 

 

 

Some of my scatter charts have 1000+ points, I really don't want to redraw it every time the tab is changed.

Share this post


Link to post
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