54
Views
9
Comments
Solved
[OutSystems Charts Web] Colum chart not rendering if Label contains a 'plus' symbol +
charts-web
Web icon
Forge asset by OutSystems
Application Type
Traditional Web
Service Studio Version
11.53.21 (Build 61476)

On a traditional web application I have a series of dynamic charts placed in Web blocks that are in turn used on a reports screen. The data is dynamically populated by filters that the user selects in order to display customised charts for various data types.

One particular instance is configured to show age profile data for a particular user group (e.g. 24-29, 30-34..... 65+ etc). 

The preparation of the Web block runs an aggregate that groups the Age ranges of the filtered user group in order to present the total number of people in each age range. The output value of the aggregate is the COunt and the Grouped AgeCategory label value (text value)

The chart fails to render whenever the aggregate returns any values where the label would be '65+'.

If the filters exclude this range then the chart renders ok, but if it includes 65+ then it fails.

We have a workaround to run a simple replacement calculation in the aggregate to output a different text value of '65 or over' if the original value was '65+' and this works fine.

It therefore appears that the + sign can not be rendered in the Chart Label property.


Has anyone else experienced this?

(Running the latest version 1.1.5 on Traditional Web App)

2020-03-25 15-04-11
João Ferreira
Staff
Solution

Hi Daniel,

This one was not simple, but we did replicate it on our side. 

What is happening?
The XAxis is calculating the type of data taking into account the value, in this case we are evaluating the first record. Because of that the values are considerer integer (for Highcharts Decimal). That's why it's breaking the js. The "+" is breaking the object.

Solution:   
On chart fill the parameter XAxisFormat/ValuesType as Entities.XAxisValuesType.Text. This will prevent our evaluation of the datatype and will allow all the numbers and the string.

Let me know if this solves your use case, I'm here to help.

Best Regards,
JoĂ£o Ferreira

2020-09-15 13-07-23
Kilian Hekhuis
 
MVP

If you do try to render 65+, do you see any errors in the browser's console that might give a clue to why it doesn't render?

2018-01-12 09-50-04
Daniel Gorman

The 65+ I have put a fix in now to prevent this but I will try again in our Dev environment and see what happens. I'll post back tomorrow

2021-09-06 15-09-53
Dorine Boudry
 
MVP

Hi Daniel,

Can you share a demo oml showing this.  I just tried and see the + in the label.

So it must be something specific you do, or else maybe related to versions of ui or charts.

Dorine

2020-03-25 15-04-11
João Ferreira
Staff
Solution

Hi Daniel,

This one was not simple, but we did replicate it on our side. 

What is happening?
The XAxis is calculating the type of data taking into account the value, in this case we are evaluating the first record. Because of that the values are considerer integer (for Highcharts Decimal). That's why it's breaking the js. The "+" is breaking the object.

Solution:   
On chart fill the parameter XAxisFormat/ValuesType as Entities.XAxisValuesType.Text. This will prevent our evaluation of the datatype and will allow all the numbers and the string.

Let me know if this solves your use case, I'm here to help.

Best Regards,
JoĂ£o Ferreira

2018-01-12 09-50-04
Daniel Gorman

Thank you Joao, I get an error when applying this.

2020-09-15 13-07-23
Kilian Hekhuis
 
MVP

Hi Daniel,

You didn't read correctly. JoĂ£o said to fill the ValuesType of the XAxisFormat with Entities.XAxisValuesType.Text. You are trying to assign it to the entire XAxisFormat.

2020-03-25 15-04-11
João Ferreira
Staff

Hi Daniel, 

Did you found the parameter, did it work? 

2018-01-12 09-50-04
Daniel Gorman

Apologies for late reply I have been working in Live service issue support and unable to test.


I have found the variable and made the change in Dev/Test. As I mentioned above for some reason the issue does not occur in the Dev or Test environments despite there being a similar data set, so I will revert my earlier workaround and add this variable value in then push this through to Live and see the result. I will update the position once tested fully.

THanks

2022-11-12 11-28-30
Gonçalo Martins
Staff
Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.