cancel
Showing results for 
Search instead for 
Did you mean: 

Text Block Left Align

zohebakber
9 - Travel Pro
9 - Travel Pro

Hi Team,

I am creating a text block using blox. However, even after chosing text align to "left" the result is still coming to the centre.
See the screenshot below and the code I am using.

Thanks in advance

zohebakber_0-1672826454053.png

Code:

 

{
"style": "",
"script": "",
"title": "",
"showCarousel": false,
"body": [
{
"type": "Container",
"items": [
{
"type": "TextBlock",
"text": "Average Price Index: <b> ({value:Avg Price Index}%)</b>",
"style": {
"text-align": "center",
"font-size": "14px",
"margin": "9px"
}
}
]
}
],
"actions": []
}
5 REPLIES 5

zohebakber
9 - Travel Pro
9 - Travel Pro

Code:

 

{
"style""",
"script""",
"title""",
"showCarousel"false,
"body": [
{
"type""Container",
"items": [
{
"type""TextBlock",
"text""Average Price Index: <b> ({value:Avg Price Index}%)</b>",
"style": {
"text-align""left",
"font-size""14px",
"margin""9px"
}
}
]
}
],
"actions": []
}
 
Even this code with align: left also puts the block at the centre?

Sijo1995
9 - Travel Pro
9 - Travel Pro

Hi @zohebakber ,

Please try this code

 

{
    "style": "",
    "script": "",
    "title": "",
    "showCarousel": false,
    "body": [
        {
            "type": "Container",
            "items": [
                {
                    "type": "TextBlock",
                    "text": "Average Price Index: <b> ({value:T}%)</b>",
                    "style": {
                        "text-align": "left",
                        "font-size": "14px",
                        "margin-left": "9px"
                    }
                }
            ]
        }
    ],
    "actions": []
}

 

Sijo1995_0-1672921749736.png

 

Thanks

Sijo

Hi Sijo,
Thanks for replying.
I tried your code. In the widget editor mode, it is left aligned however as we apply this and go to the dashboard mode, the text block is seen at the center itself.

harikm007
13 - Data Warehouse
13 - Data Warehouse

Hi @zohebakber ,

Do you have any other blox widget or script in same dashboard that align the text center? Can you create a dashboard with only the blox widget and check if the issue still exist?

-Hari

Hi Hari,

Thanks for replying. Yes, I have tried on the fresh dashboard. None of the dashboard/widget scripts are used. However, any blox template etc are shown at the center after we apply the widget.

Can you suggest, how we can resolve this?

Thanks..

Widget Mode:(left aligned)

zohebakber_0-1672983143394.png

 

Dashboard level: (becomes center aligned)


zohebakber_1-1672983190613.png

 

Community Toolbox

Recommended quick links to assist you in optimizing your community experience:

Developers Group:

Product Feedback Forum:

Need additional support?:

Submit a Support Request

The Legal Stuff

Have a question about the Sisense Community?

Email [email protected]