Custom Bar chart

0
Hi, I'm new to mendix, I'm trying to create a custom bar chart with the structure with months of the year, but I want the data that it shows to be that of an attribute of the entity. Somebody could help me? Thanks a lot! Here are some images of what I have:              *When creating an object, the entity carries an attribute that contains as a value the month in which it is created, my idea is to show that in the graph on the X axis Regarding the y axis, I want to show the number of objects that are created   *The version of mendix studio pro is 8.18.1    
asked
3 answers
0

Hi Daniel,

 

This can be achieved via a JSON structure that is needed via an object in the field source object.

See documentation on the anychart widget in the following location: https://docs.mendix.com/howto7/extensibility/charts-any-usage

 

Regards,

Andre

answered
0

Hello again, thanks for the video tutorial, I have learned a lot about json structures and now I understand it better. My question is, can it be done what I am trying to do?

I explain:
My idea is to have a base of all the months on the x-axis, as static data.
What is surrounded in blue, is the information that I dynamically passed him, as you did in the video.
Every time I create an object, the month of when I created it (Mar) and the axis and the number of objects that have been created that month are shown on the graph.
Right now, that information appears at the end of the graph and my intention is that it appears replacing the month of March, since the data entered is in March. If I enter data in April, may the month of April increase and so on with everyone.
Could this be done?
Thanks anyway for all the help !!
Greetings
Dani

answered
0

Hi Daniel,

 

The issue is that the widget concatenates the static part with the dynamic part. If you want a full dynamic part you have to remove the static part and built up the dynamic part.

 

In brief, I have added two tables in my domain model:

The period is used to create the x-axis labels and the items are counted in a loop of all periods.

I have an example MPK available. If you mail me I can send an MPK file in return.

 

Regards,

 

Andre

answered