| Line 287... |
Line 287... |
| 287 |
JSONObject grnPendingStack = new JSONObject().put("label", "Grn Pending").put("backgroundColor","rgba(75, 192, 192, 0.2)")
|
287 |
JSONObject grnPendingStack = new JSONObject().put("label", "Grn Pending").put("backgroundColor","rgba(75, 192, 192, 0.2)")
|
| 288 |
.put("label", "Grn Pending").put("stack", "Stack1").put("data", new JSONArray());
|
288 |
.put("label", "Grn Pending").put("stack", "Stack1").put("data", new JSONArray());
|
| 289 |
JSONObject billingPendingStack = new JSONObject().put("label", "Billing Pending").put("backgroundColor","rgba(153, 102, 255, 0.2)")
|
289 |
JSONObject billingPendingStack = new JSONObject().put("label", "Billing Pending").put("backgroundColor","rgba(153, 102, 255, 0.2)")
|
| 290 |
.put("label", "Billing Pending").put("stack", "Stack1").put("data", new JSONArray());
|
290 |
.put("label", "Billing Pending").put("stack", "Stack1").put("data", new JSONArray());
|
| 291 |
JSONObject inTransitStack = new JSONObject().put("label", "Stack1").put("backgroundColor","rgba(255, 159, 64, 0.2)")
|
291 |
JSONObject inTransitStack = new JSONObject().put("label", "Stack1").put("backgroundColor","rgba(255, 159, 64, 0.2)")
|
| 292 |
.put("label", "Returned").put("stack", IN_TRANSIT_STACK).put("data", new JSONArray());
|
292 |
.put("label", "Returned").put("stack", "Stack1").put("data", new JSONArray());
|
| 293 |
|
293 |
|
| 294 |
JSONArray dateLabels = new JSONArray();
|
294 |
JSONArray dateLabels = new JSONArray();
|
| 295 |
|
295 |
|
| 296 |
for (PartnerDailyInvestment pdi : partnerInvestments) {
|
296 |
for (PartnerDailyInvestment pdi : partnerInvestments) {
|
| 297 |
dateLabels = dateLabels.put(pdi.getDate().toString());
|
297 |
dateLabels = dateLabels.put(pdi.getDate().toString());
|
| Line 308... |
Line 308... |
| 308 |
barData.put("labels", dateLabels).put("datasets", barDataSetsArray);
|
308 |
barData.put("labels", dateLabels).put("datasets", barDataSetsArray);
|
| 309 |
scale.put("yAxes", new JSONArray().put(new JSONObject().put("stacked", true)))
|
309 |
scale.put("yAxes", new JSONArray().put(new JSONObject().put("stacked", true)))
|
| 310 |
.put("xAxes", new JSONArray().put(new JSONObject().put("stacked", true)));
|
310 |
.put("xAxes", new JSONArray().put(new JSONObject().put("stacked", true)));
|
| 311 |
|
311 |
|
| 312 |
JSONObject barOptions = new JSONObject()
|
312 |
JSONObject barOptions = new JSONObject()
|
| 313 |
.put("title", titleObject).put("responsive", true)
|
313 |
.put("title", titleObject).put("responsive", true).put("scales", scale)
|
| 314 |
.put("scales", scale)
|
- |
|
| 315 |
.put("tooltips", new JSONObject().put("mode", "index").put("intersect", false));
|
314 |
.put("tooltips", new JSONObject().put("mode", "index").put("intersect", false));
|
| 316 |
|
315 |
|
| 317 |
JSONObject chartJSOn = new JSONObject().put("type", "bar").put("data", barData).put("options", barOptions);
|
316 |
JSONObject chartJSOn = new JSONObject().put("type", "bar").put("data", barData).put("options", barOptions);
|
| 318 |
return chartJSOn.toString();
|
317 |
return chartJSOn.toString();
|
| 319 |
}
|
318 |
}
|