Is it Possible to have conditional formatting in the statistic component

The Statistic component allows me to change the format of the number I want to display using the markdown selection:
image

Now I have a dropdown selection where a user can select to see the value in percentage or it's respective count, meaning on value has the format "Percentage" and the other "Standard". I can display the different numbers with a condition, however, the format is either always percentage or always standard. Is there a way to update the format per a condition?

I do know I could use a text component, but the formatting of the text is not ideal and you can't even change font sizes or font styles.

Hello! I was going suggest you affect the Format state on the component through an event handler, but, after looking around, I don't believe this is possible.

This related post may have an alternative idea that will work for you. Instead of conditionally changing the formatting, conditionally hide one Statistic component in favor of another.