Hi all.
I am currently trying to make a label in Arcade for a layer I am working on. I would like to have one of the lines (the one below in bold) in the label be a different font size than the rest of the label. Is there a way to do this within Arcade? I thought it would be in the TextFormatting constant but it doesn't seem to be.
Thanks, and please let me know what you think.
return 'Hard: ' +DomainName($feature, 'PER_HARDWO') +'%'+TextFormatting.NewLine+
'Con: '+DomainName($feature, 'PER_CONIFE')+'%'+TextFormatting.NewLine+
'Shrub: '+DomainName($feature, 'PER_SHRUB')+'%'+TextFormatting.NewLine+
'Herb: '+DomainName($feature, 'HERB_CODE')+'%'+TextFormatting.NewLine+
DomainName($feature, 'Map_Unit')+TextFormatting.NewLine+
'Acres: '+Ceil((($feature.Shape__Area)/4046.91),2);
-John
Solved! Go to Solution.
In Pro, you can alter the font with HTML tags, like "<BOL>".
Also, check out using template literals, it can make for a much easier-to-read expression. Not sure about Pro, but in other contexts, it will respect a line break within the backtick string:
return `Hard: ${DomainName($feature, 'PER_HARDWO')}%
Con: ${DomainName($feature, 'PER_CONIFE')}%
Shrub: ${DomainName($feature, 'PER_SHRUB')}%
Herb: ${DomainName($feature, 'HERB_CODE')}%
<BOL>${DomainName($feature, 'Map_Unit')}</BOL>
Acres: ${Ceil((($feature.Shape__Area)/4046.91),2)}`
In Pro, you can alter the font with HTML tags, like "<BOL>".
Also, check out using template literals, it can make for a much easier-to-read expression. Not sure about Pro, but in other contexts, it will respect a line break within the backtick string:
return `Hard: ${DomainName($feature, 'PER_HARDWO')}%
Con: ${DomainName($feature, 'PER_CONIFE')}%
Shrub: ${DomainName($feature, 'PER_SHRUB')}%
Herb: ${DomainName($feature, 'HERB_CODE')}%
<BOL>${DomainName($feature, 'Map_Unit')}</BOL>
Acres: ${Ceil((($feature.Shape__Area)/4046.91),2)}`
Thanks for the advice Josh, I'll check out HTML tags, and hopefully that will work well.