Skip to content

Commit

Permalink
fix line/bar and area parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
mierin12 committed Dec 20, 2024
1 parent 0b46f52 commit a7cda52
Showing 1 changed file with 15 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,19 @@ private void buildStatementOfAssetsDerivedDataSeries(ColorWheel wheel)
if (type == ClientDataSeries.DELTA_PERCENTAGE)
continue; // NOSONAR

boolean isLine = true;
boolean isArea = false;

if (type == ClientDataSeries.DIVIDENDS || type == ClientDataSeries.EARNINGS
|| type == ClientDataSeries.FEES || type == ClientDataSeries.INTEREST
|| type == ClientDataSeries.INTEREST_CHARGE || type == ClientDataSeries.TAXES
|| type == ClientDataSeries.TRANSFERALS)
isLine = false;

if (type == ClientDataSeries.ABSOLUTE_INVESTED_CAPITAL || type == ClientDataSeries.INVESTED_CAPITAL
|| type == ClientDataSeries.TRANSFERALS_ACCUMULATED)
isArea = true;

// skip interest and interest charge for portfolios and
// securities - not supported
if ((baseDataSeries.getType() == DataSeries.Type.SECURITY
Expand All @@ -115,8 +128,8 @@ private void buildStatementOfAssetsDerivedDataSeries(ColorWheel wheel)
var dataSeries = new DataSeries(DataSeries.Type.DERIVED_DATA_SERIES, baseDataSeries.getGroup(),
new DerivedDataSeries(baseDataSeries, type), label, wheel.next());

dataSeries.setLineChart(baseDataSeries.isLineChart());
dataSeries.setShowArea(baseDataSeries.isShowArea());
dataSeries.setLineChart(isLine);
dataSeries.setShowArea(isArea);

availableDerivedSeries.add(dataSeries);
}
Expand Down

0 comments on commit a7cda52

Please sign in to comment.