Currently, I am utilizing the Apex stacked bar chart within my Angular 16 project. In this scenario, there are 4 categories on the x-axis, but unfortunately, the bars are not aligning correctly with the x-axis labels.
The data retrieved from my API is as follows:
let data = [
{
tenantName: 'OBC+',
labelName: 'Application',
total: 85,
postiveTotal: '21',
negativeTotal: '-64',
},
{
tenantName: 'Discovery-world',
labelName: 'Application',
total: 194,
postiveTotal: '119',
negativeTotal: '-75',
},
{
tenantName: 'OBC+',
labelName: 'Channels',
total: 40,
postiveTotal: '0',
negativeTotal: '-40',
},
{
tenantName: 'OBC+',
labelName: 'Wifi',
total: 1,
postiveTotal: '1',
negativeTotal: '1',
},
{
tenantName: 'Discovery-world',
labelName: 'Channels',
total: 59,
postiveTotal: '0',
negativeTotal: '-59',
},
{
tenantName: 'Vidocon',
labelName: 'Test',
total: 30,
postiveTotal: '10',
negativeTotal: '-20',
},
];
https://i.stack.imgur.com/2wzPW.png
Please refer to the image linked above. The issue arises with the API response for tenantName: 'Vidocon'
, where the series data is not accurately represented in the corresponding x-axis label.
Expectedly, it should display under the 'Test' x-axis label, yet it is currently appearing under the 'Application' x-axis label.