PortfolioPlugin.log(warnings);
}
private void addClient(DataSeries item, List<Exception> warnings)
{
PerformanceIndex clientIndex = (PerformanceIndex) dataCache.get(Client.class);
if (clientIndex == null)
{
clientIndex = PerformanceIndex.forClient(getClient(), getReportingPeriod(), warnings);
dataCache.put(Client.class, clientIndex);
}
switch ((ClientDataSeries) item.getInstance())
{
case TOTALS:
ILineSeries tSeries = chart.addDateSeries(clientIndex.getDates(), //
toDouble(clientIndex.getTotals(), Values.Amount.divider()), //
Messages.LabelTotalSum);
item.configure(tSeries);
break;
case TRANSFERALS:
IBarSeries tfSeries = chart.addDateBarSeries(clientIndex.getDates(), //
toDouble(clientIndex.getTransferals(), Values.Amount.divider()), //
Messages.LabelTransferals);
item.configure(tfSeries);
break;
case INVESTED_CAPITAL:
ILineSeries ivSeries = chart.addDateSeries(clientIndex.getDates(), //
toDouble(clientIndex.calculateInvestedCapital(), Values.Amount.divider()), //
item.getLabel());
item.configure(ivSeries);
break;
case ABSOLUTE_DELTA:
ILineSeries dSeries = chart.addDateSeries(clientIndex.getDates(), //
toDouble(clientIndex.calculateAbsoluteDelta(), Values.Amount.divider()), //
item.getLabel());
item.configure(dSeries);
break;
case TAXES:
ILineSeries txSeries = chart.addDateSeries(clientIndex.getDates(), //
accumulateAndToDouble(clientIndex.getTaxes(), Values.Amount.divider()), //
item.getLabel());
item.configure(txSeries);
break;
}
}