The use of ChartJS

Hello, I am new to reporting and thought I'd use one of the available charts on the Mendix app store however I am having issues getting my head around it. Not sure if it is just me or the documentation is not detailed enough. If someone here has done something with charts, getting the necessary data to plot the chart, please reply. Hope to hear from some of you guys soon. Kind regards, Kofi Ghartey-Tagoe
2 answers

You can try the testproject in GitHub:


Kofi -

I have successfully used ChartJS. The most important thing I discovered is that the data structure the widgets expect is three tiered: Chart (M -----M) Dataset (M ------ M) Datapoints. Both of the many to many relationships are set to Both Entities Refer To Each Other in the Navigability section of the association properties. In the case of one dimensional reports, like pie charts, only the Chart and Dataset entities are necessary. In this case, the Chart object would have title, etc. and the Dataset Objects would be the Pie slices. In the case of series reports, you need all three entities. The dataset entity is the series (in my case something like Current Year and Prior Year) and the Datapoints entity contains the series values (in my case January, February, March, etc. and the corresponding values). Also, I made my entities persistable.

Hope that helps,