cuba-platform / reports

CUBA Reports Addon
https://www.cuba-platform.com/
Apache License 2.0
9 stars 4 forks source link

IndexOutOfBoundsException when run diagram report with empty data #258

Closed kandalin-d closed 4 years ago

kandalin-d commented 4 years ago

Environment

Description of the bug or enhancement

1 Create some diagram report with serial type. 2 Assign band to chart. 3 Remove band from structure and do not edit chart template. 4 Run report E.R.: Empty results A.R.:

java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
    at java.util.ArrayList.rangeCheck(ArrayList.java:653)
    at java.util.ArrayList.get(ArrayList.java:429)
    at com.haulmont.reports.entity.charts.ChartToJsonConverter.convertSerialChart(ChartToJsonConverter.java:131)
    at com.haulmont.reports.libintegration.ChartFormatter.convertSerialChart(ChartFormatter.java:65)
    at com.haulmont.reports.libintegration.ChartFormatter.renderDocument(ChartFormatter.java:47)