From 9dab4fd65a88960c943546c029169238c692866f Mon Sep 17 00:00:00 2001 From: chimp1984 Date: Fri, 5 Feb 2021 15:48:44 -0500 Subject: [PATCH] Add total issuance and total burned series --- .../resources/i18n/displayStrings.properties | 2 + desktop/src/main/java/bisq/desktop/bisq.css | 12 ++- .../desktop/components/chart/ChartView.java | 60 +++++++----- .../supply/DaoEconomyDataProvider.java | 59 ++++-------- .../main/dao/economy/supply/SupplyView.java | 15 +-- .../supply/chart/DaoEconomyChartModel.java | 19 +++- .../supply/chart/DaoEconomyChartView.java | 96 ++++++++++--------- .../src/main/java/bisq/desktop/theme-dark.css | 5 +- .../main/java/bisq/desktop/theme-light.css | 5 +- 9 files changed, 141 insertions(+), 132 deletions(-) diff --git a/core/src/main/resources/i18n/displayStrings.properties b/core/src/main/resources/i18n/displayStrings.properties index e71ea804b6..82210faefa 100644 --- a/core/src/main/resources/i18n/displayStrings.properties +++ b/core/src/main/resources/i18n/displayStrings.properties @@ -2443,6 +2443,8 @@ dao.factsAndFigures.supply.reimbursement=Reimbursement requests dao.factsAndFigures.supply.genesisIssueAmount=BSQ issued at genesis transaction dao.factsAndFigures.supply.compRequestIssueAmount=BSQ issued for compensation requests dao.factsAndFigures.supply.reimbursementAmount=BSQ issued for reimbursement requests +dao.factsAndFigures.supply.totalIssued=Total issues BSQ +dao.factsAndFigures.supply.totalBurned=Total burned BSQ dao.factsAndFigures.supply.chart.tradeFee.toolTip={0}\n{1} diff --git a/desktop/src/main/java/bisq/desktop/bisq.css b/desktop/src/main/java/bisq/desktop/bisq.css index 9e16c8a270..17a8ba8b46 100644 --- a/desktop/src/main/java/bisq/desktop/bisq.css +++ b/desktop/src/main/java/bisq/desktop/bisq.css @@ -1744,6 +1744,9 @@ textfield */ #charts-dao .default-color4.chart-series-line { -fx-stroke: -bs-chart-dao-line5; } #charts-dao .default-color4.chart-line-symbol { -fx-background-color: -bs-chart-dao-line5, -bs-chart-dao-line5; } +#charts-dao .default-color5.chart-series-line { -fx-stroke: -bs-chart-dao-line6; } +#charts-dao .default-color5.chart-line-symbol { -fx-background-color: -bs-chart-dao-line6, -bs-chart-dao-line6; } + #charts-legend-toggle0 { -jfx-toggle-color: -bs-chart-dao-line1 } @@ -1759,6 +1762,9 @@ textfield */ #charts-legend-toggle4 { -jfx-toggle-color: -bs-chart-dao-line5; } +#charts-legend-toggle5 { + -jfx-toggle-color: -bs-chart-dao-line6; +} #charts-dao .chart-series-line { -fx-stroke-width: 2px; @@ -1785,11 +1791,15 @@ textfield */ } #chart-navigation-label { - -fx-tick-label-fill: -bs-rd-font-lighter; + -fx-text-fill: -bs-rd-font-lighter; -fx-font-size: 0.769em; -fx-alignment: center; } +#chart-navigation-center-pane { + -fx-background-color: -bs-progress-bar-track; +} + /******************************************************************************************************************** * * * Highlight buttons * diff --git a/desktop/src/main/java/bisq/desktop/components/chart/ChartView.java b/desktop/src/main/java/bisq/desktop/components/chart/ChartView.java index 6fa3848940..b7d2dd988d 100644 --- a/desktop/src/main/java/bisq/desktop/components/chart/ChartView.java +++ b/desktop/src/main/java/bisq/desktop/components/chart/ChartView.java @@ -38,6 +38,7 @@ import javafx.scene.layout.Region; import javafx.scene.layout.VBox; import javafx.geometry.Insets; +import javafx.geometry.Pos; import javafx.beans.value.ChangeListener; @@ -47,6 +48,7 @@ import java.text.DateFormat; import java.text.SimpleDateFormat; import java.util.ArrayList; +import java.util.Collection; import java.util.Date; import java.util.HashMap; import java.util.HashSet; @@ -70,7 +72,6 @@ public abstract class ChartView extends ActivatableView dividerNodes = new ArrayList<>(); private final Double[] dividerPositions = new Double[]{0d, 1d}; - private HBox legendBox; private boolean pressed; private double x; private ChangeListener widthListener; @@ -91,25 +92,35 @@ public abstract class ChartView extends ActivatableView> seriesForLegend2 = getSeriesForLegend2(); + HBox legendBox2 = null; + if (seriesForLegend2 != null && !seriesForLegend2.isEmpty()) { + legendBox2 = getLegendBox(seriesForLegend2); + } + timelineLabels = new HBox(); VBox box = new VBox(); - int paddingRight = 60; - VBox.setMargin(splitPane, new Insets(20, paddingRight, 0, 0)); - VBox.setMargin(timelineLabels, new Insets(0, paddingRight, 0, 0)); - VBox.setMargin(legendBox, new Insets(10, paddingRight, 0, 0)); - box.getChildren().addAll(splitPane, timelineLabels, legendBox); - - VBox vBox = new VBox(); - vBox.setSpacing(10); - vBox.getChildren().addAll(chart, box); - + int paddingRight = 89; + int paddingLeft = 15; + VBox.setMargin(splitPane, new Insets(0, paddingRight, 0, paddingLeft)); + VBox.setMargin(timelineLabels, new Insets(0, paddingRight, 0, paddingLeft)); + VBox.setMargin(legendBox1, new Insets(10, paddingRight, 0, paddingLeft)); + box.getChildren().addAll(splitPane, timelineLabels, legendBox1); + if (legendBox2 != null) { + VBox.setMargin(legendBox2, new Insets(-20, paddingRight, 0, paddingLeft)); + box.getChildren().add(legendBox2); + } root.getChildren().addAll(chart, box); } + protected abstract Collection> getSeriesForLegend1(); + + protected abstract Collection> getSeriesForLegend2(); + /////////////////////////////////////////////////////////////////////////////////////////// // Lifecycle @@ -117,7 +128,7 @@ public abstract class ChartView extends ActivatableView extends ActivatableView { + protected HBox getLegendBox(Collection> data) { + HBox hBox = new HBox(); + hBox.setSpacing(10); + data.forEach(series -> { AutoTooltipSlideToggleButton toggle = new AutoTooltipSlideToggleButton(); + toggle.setMinWidth(200); + toggle.setAlignment(Pos.TOP_LEFT); String seriesName = series.getName(); toggleBySeriesName.put(seriesName, toggle); toggle.setText(seriesName); toggle.setId("charts-legend-toggle" + seriesIndexMap.get(seriesName)); toggle.setSelected(true); toggle.setOnAction(e -> onSelectToggle(series, toggle.isSelected())); - legendBox.getChildren().add(toggle); + hBox.getChildren().add(toggle); }); - spacer = new Region(); + Region spacer = new Region(); HBox.setHgrow(spacer, Priority.ALWAYS); - legendBox.getChildren().add(spacer); + hBox.getChildren().add(spacer); + return hBox; } private void onSelectToggle(XYChart.Series series, boolean isSelected) { diff --git a/desktop/src/main/java/bisq/desktop/main/dao/economy/supply/DaoEconomyDataProvider.java b/desktop/src/main/java/bisq/desktop/main/dao/economy/supply/DaoEconomyDataProvider.java index e23068585c..92ed0a1855 100644 --- a/desktop/src/main/java/bisq/desktop/main/dao/economy/supply/DaoEconomyDataProvider.java +++ b/desktop/src/main/java/bisq/desktop/main/dao/economy/supply/DaoEconomyDataProvider.java @@ -35,6 +35,7 @@ import java.util.HashMap; import java.util.Map; import java.util.Set; import java.util.concurrent.ConcurrentHashMap; +import java.util.function.BinaryOperator; import java.util.function.Function; import java.util.function.Predicate; import java.util.stream.Collectors; @@ -96,17 +97,6 @@ public class DaoEconomyDataProvider { .sum(); } - /** - * @param fromDate Epoch in millis - * @param toDate Epoch in millis - */ - /* public long getBtcTradeFeeAmount(long fromDate, long toDate) { - return getBurnedBtcByMonth(getPredicate(fromDate, toDate)).values() - .stream() - .mapToLong(e -> e) - .sum(); - }*/ - /** * @param fromDate Epoch in millis * @param toDate Epoch in millis @@ -147,49 +137,38 @@ public class DaoEconomyDataProvider { } public Map getMergedCompensationMap(Predicate predicate) { - return getMergedMap(daoStateService.getIssuanceSetForType(IssuanceType.COMPENSATION), - DaoEconomyHistoricalData.COMPENSATIONS_BY_CYCLE_DATE, - predicate); + Map issuedBsqByMonth = getIssuedBsqByMonth(daoStateService.getIssuanceSetForType(IssuanceType.COMPENSATION), predicate); + Map historicalIssuanceByMonth = getHistoricalIssuanceByMonth(DaoEconomyHistoricalData.COMPENSATIONS_BY_CYCLE_DATE, predicate); + return getMergedMap(issuedBsqByMonth, historicalIssuanceByMonth, (daoDataValue, staticDataValue) -> staticDataValue); } public Map getMergedReimbursementMap(Predicate predicate) { - return getMergedMap(daoStateService.getIssuanceSetForType(IssuanceType.REIMBURSEMENT), - DaoEconomyHistoricalData.REIMBURSEMENTS_BY_CYCLE_DATE, - predicate); + Map issuedBsqByMonth = getIssuedBsqByMonth(daoStateService.getIssuanceSetForType(IssuanceType.REIMBURSEMENT), predicate); + Map historicalIssuanceByMonth = getHistoricalIssuanceByMonth(DaoEconomyHistoricalData.REIMBURSEMENTS_BY_CYCLE_DATE, predicate); + return getMergedMap(issuedBsqByMonth, historicalIssuanceByMonth, (daoDataValue, staticDataValue) -> staticDataValue); } - private Map getMergedMap(Set issuanceSet, - Map historicalData, - Predicate predicate) { + public Map getMergedMap(Map map1, + Map map2, + BinaryOperator mergeFunction) { + return Stream.concat(map1.entrySet().stream(), + map2.entrySet().stream()) + .collect(Collectors.toMap(Map.Entry::getKey, + Map.Entry::getValue, + mergeFunction)); + } + + private Map getHistoricalIssuanceByMonth(Map historicalData, Predicate predicate) { // We did not use the reimbursement requests initially (but the compensation requests) because the limits // have been too low. Over time it got mixed in compensation requests and reimbursement requests. // To reflect that we use static data derived from the Github data. For new data we do not need that anymore // as we have clearly separated that now. In case we have duplicate data for a months we use the static data. - Map historicalDataMap = historicalData.entrySet().stream() + return historicalData.entrySet().stream() .filter(e -> predicate.test(e.getKey())) .collect(Collectors.toMap(e -> toStartOfMonth(Instant.ofEpochSecond(e.getKey())), Map.Entry::getValue)); - - // We merge both maps. - // If we have 2 values at same key we use the staticData as that include the daoData - return Stream.concat(getIssuedBsqByMonth(issuanceSet, predicate).entrySet().stream(), - historicalDataMap.entrySet().stream()) - .collect(Collectors.toMap(Map.Entry::getKey, - Map.Entry::getValue, - (issuedBsqByMonthValue, staticDataValue) -> staticDataValue)); } - // The resulting data are not very useful. We might drop that.... - /* public Map getBurnedBtcByMonth(Predicate predicate) { - Map issuedBsqByMonth = getMergedReimbursementMap(predicate); - Map burnedBsqByMonth = getBurnedBsqByMonth(daoStateService.getProofOfBurnTxs(), predicate); - return Stream.concat(issuedBsqByMonth.entrySet().stream(), - burnedBsqByMonth.entrySet().stream()) - .collect(Collectors.toMap(Map.Entry::getKey, - Map.Entry::getValue, - (issued, burned) -> burned - issued)); - }*/ - public static long toStartOfMonth(Instant instant) { return instant .atZone(ZONE_ID) diff --git a/desktop/src/main/java/bisq/desktop/main/dao/economy/supply/SupplyView.java b/desktop/src/main/java/bisq/desktop/main/dao/economy/supply/SupplyView.java index 9878e6822c..634b6af8b6 100644 --- a/desktop/src/main/java/bisq/desktop/main/dao/economy/supply/SupplyView.java +++ b/desktop/src/main/java/bisq/desktop/main/dao/economy/supply/SupplyView.java @@ -58,8 +58,7 @@ public class SupplyView extends ActivatableView implements DaoSt private final BsqFormatter bsqFormatter; private TextField genesisIssueAmountTextField, compRequestIssueAmountTextField, reimbursementAmountTextField, - totalBurntBsqTradeFeeTextField, /*totalBurntBtcTradeFeeTextField, */ - totalLockedUpAmountTextField, totalUnlockingAmountTextField, + totalBurntBsqTradeFeeTextField, totalLockedUpAmountTextField, totalUnlockingAmountTextField, totalUnlockedAmountTextField, totalConfiscatedAmountTextField, totalProofOfBurnAmountTextField; private int gridRow = 0; private long fromDate, toDate; @@ -175,14 +174,6 @@ public class SupplyView extends ActivatableView implements DaoSt totalProofOfBurnAmountTextField = addTopLabelReadOnlyTextField(root, gridRow, 1, Res.get("dao.factsAndFigures.supply.proofOfBurn"), Layout.COMPACT_FIRST_ROW_AND_COMPACT_GROUP_DISTANCE).second; - - /* totalBurntBtcTradeFeeTextField = addTopLabelReadOnlyTextField(root, gridRow, 1, - Res.get("dao.factsAndFigures.supply.btcTradeFee"), Layout.COMPACT_FIRST_ROW_AND_COMPACT_GROUP_DISTANCE).second; - - Tuple3 tuple3 = addTopLabelReadOnlyTextField(root, ++gridRow, - Res.get("dao.factsAndFigures.supply.proofOfBurn")); - totalProofOfBurnAmountTextField = tuple3.second; - GridPane.setColumnSpan(tuple3.third, 2);*/ } private void createLockedBsqFields() { @@ -224,12 +215,8 @@ public class SupplyView extends ActivatableView implements DaoSt Coin totalBurntTradeFee = Coin.valueOf(daoEconomyDataProvider.getBsqTradeFeeAmount(fromDate, getToDate())); totalBurntBsqTradeFeeTextField.setText(bsqFormatter.formatAmountWithGroupSeparatorAndCode(totalBurntTradeFee)); - /* Coin totalBurntBtcTradeFee = Coin.valueOf(daoEconomyDataProvider.getBtcTradeFeeAmount(fromDate, getToDate())); - totalBurntBtcTradeFeeTextField.setText(bsqFormatter.formatAmountWithGroupSeparatorAndCode(totalBurntBtcTradeFee)); -*/ Coin totalProofOfBurnAmount = Coin.valueOf(daoEconomyDataProvider.getProofOfBurnAmount(fromDate, getToDate())); totalProofOfBurnAmountTextField.setText(bsqFormatter.formatAmountWithGroupSeparatorAndCode(totalProofOfBurnAmount)); - } private void updateLockedTxData() { diff --git a/desktop/src/main/java/bisq/desktop/main/dao/economy/supply/chart/DaoEconomyChartModel.java b/desktop/src/main/java/bisq/desktop/main/dao/economy/supply/chart/DaoEconomyChartModel.java index b6f7e160fe..5716029d1d 100644 --- a/desktop/src/main/java/bisq/desktop/main/dao/economy/supply/chart/DaoEconomyChartModel.java +++ b/desktop/src/main/java/bisq/desktop/main/dao/economy/supply/chart/DaoEconomyChartModel.java @@ -56,11 +56,6 @@ public class DaoEconomyChartModel extends ChartModel { return toChartData(daoEconomyDataProvider.getBurnedBsqByMonth(daoStateService.getTradeFeeTxs(), predicate)); } - // The resulting data are not very useful. It causes negative values if burn rate > issuance in selected timeframe - /* List> getBtcTradeFeeChartData(Predicate predicate) { - return toChartData(daoEconomyDataProvider.getBurnedBtcByMonth(predicate)); - }*/ - List> getCompensationChartData(Predicate predicate) { return toChartData(daoEconomyDataProvider.getMergedCompensationMap(predicate)); } @@ -73,6 +68,20 @@ public class DaoEconomyChartModel extends ChartModel { return toChartData(daoEconomyDataProvider.getMergedReimbursementMap(predicate)); } + List> getTotalIssuedChartData(Predicate predicate) { + Map compensationMap = daoEconomyDataProvider.getMergedCompensationMap(predicate); + Map reimbursementMap = daoEconomyDataProvider.getMergedReimbursementMap(predicate); + Map sum = daoEconomyDataProvider.getMergedMap(compensationMap, reimbursementMap, Long::sum); + return toChartData(sum); + } + + List> getTotalBurnedChartData(Predicate predicate) { + Map tradeFee = daoEconomyDataProvider.getBurnedBsqByMonth(daoStateService.getTradeFeeTxs(), predicate); + Map proofOfBurn = daoEconomyDataProvider.getBurnedBsqByMonth(daoStateService.getProofOfBurnTxs(), predicate); + Map sum = daoEconomyDataProvider.getMergedMap(tradeFee, proofOfBurn, Long::sum); + return toChartData(sum); + } + void initBounds(List> tradeFeeChartData, List> compensationRequestsChartData) { Tuple2 xMinMaxTradeFee = getMinMax(tradeFeeChartData); diff --git a/desktop/src/main/java/bisq/desktop/main/dao/economy/supply/chart/DaoEconomyChartView.java b/desktop/src/main/java/bisq/desktop/main/dao/economy/supply/chart/DaoEconomyChartView.java index 2ae739b4c7..54346f918a 100644 --- a/desktop/src/main/java/bisq/desktop/main/dao/economy/supply/chart/DaoEconomyChartView.java +++ b/desktop/src/main/java/bisq/desktop/main/dao/economy/supply/chart/DaoEconomyChartView.java @@ -45,6 +45,7 @@ import java.time.Instant; import java.text.DecimalFormat; +import java.util.Collection; import java.util.Date; import java.util.List; import java.util.function.Predicate; @@ -57,7 +58,7 @@ public class DaoEconomyChartView extends ChartView { private final BsqFormatter bsqFormatter; private XYChart.Series seriesBsqTradeFee, seriesProofOfBurn, seriesCompensation, - seriesReimbursement/*, seriesBtcTradeFee*/; + seriesReimbursement, seriesTotalIssued, seriesTotalBurned; private ListChangeListener nodeListChangeListener; @Inject @@ -76,10 +77,11 @@ public class DaoEconomyChartView extends ChartView { public void initialize() { super.initialize(); - // Turn off some series + // Turn off detail series + hideSeries(seriesBsqTradeFee); + hideSeries(seriesCompensation); hideSeries(seriesProofOfBurn); hideSeries(seriesReimbursement); - /* hideSeries(seriesBtcTradeFee);*/ nodeListChangeListener = c -> { while (c.next()) { @@ -171,84 +173,88 @@ public class DaoEconomyChartView extends ChartView { @Override protected void addSeries() { - seriesBsqTradeFee = new XYChart.Series<>(); - seriesBsqTradeFee.setName(Res.get("dao.factsAndFigures.supply.bsqTradeFee")); - seriesIndexMap.put(seriesBsqTradeFee.getName(), 0); - chart.getData().add(seriesBsqTradeFee); + seriesTotalIssued = new XYChart.Series<>(); + seriesTotalIssued.setName(Res.get("dao.factsAndFigures.supply.totalIssued")); + seriesIndexMap.put(seriesTotalIssued.getName(), 0); + chart.getData().add(seriesTotalIssued); - /* seriesBtcTradeFee = new XYChart.Series<>(); - seriesBtcTradeFee.setName(Res.get("dao.factsAndFigures.supply.btcTradeFee")); - seriesIndexMap.put(seriesBtcTradeFee.getName(), 4); - chart.getData().add(seriesBtcTradeFee);*/ + seriesTotalBurned = new XYChart.Series<>(); + seriesTotalBurned.setName(Res.get("dao.factsAndFigures.supply.totalBurned")); + seriesIndexMap.put(seriesTotalBurned.getName(), 1); + chart.getData().add(seriesTotalBurned); seriesCompensation = new XYChart.Series<>(); seriesCompensation.setName(Res.get("dao.factsAndFigures.supply.compReq")); - seriesIndexMap.put(seriesCompensation.getName(), 1); + seriesIndexMap.put(seriesCompensation.getName(), 2); chart.getData().add(seriesCompensation); - seriesProofOfBurn = new XYChart.Series<>(); - seriesProofOfBurn.setName(Res.get("dao.factsAndFigures.supply.proofOfBurn")); - seriesIndexMap.put(seriesProofOfBurn.getName(), 2); - chart.getData().add(seriesProofOfBurn); - seriesReimbursement = new XYChart.Series<>(); seriesReimbursement.setName(Res.get("dao.factsAndFigures.supply.reimbursement")); seriesIndexMap.put(seriesReimbursement.getName(), 3); chart.getData().add(seriesReimbursement); + + seriesBsqTradeFee = new XYChart.Series<>(); + seriesBsqTradeFee.setName(Res.get("dao.factsAndFigures.supply.bsqTradeFee")); + seriesIndexMap.put(seriesBsqTradeFee.getName(), 4); + chart.getData().add(seriesBsqTradeFee); + + seriesProofOfBurn = new XYChart.Series<>(); + seriesProofOfBurn.setName(Res.get("dao.factsAndFigures.supply.proofOfBurn")); + seriesIndexMap.put(seriesProofOfBurn.getName(), 5); + chart.getData().add(seriesProofOfBurn); + } + + @Override + protected Collection> getSeriesForLegend1() { + return List.of(seriesTotalIssued, seriesCompensation, seriesReimbursement); + } + + @Override + protected Collection> getSeriesForLegend2() { + return List.of(seriesTotalBurned, seriesBsqTradeFee, seriesProofOfBurn); } @Override protected void initData() { - List> bsqTradeFeeChartData = model.getBsqTradeFeeChartData(e -> true); + Predicate predicate = e -> true; + List> bsqTradeFeeChartData = model.getBsqTradeFeeChartData(predicate); seriesBsqTradeFee.getData().setAll(bsqTradeFeeChartData); - /* List> btcTradeFeeChartData = model.getBtcTradeFeeChartData(e -> true); - seriesBtcTradeFee.getData().setAll(btcTradeFeeChartData);*/ - - List> compensationRequestsChartData = model.getCompensationChartData(e -> true); + List> compensationRequestsChartData = model.getCompensationChartData(predicate); seriesCompensation.getData().setAll(compensationRequestsChartData); - List> proofOfBurnChartData = model.getProofOfBurnChartData(e -> true); - seriesProofOfBurn.getData().setAll(proofOfBurnChartData); - - List> reimbursementChartData = model.getReimbursementChartData(e -> true); - seriesReimbursement.getData().setAll(reimbursementChartData); - - applyTooltip(); - // We don't need redundant data like reimbursementChartData as time value from compensationRequestsChartData // will cover it model.initBounds(bsqTradeFeeChartData, compensationRequestsChartData); xAxis.setLowerBound(model.getLowerBound().doubleValue()); xAxis.setUpperBound(model.getUpperBound().doubleValue()); + updateOtherSeries(predicate); + applyTooltip(); + UserThread.execute(this::setTimeLineLabels); } @Override protected void updateData(Predicate predicate) { - List> tradeFeeChartData = model.getBsqTradeFeeChartData(predicate); - seriesBsqTradeFee.getData().setAll(tradeFeeChartData); - - /* List> btcTradeFeeChartData = model.getBtcTradeFeeChartData(predicate); - seriesBtcTradeFee.getData().setAll(btcTradeFeeChartData);*/ - - List> compensationRequestsChartData = model.getCompensationChartData(predicate); - seriesCompensation.getData().setAll(compensationRequestsChartData); - - List> proofOfBurnChartData = model.getProofOfBurnChartData(predicate); - seriesProofOfBurn.getData().setAll(proofOfBurnChartData); - - List> reimbursementChartData = model.getReimbursementChartData(predicate); - seriesReimbursement.getData().setAll(reimbursementChartData); + seriesBsqTradeFee.getData().setAll(model.getBsqTradeFeeChartData(predicate)); + seriesCompensation.getData().setAll(model.getCompensationChartData(predicate)); + updateOtherSeries(predicate); applyTooltip(); } + private void updateOtherSeries(Predicate predicate) { + seriesProofOfBurn.getData().setAll(model.getProofOfBurnChartData(predicate)); + seriesReimbursement.getData().setAll(model.getReimbursementChartData(predicate)); + seriesTotalIssued.getData().setAll(model.getTotalIssuedChartData(predicate)); + seriesTotalBurned.getData().setAll(model.getTotalBurnedChartData(predicate)); + } + @Override protected void applyTooltip() { chart.getData().forEach(series -> { - String format = series == seriesCompensation || series == seriesReimbursement ? + String format = series == seriesCompensation || series == seriesReimbursement || series == seriesTotalIssued ? "dd MMM yyyy" : "MMM yyyy"; series.getData().forEach(data -> { diff --git a/desktop/src/main/java/bisq/desktop/theme-dark.css b/desktop/src/main/java/bisq/desktop/theme-dark.css index 39d296b62c..73a55fffb1 100644 --- a/desktop/src/main/java/bisq/desktop/theme-dark.css +++ b/desktop/src/main/java/bisq/desktop/theme-dark.css @@ -135,13 +135,16 @@ -bs-white: white; -bs-prompt-text: -bs-color-gray-3; -bs-decimals: #db6300; + -bs-soft-red: #680000; + -bs-turquoise-light: #BEDB39; /* dao chart colors */ -bs-chart-dao-line1: -bs-color-green-5; -bs-chart-dao-line2: -bs-color-blue-2; -bs-chart-dao-line3: -bs-turquoise; -bs-chart-dao-line4: -bs-yellow; - -bs-chart-dao-line5: -bs-color-blue-0; + -bs-chart-dao-line5: -bs-soft-red; + -bs-chart-dao-line6: -bs-turquoise-light; /* Monero orange color code */ -xmr-orange: #f26822; diff --git a/desktop/src/main/java/bisq/desktop/theme-light.css b/desktop/src/main/java/bisq/desktop/theme-light.css index c296614e29..d3e5d21aa8 100644 --- a/desktop/src/main/java/bisq/desktop/theme-light.css +++ b/desktop/src/main/java/bisq/desktop/theme-light.css @@ -102,13 +102,16 @@ -bs-progress-bar-track: #e0e0e0; -bs-white: white; -bs-prompt-text: -fx-control-inner-background; + -bs-soft-red: #E74C3B; + -bs-turquoise-light: #00DCFF; /* dao chart colors */ -bs-chart-dao-line1: -bs-color-green-3; -bs-chart-dao-line2: -bs-color-blue-5; -bs-chart-dao-line3: -bs-turquoise; -bs-chart-dao-line4: -bs-yellow; - -bs-chart-dao-line5: -bs-color-blue-0; + -bs-chart-dao-line5: -bs-soft-red; + -bs-chart-dao-line6: -bs-turquoise-light; /* Monero orange color code */ -xmr-orange: #f26822;