use of io.swagger.client.model.Chart in project android-client by GenesisVision.
the class ProfitChartView method setChart.
public void setChart(List<Chart> charts) {
if (charts.isEmpty()) {
chart.clear();
return;
}
List<Entry> lineEntries = new ArrayList<>();
// List<BarEntry> barEntries = new ArrayList<>();
float index = 0;
for (Chart chart : charts) {
lineEntries.add(new Entry(index, chart.getTotalProfit().floatValue()));
// barEntries.add(new BarEntry(index, new float[]{
// chart.getManagerFund().floatValue() + chart.getInvestorFund().floatValue(),
// chart.getLoss().floatValue(),
// chart.getProfit().floatValue()}));
index++;
}
CombinedData data = new CombinedData();
data.setData(getLineData(lineEntries));
// data.setData(getBarData(barEntries));
chart.setData(data);
}
Aggregations