diff --git a/src/main/java/com/andrewlalis/perfin/view/component/module/PieChartModule.java b/src/main/java/com/andrewlalis/perfin/view/component/module/PieChartModule.java index 79fe381..b9b59ce 100644 --- a/src/main/java/com/andrewlalis/perfin/view/component/module/PieChartModule.java +++ b/src/main/java/com/andrewlalis/perfin/view/component/module/PieChartModule.java @@ -4,6 +4,7 @@ import com.andrewlalis.perfin.data.AccountRepository; import com.andrewlalis.perfin.data.TimestampRange; import com.andrewlalis.perfin.data.util.ColorUtil; import com.andrewlalis.perfin.model.Profile; +import com.andrewlalis.perfin.view.BindingUtil; import javafx.application.Platform; import javafx.collections.FXCollections; import javafx.collections.ObservableList; @@ -52,6 +53,7 @@ public abstract class PieChartModule extends DashboardModule { this.timeRangeChoiceBox.getItems().addAll(RANGE_CHOICES); this.timeRangeChoiceBox.getSelectionModel().select("All Time"); + this.currencyChoiceBox.managedProperty().bind(this.currencyChoiceBox.visibleProperty()); PieChart chart = new PieChart(chartData); chart.setLegendVisible(false); @@ -136,6 +138,7 @@ public abstract class PieChartModule extends DashboardModule { } else { currencyChoiceBox.getSelectionModel().selectFirst(); } + currencyChoiceBox.setVisible(orderedCurrencies.size() > 1); }); }); }