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