Quantcast
Channel: All Developer posts
Viewing all articles
Browse latest Browse all 48312

Number Formatting Function

$
0
0

In my custom visual, I'm trying to get the format from a measure. This passes the format of the measure to the ts file:

 

 

dataViews[0].categorical.values[0].source.format

It produces a value like: '0.0 %;-0.0 %;0.0 %' for a percent with 1 decimal and '\$#,0;(\$#,0);\$#,0' for a dollar amount.

 

My question is, how do I apply that to a number? There has to be a standard function, right?

 

Thanks

 


Viewing all articles
Browse latest Browse all 48312

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>