I already started using JMix 2.2-RC1, because I wanted to use the Charts which are not available in any other JMix 2.x version. Since it is a new project I also do not want to start with 1.5.
Right now I’m trying to build a chart and I would like to have exactly this: Examples - Apache ECharts
As far as I understand I need to add an entry here for each category:
<charts:xAxes>
<charts:xAxis name="cat1"/>
<charts:xAxis name="cat2"/>
</charts:xAxes>
And define the value fields:
charts:dataSet
<charts:source dataContainer=“charts1Dc”
categoryField=“datetime”
valueFields=“cat1,cat2”/>
</charts:dataSet>
This approach is very static and requires two value fields per record. It requires a getter and setter per value field. My data schema looks differently:
public class Charts1DTO {
@JmixGeneratedValue
@JmixId
private UUID id;
private String category;
@Temporal(TemporalType.DATE)
private Date datetime;
private Long memory;
…
I can have many categories in the field category and memory is the value field. Instead I can have multiple records for one y data point. In case of 4 categories, it could be 4 rows.
Any ideas how to solve this? Can somebody provide an example?
Thank you in advance.