ChartViewContainer viewContainer = AnalysisChartTopComponent.selected().get().viewContainer();
nameMapResult.put("Option", new Integer(JOptionPane.CANCEL_OPTION));
if (viewContainer != null) {
BaseTSer baseSer = viewContainer.controller().baseSer();
nameMapResult.put("nUnits", new Integer(baseSer.freq().nUnits()));
nameMapResult.put("unit", baseSer.freq().unit());
} else {
nameMapResult.put("nUnits", new Integer(1));
nameMapResult.put("unit", JavaWrapper.TUnitDay().MODULE$);
}