I've been working on integrating an amCharts v5 gantt chart with Angular 13. Each bar in the chart represents a project, and if there are multiple occurrences of a category, they should stack like a timeline. I've successfully retrieved data from a local JSON file and added custom properties. However, I'm facing an issue where the chart creates multiple lines for each declaration, even when the categories match.
It's worth noting that the bars stack correctly, with all the inputs in sequence as intended. The problem lies in the chart creating three lines, two of which are empty, while only the third is populated by the data as expected.
Here is an example of the JSON structure:
[
{
"category": "LETICIA",
"fromDate": "2022-08-02 00:00",
"toDate": "2022-08-08 23:59",
"columnSettings": {
"fill": "#57315b"
},
"task": "Sprint #1",
"personnel": 13
},
{
"category": "LETICIA",
"fromDate": "2022-08-08 00:00",
"toDate": "2022-08-09 23:59",
"columnSettings": {
"fill": "#E6E6FA"
},
"task": "Presentation",
"personnel": 14
},
{
"category": "LETICIA",
"fromDate": "2022-08-09 00:00",
"toDate": "2022-08-19 23:59",
"columnSettings": {
"fill": "#57315b"
},
"task": "Sprint #1",
"personnel": 15
}
]
I have attempted to manipulate the JSON data without much success. Is there a way to eliminate these unnecessary category duplications?
Unfortunately, I haven't been able to adapt it for StackBlitz yet, but you can view my current component and service setup here: Check out my code on StackBlitz