Skip to Content (Press Enter)
OutSystems.com
Personal Edition
Community
Support
Training
Training
Online Training
Developer Schools
Boot Camps
Certifications
Tech Talks
Documentation
Documentation
Overview
ODC
O11
Forums
Forge
Get Involved
Get Involved
Jobs
Ideas
Members
Mentorship
User Groups
Platform
Platform
ODC
O11
Search in OutSystems
Log in
Get Started
Back to Forums
Bruno Nabiça
506
Views
4
Comments
YAxis Format - Outsystems Charts
Discussion
Charts
How-to
I have a ColumnChart from the "Charts" espace and on the Y Axis the values are appearing with a "k" if the value as at least 4 digits. For example, 1000 becomes 1k, 2000 becomes 2k, 40000 becomes 40k. How can I remove the "k" and show just the value?
Thanks
Cristiano Marques
MVP
Hello Bruno,
There are two ways of doing it, but first let me know something, are you building your own JSON or using data points?
Either way I'll leave you the two ways I know for removing the "k" from highcharts.
Highcharts.setOptions({
lang: {
numericSymbols: null //otherwise by default ['k', 'M', 'G', 'T', 'P', 'E']
}
});
Other would be changing the Y axis formatter:
yAxis: {
labels: {
formatter: function () {
return this.value;
}
}
}
JSFiddle
Best regards,
Bruno Nabiça
Im using Data Points. Where should I put that?
Thanks
Cristiano Marques
MVP
Using the AdvancedFormat Property of the Highchart you can use something like:
AdvancedFormat_Init
(
YAxisJSON
:JSON
)
Where the JSON would be a variable text with the yAxis format I had above. That should work : )
Don't have time to test it atm, but I'll try to test it later today. (I usually build highcharts out of my own JSON)
Tiago Bernardo
Champion
Quick information, after some tests:
In the action AdvancedFormat_Init(), for the parametes "HighchartsJSON" and "YAxisJSON" don't include "Highcharts.setOptions({" and "yAxis: {", respectively, neither the corresponding terminating brackets and other characters.
So it should be:
1) For HighchartsJSON:
lang: {
numericSymbols: null //otherwise by default ['k', 'M', 'G', 'T', 'P', 'E']
}
2) For YAxisJSON:
labels: {
formatter: function () {
return this.value;
}
}
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
See the full guidelines
Loading...