How to show dhtmlxCharts in dhtmlxWindoes?

Hi,

I wonder how to show dhtmlxChart in a window witout using iframe.

I tried the following function but didn’t work:

dhxToolbar.attachEvent("onClick", function onClickToolbarMenu(itemId){
      switch (itemId) {
	case "stats":
	    var dhxWins = new dhtmlXWindows();
	    dhxWins.setImagePath("dx/dhtmlxWindows/codebase/imgs/");
	    dhxWins.setSkin("dhx_skyblue");
	    CSVwindow = dhxWins.createWindow("w2", 150, 150,600, 450);
	    CSVwindow.setModal(true);
	    CSVwindow.setText("Variants Types");
	    var data = [
		{ sales:2.9, year:"2000" },
		{ sales:3.5, year:"2001" },
		{ sales:7.6, year:"2009" }
	    ];
	     var chart =  new dhtmlXChart({
		view: "pie",
		container: "dhtmlx_wins_body_inner",
		value: "{obj.sales}",
		label: "{obj.year}"
	    });
	    chart.parse(data,"json");
      }
});

Final version will support (will be released in few days)

var chart = CSVwindow.attachChart({ view: "pie", container: "dhtmlx_wins_body_inner", value: "{obj.sales}", label: "{obj.year}" })

Hello,

I wonder how to show dhtmlxChart in a window witout using iframe.

You can use attachChart method recommended by Stanislav. Please find the demo in Suite package:

dhtmlxSuite/samples/dhtmlxChart/09_integration/03_windows.html