Forum Discussion

gwolfe's avatar
04-18-2022
Solved

Dynamic Font Size When Using BloX

I am running into a problem with BloX when transitioning from a large monitor to a laptop where text gets cut off. Is there a way I can make font size dynamic? 

This looks fine on a monitor..

But when I move to a laptop...

Thanks,

 

  • Hi gwolfe,

    It's simple to make the number in your Blox KPI widget responsive.  Don't use the "size" attribute in the TextBlock.  Instead, add a "style" attribute, and underneath, define the font-size as an integer percent of the Viewpoint Width, "vw".  The entry looks like this: "font-size": "4vw".  See the example below.

     

    Regards,

    Chris

2 Replies

Replies have been turned off for this discussion
  • ChrisS's avatar
    ChrisS
    Sisense Employee

    Hi gwolfe,

    It's simple to make the number in your Blox KPI widget responsive.  Don't use the "size" attribute in the TextBlock.  Instead, add a "style" attribute, and underneath, define the font-size as an integer percent of the Viewpoint Width, "vw".  The entry looks like this: "font-size": "4vw".  See the example below.

     

    Regards,

    Chris