Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

Custom Visual Field Formating

I'm working in a custom visual and i need to implement Field Formatting.


I want to store different settings for every metric i have inserted in the visual

like the way it is implemented in matrix visual on power bi

 


Is there any reference or source code on git hub on how to implement this feature

 

Thanks in Advance

6 Replies

Replies have been turned off for this discussion
  • dm-p's avatar
    dm-p
    Super User

    Hi Anonymous,

    If I understand correctly, you're looking to do something like in this thread? Last we heard, this is not supported for custom visuals and only works in the core visuals, which is a shame, as I really, really want to be able to do it myself.

    An alternative is to create a formatting field for each measure in the properties pane, which is not as elegant but gets the job done. The tutorial to do something similar is linked in that thread also. I have a couple of examples in a visual I produce that uses the categorical dataViewMapping (which isn't formatting but generates a text field for each category) which I can provide if this would be useful to you? You would use these in a similar way to take a format string and then use TS code to apply the formatting specified in the field. 

    Regards,

    Daniel