[ 2 posts ]

Jim Allanson

  • Offline
  • Profile

Using widgets from external libraries within YUI TabView

Post Posted: Tue Jun 19, 2012 6:05 am
+0-
Hi,

First of all, apologies if I'm making a fundamental misunderstanding here, I couldn't find anything to suggest that what I'm trying to do shouldn't be possible, but I may have been looking in the wrong places.

I'm building a UI that includes several graphs and charts which require external libraries to render (YUI doesn't seem to have the features I'm after for these). The libraries I'm using (currently JIT and HighCharts) let me simply specify a div to render to. These were working fine until I started using YUI for the UI of my application. I defined a basic TabView in HTML as shown in this example, with the div being rendered to a child of the tab div. The TabView renders fine when I do this, but the graphs stop working. Is there a reason this should happen, or am I just doing something wrong?

John Lindal

YUI Contributor

  • Username: jafl
  • Joined: Mon Nov 02, 2009 2:33 pm
  • Posts: 358
  • Location: Los Angeles, CA
  • Twitter: jafl5272
  • GitHub: jafl
  • Gists: jafl
  • Offline
  • Profile

Re: Using widgets from external libraries within YUI TabView

Post Posted: Mon Jun 25, 2012 10:05 am
+0-
Many widgets (including some in YUI) don't like being rendered into a container that isn't visible, because they size themselves based on the container's size -- which is zero when not visible. Try initializing each widget when the corresponding tab is selected.
  [ 2 posts ]
Display posts from previous:  Sort by  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum