AEM Forms 6.5 introduced the ability to create and configure multiple series charts. The multiple series charts are typically used in association with Line,Bar,Column chart type. The following chart is an good example of multi series chart. The chart shows the growth of $10,000 USD in 3 different mutual funds over a period of time. To be able to create and use charts of these kind in AEM Forms, you will need to create the appropriate Form Data Model.
To create multi-series charts in AEM Forms, you need to create an appropriate Form Data Model with necessary entities and associations between the entities. The following screenshot highlights the entities and the associations between the 3 entities. At the top level, we have an entity called “Organization”, which has a one-to-many association with Fund entity. The Fund entity, in turn, has a one-to-many association with the Performance entity.
In this video we will take a look at configuring and using Multi-line series charts in AEM Forms 6.5. Series is a set of data and you can use multiple series to chart the data. For example, in this chart we can see that the growth of $10,000 invested in three different individual funds starting from the year 2014. To create charts of this kind we need to create the appropriate form data model. So to create the form data model, let’s go into our form data model editor in AEM Forms and create three entities.
To create an entity we click on Create Entity here and give a title to this entity called Organization. We create another entity called Fund.
And we create a third entity called Performance.
So, so far we have created three entities Organization, Fund and Performance. Make sure you save this. The next step is to add appropriate child properties to each of these entities. So to add a child property to the Performance entity, I click on Performance and click on Create Child Property. The first child property is going to be called Year and it going to be of type string.
The second child property is going to be called Amount and it’s going to be of type float.
So, so far we have added two child properties to the Performance entity. The next step is to add a child property to the Fund object. So we select the Fund entity here and click on Child Property and is going to be one child property called Name and it’s going to be of type string.
So, so far we have added three entities and added child properties to the Fund and Performance entities. The next step is to add an association between Organization and the Fund entity and the Fund and the Performance entity. So to do that, let’s select the Organization entity and click on Add Association. So we can give the name to this association called Funds and select the type of association. Typically it’s going to be one-to-many because one organization will contain a number of funds. And the model object is going to be Fund.
The next association is to be between the Fund and the Performance entities. So to do that, we click on the Fund entity. Add association.
And the model object is going to be Performance.
So this is our form data model. We have three entities and two of those entities have child properties and there’s an association between the Organization, Fund and the Performance entities.
So one more thing that we need to do is remove, make sure that the Performance is not a top model object here and the Fund is also not a top level model.
So our Organization is going to be our top level model and each organization will have funds and that fund will have a name and it has performances and each of the performances will have the year and amount. So now that our form data model is ready, configured, the next step we need to do is to configure a chart using this form data model.