Components attached to layout with attachObject don't resize

Hello. I have the following.

[code]

[/code] then attaching chart:

[code] prices_graph = new dhtmlXChart({
graph_name: “prices_graph”,
container:“chart1”,
view:“line”,
value:“#min_price#”,
label:“#day#”,
padding:{
top:10,
bottom:15,
left:40
},
line:{
color:“#DD4646”,
width:3
},
xAxis:{
template:“#day#”
},
tooltip:“#min_price#”,
gradient:false,
border:false
});

dhxLayoutGraph.cells(“b”).attachObject(“price_charts”);[/code]

when trying to resize layout cells by dragging the splitters chart component stays unresized. how to fix it?

ps. i know, it can be done by using attachChart method, but I need exactly such approach, i’ve described.

Hello,

try resize() method of a chart:

layout.attachEvent(“onResizeFinish”,function(){
chart.resize();
})

Thanks, Alexandra, that’s much better, but still have the problem. In my layout the div with id=‘price_charts’ is attached to one of three cells. Here is the layout creation code:

dhxLayoutGraph = dhxLayout.cells("c").attachLayout("3E");
After adding your code the Resize event handler is invoked only when the veritical splitter is dragging. When horizontal - the chart stays unresized.

Try to set onPanelResizeFinish event handler:
dhxLayoutGraph.attachEvent(“onPanelResizeFinish”,function(){
chart.resize();
})

Excellent! Now it’s working and I’m happy (:
Thank you