Forum Discussion

rahuldhomane's avatar
09-02-2022
Solved

Responsive Blox

Hi,

I have created few KPIs using Blox which looks aesthetically very appealing. However, my users work on different resolution and scaling on different machines and all the built-in charts (line chart, bar chart, column chart) gets adjusted accordingly except the Blox KPIs. 

Is there a way by which the Blox elements can get adjusted (font, spacing, etc) in accordance with the change in resolution/scaling similar to other general built-in charts.

Thanks,

Rahul  

  • There was a similar question a while back. From the response there -- instead of specifying the size of text using the 'size' attribute, use the 'style' attribute together with the 'font-size' attribute, and then specify the font-size as a percentage of viewpoint width:

    "style": { "font-size": "3vw"}

    The earlier article specifies integer values; I've tried this myself with 1.4vw (etc) values and that seemed to work.

    Height and width attributes can also be specified as a percentage,  both for blox 'blocks' and also in sparklines.
    Good luck!

     

1 Reply

Replies have been turned off for this discussion
  • There was a similar question a while back. From the response there -- instead of specifying the size of text using the 'size' attribute, use the 'style' attribute together with the 'font-size' attribute, and then specify the font-size as a percentage of viewpoint width:

    "style": { "font-size": "3vw"}

    The earlier article specifies integer values; I've tried this myself with 1.4vw (etc) values and that seemed to work.

    Height and width attributes can also be specified as a percentage,  both for blox 'blocks' and also in sparklines.
    Good luck!