Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
Format Tooltip Message - Chart
SorinT
How can I fomat my orthogonal value to have the thousands separator and a specific number of decimal places?
When i try to make a new mouse-over event, I always get the number with the following form: (13456,321). I would like to have something like 132.456,32.
In addition to this, I would like to mention that I need to have also a description before the orthogonal value. I have tried to find a way to format the "valueData" parameter, but I cannot find a good solution.
Does someone know a possible solution for my case?
(
Example: I would like the tooltip to show something like: "ColumnName: 1.234,78"
)
Thank you!
Find more posts tagged with
Comments
pricher
JavaScript does not have built-in formatting functions or methods for numbers. If you google "javascript format number", you'll find some code examples that may help you. The code snippet could be included in your report and called from the Expression Builder for the tooltip.
Hope this helps,
P.
SorinT
I found this solution that works quite good:
var formatter = new Packages.org.eclipse.birt.core.format.NumberFormatter("#,###.00");
var val = new Number(valueData);
categoryData + "\n" + formatter.format(val);
pricher
Very cool!