Skip to content

Commit

Permalink
Merge pull request #2237 from ripcurlx/fix-chart-rendering
Browse files Browse the repository at this point in the history
Clear and re-assign series to fix rendering issues.
  • Loading branch information
ManfredKarrer authored Jan 10, 2019
2 parents f25d8c8 + 190d2d5 commit 1a77ee6
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -336,6 +336,7 @@ private void createChart() {
private void updateChartData() {
seriesBuy.getData().clear();
seriesSell.getData().clear();
areaChart.getData().clear();

final Optional<XYChart.Data> buyMinOptional = model.getBuyData().stream()
.min(Comparator.comparingDouble(o -> (double) o.getXValue()))
Expand Down Expand Up @@ -369,6 +370,7 @@ private void updateChartData() {
seriesBuy.getData().addAll(model.getBuyData());
//noinspection unchecked
seriesSell.getData().addAll(model.getSellData());
areaChart.getData().addAll(seriesBuy, seriesSell);
}

private Tuple4<TableView<OfferListItem>, VBox, Button, Label> getOfferTable(OfferPayload.Direction direction) {
Expand Down

0 comments on commit 1a77ee6

Please sign in to comment.