Quantcast
Channel: Developer topics
Viewing all articles
Browse latest Browse all 17899

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 17899

Trending Articles