Do some symbology expressions built in the Web Map not translate to Dashboards and WebApps?

443
3
Jump to solution
01-14-2022 03:32 AM
by Anonymous User
Not applicable

Hi,

 

I am looking to have my table in the popup window display background colours to reflect a variable number, depending on which feature is selected. I am able to do this the way I want in the WebMap, but when viewing the dashboard or web app, it just stays blank.  I am wondering if there is a different way to write the html for the popup or if it just does not get translated to the dashboard as I know that is the case for some advanced symbology.

Here is the html and a screenshot from the WebMap with the correct behavior (I have the font in the html as well as the client might want to change it to black later).

</div><div style="padding:5px;background-color:rgb(194,194,194)"><b>Climate Risk Index Scores</b></div>
<table style="width:100%">
<tbody>
<tr>
<td style="border:0.5px solid rgb(215,215,215);width: 75%;text-align: left;">Coastal (Baseline)</td>
<td bgcolor= "#{expression/expr6}" style="border:0.5px solid rgb(215,215,215);width: 25%;text-align: center;"><b><font color="#{expression/expr6}" size="4">{coastnow_new}<br /></b></td>
</tr>
<tr>
<td style="border:0.5px solid rgb(215,215,215);text-align: left;">Coastal (Late-Century)</td>
<td bgcolor= "#{expression/expr7}" style="border:0.5px solid rgb(215,215,215);text-align: center;"><b><font color="#{expression/expr7}" size="4">{coastlate_new}</b></td>
</tr>
<tr>
<td style="border:0.5px solid rgb(215,215,215);text-align: left;">Flood (Baseline)</td>
<td bgcolor= "#{expression/expr8}" style="border:0.5px solid rgb(215,215,215);text-align: center;"><b><font color="#{expression/expr8}" size="4">{floodnow_new}<br /></b></td>
</tr>
<tr>
<td style="border:0.5px solid rgb(215,215,215);text-align: left;">Wildfire (Baseline)</td>
<td bgcolor= "#{expression/expr5}" style="border:0.5px solid rgb(215,215,215);text-align: center;"><b><font color="#{expression/expr5}" size="4">{firenow_new}<br /></b></td>
</tr>
<tr>
<td style="border:0.5px solid rgb(215,215,215);text-align: left;">Wildfire (Mid-Century)</td>
<td bgcolor= "#{expression/expr10}" style="border:0.5px solid rgb(215,215,215);text-align: center;"><b><font color="#{expression/expr9}" size="4">{firemid_new}<br /></b></td>
</tr>
<tr>
<td style="border:0.5px solid rgb(215,215,215);text-align: left;">Wildfire (Late-Century)</td>
<td bgcolor= "#{expression/expr10}" style="border:0.5px solid rgb(215,215,215);text-align: center;"><b><font color="#{expression/expr10}" size="4">{firelate_new}<br /></b></td>
</tr>
</tbody>
</table>

AndrewK_0-1642159438994.png

However, when this map is used in the Dashboard, the popup does use the expressions for the font, yet the background is blank?  I know I am using the "bgcolor" html parameter and I'm not sure if there are other options that work better?

AndrewK_1-1642159675382.png

Thanks for the help!

 

Andrew

 

 

0 Kudos
1 Solution

Accepted Solutions
jcarlson
MVP Esteemed Contributor

I've noticed this sort of thing as well. The way different tools/viewers handle HTML can vary. Try moving all of your expressions into the style tag. That is, use

<td style="background-color:#{expression/expr10}; color:#{expression/expr10}">

Instead of bgcolor and font tags.

- Josh Carlson
Kendall County GIS

View solution in original post

3 Replies
jcarlson
MVP Esteemed Contributor

I've noticed this sort of thing as well. The way different tools/viewers handle HTML can vary. Try moving all of your expressions into the style tag. That is, use

<td style="background-color:#{expression/expr10}; color:#{expression/expr10}">

Instead of bgcolor and font tags.

- Josh Carlson
Kendall County GIS
by Anonymous User
Not applicable

Hi Josh,

It works as it should now, thanks for the quick reply and your help! Was pulling my hair out, so I appreciate it.

Andrew

0 Kudos
oceanicdivorce
New Contributor

I got it. Thank you for the helpful post. run 3

0 Kudos