HOW TO
In ArcGIS Dashboards, symbol sizes in a list element are automatically populated by default when 'Adjust size automatically' is checked in the Symbol style pane in ArcGIS Online Map Viewer. When multiple field values are displayed, the symbols appear disproportionately small, which can lead to misinterpretation of the data. The image below shows the symbols in the list element.

This limitation can be addressed with advanced formatting by adding Scalable Vector Graphics (SVG) icons and defining the size value directly within the expression. This article provides the workflow to modify the basic point symbol size in the list element using advanced formatting in ArcGIS Dashboards.
.Note: If only one color is required for the symbols in the list element, skip Step 4(a), and replace <symbol color> in Step 4(c) with the color or hex code.
var <symbol color> = Decode(
$datapoint["<field name>"],
"<attribute>", "<hex code>",
"<default color>"
);
var <symbol size> = <value>;
var <svg> = `
<svg height="${<symbol size>}" width="${<symbol size>}">
<circle
cx="${<symbol size> / 2}"
cy="${<symbol size> / 2}"
r="${<symbol size> * 0.4}"
stroke="black"
stroke-width="1"
fill="${<symbol color>}"
/>
</svg>`;
return {
attributes: {
<svg>
}
};
The following is an example of the complete expression in the editor. In this example, the icon color is assigned based on the TYPE field, using the same hex codes used in the web map.
var symbol_color = Decode(
$datapoint["TYPE"],
"Clinic", "#149ece",
"Long Term Care", "#a7c636",
"Agency / Hospice", "#ed5151",
"Hospital", "#9e559c",
"grey"
);
var symbol_size = 60;
var svg = `
<svg height="${symbol_size}" width="${symbol_size}">
<circle
cx="${symbol_size / 2}"
cy="${symbol_size / 2}"
r="${symbol_size * 0.4}"
stroke="black"
stroke-width="1"
fill="${symbol_color}"
/>
</svg>`;
return {
attributes: {
svg
}
};

.The following is an example of the HTML code in the editor.
<div style="display: flex;">
<div style="align-items: center; display: flex; flex: 0 4 20%; justify-content: center;">
{expression/svg}
</div>
<p>
<strong><u>{field/ALIAS}</u></strong><br>
{field/FACILITY}<br>
{field/LONGITUDE}, {field/LATITUDE}<br>
<i>{field/ADDRESS_1}</i><br>
<i>{field/ZIP_CODE}</i><br>
<i>{field/CITY}</i><br>
<i>{field/STATE}</i>
</p>
</div>
to reflect the changes in the element preview area.The SVG icons are displayed in the list element.

> Save to save the changes.Article ID: 000038170
Get help from ArcGIS experts
Start chatting now