View Full Version : Graph rendering only halfway

9 Nov 2011, 5:21 AM
Hey gurus!

Noob with a question!

Im having a problem with rendering as seen in attached image.


I have a vieport, containing a border layout. When I click elements in the west layout element I want to change what is seen in the center area. The center layout has a div with
id = content
Depending on what is clicked I trigger functions that create a Panel containing the stuff I want. I tell the panels where to render by
renderTo: 'content'
This is working wonderfully except that it draws only half. If I re-size the browser or drag a border inside any element it is re-rendered to show the whole element. No difference what browser is used.

I have tried (among others):

Any hints?

9 Nov 2011, 7:08 AM
Why are you using renderTo?

You center region should be a Container using fit layout. When you click on something in the west region, you add a chart to the center region's container.

10 Nov 2011, 12:37 AM
Thanks for you reply.

Im using renderTo because it sounds like the most logical command to use and many examples also use it...

you add a chart to the center region's container.

Could you give a hint towards how i add the chart to the container?
Something like have all my charts inside it and hide all but the one i want to show? Using graph.show() and graph.hide()?

10 Nov 2011, 3:36 AM
Figured it out and now its working as it should.

If someone else ends up here with a similar problem this is my setup:
1. Init global variables ie. historyChart, radarChart, table1
2. Use these global variables for my graphs. No renderTo at all.

historyChart = new Ext.chart.Chart({
3. Draw the layout and in there add my graphs as items:

items:[historyChart, radarChart, table1]
4. Show and hide these with