insertChartAtDialog.addEventListener("onClose", new EventListener() {
@Override
public void onEvent(Event event) throws Exception {
Map data = (Map)event.getData();
ChartType chartType = (ChartType) insertChartAtDialog.getAttribute("chartType");
insertChartAtDialog.setAttribute("chartType", null); //clear it
if (data != null && chartType != null) {
Integer col = (Integer) data.get("column");
Integer row = (Integer) data.get("row");
getWorkbookCtrl().addChart(row, col, chartType);