Hello,I am having a weird issue with the stacked bar charts and im sure was not an issue a few months ago but i am currently struggling with.I have a graph where i am trying to show the breakdown of "Source" for each "Type"
This looks like this is working fine, but on closer inspection it appears that some of the data points are being grouped in the wrong Label on x axis:Correct:
Incorrect: ("Client - NCR" datapoint above External Body Label)
The data behind this is essentially:
With it going through the sources (only when they have a value) , then filtering the "GetTypes" aggregate on the current SourceId, before adding it to a datapoint list:So the current source label is set as the data point label, and the data series name is the Type Label.Now the data point list appears to be correct, with the correct Labels and series names but it is not displayed correctly on the chart.Any help would be greatly appreciated. This functionality is required for the customer potentially affecting go live for this application.
Hi Christopher,
You are correct. Indeed it's an issue with the OutSystems Charts latest Version 2.1.0 release. I observed that the mismatch between the label and data series also occurred in the normal Column chart (i.e. without stacked). To confirm, I downgraded the OutSystems Charts asset to version 2.0.0, and it is working as expected.
Old Version: https://www.outsystems.com/forge/component-versions/4141
See this test screen (version 2.0.0): TestForms
Could you please tag the OutSystems Charts to this post for the OutSystems team to get notified about this issue?
Thank you.
Kind regards,
Benjith Sam
I have run into this same problem a couple of years ago, and back then, the reason was that the datapoint list needed to be a cartesian product of label + dataseries to display correctly.
I have tried on your example oml, and that seems to be doing the trick. Maybe this is a problem that was solved, and has now come back with a new release ?? Anyway, adding in some rows with a value of 0 could be a short term workaround for you.
Dorine
P.S. The aggregates I'm using in the Data Action aren't winning a beauty contest, but it's just to show what resulting datapoint list you should be working towards...
I have created a test .oml to replicate it but also allow it to be shared:
The graph and the data behind it are populated in the same way as my example above.
@Dorine Boudry Thanks for the feedback, Since i posted I did try that workaround, the second aggregate doesnt filter on the current ID of the first one, it now loops through all records and checks the sum of ones which match if(current.id = case.ID, 1, 0) which provides me with the 0 value data points. This isthe workaround I have implementedas @Benjith Sam said, this appears to be an issue with the most recent version of OutSystems Charts. Benjith, I am not sure how to add a tag to this post, but I will put your post as the solution.