public void changed(ObservableValue<? extends Toggle> ov, Toggle toggle, Toggle new_toggle) {

                if (new_toggle == null) {
                    toggle.setSelected(true);
                    return;
                }

                //System.out.println(DataRange.valueOf((String)new_toggle.getUserData()));
                //selectedRange = DataRange.valueOf((String)new_toggle.getUserData());
                selectedChart = new_toggle.getUserData().toString();
                ((ToggleButton)rangeGroup.getToggles().get(0)).setDisable(selectedChart.equals("candle"));
                //System.out.println("!!!!!!!!!!!!!!!"+selectedChart);
                OnChartTypeChanged(selectedChart);
            }