Select to view content in your preferred language

HTML Table in Indicator

581
2
03-14-2024 12:54 PM
michael_vetter
Frequent Contributor

I have an HTML table within an indicator to show the percentage of overdue 311 cases. Recently, I noticed that I needed to reformat the table because the wording causes the table to expand vertically which makes the user have to scroll to read the information. When I reformat the tables, the tables no longer extend all the way to the edges of the indicator like before. I didn't change anything with the width of the table only the cell that should contain the text.

Before:

michael_vetter_0-1710445948267.png

After:

michael_vetter_1-1710445976676.png

 

0 Kudos
2 Replies
jcarlson
MVP Esteemed Contributor

Can you share the formatting you have on the HTML? Hard to diagnose what's going on without that.

- Josh Carlson
Kendall County GIS
0 Kudos
michael_vetter
Frequent Contributor

Thanks for the reply. Below is my code for the table. The display expression is a simple if percent overdue is greater than 0 then display the text. Attribute1 is percent overdue and attribute2 is percent not overdue.

<figure class="table" style="width:100%;">
    <table>
        <tbody>
            <tr>
                <td style="background-color:#ff9999;color:#030202;display:{expression/noDisplay};width:{expression/attribute1}%;">
                    {expression/attribute1}% Overdue
                </td>
                <td style="display:{expression/noDisplay};width:{expression/attribute2};">
                    &nbsp;
                </td>
                <td style="display:{expression/display};width:{expression/attribute2};">
                    {expression/attribute1}% Overdue
                </td>
            </tr>
        </tbody>
    </table>
</figure>

 

0 Kudos