Is is possible to add the thousands separators in the title section of the popup template? So 1000 shows as 1,000. I know you can format in the content using digitSeparator, but I cannot figure out how to do it in the title section.
Solved! Go to Solution.
Hi @MatthewDriscoll ,
This can be done by setting the digitSeparator value of the FieldInfoFormat on the fieldInfos at the PopupTemplate level to true for the particular field you are displaying in the title. Here's an example showing how to do this: https://codepen.io/laurenb14/pen/MWXwKem?editors=1000
const popupTemplate = {
title: "2010 Population: {POP2010}",
outFields: ["*"],
content: "Test Content",
fieldInfos: [{
fieldName: "POP2010",
format: {
digitSeparator: true,
places: 0
}
}]
};
Hope this helps!
Hi @MatthewDriscoll ,
This can be done by setting the digitSeparator value of the FieldInfoFormat on the fieldInfos at the PopupTemplate level to true for the particular field you are displaying in the title. Here's an example showing how to do this: https://codepen.io/laurenb14/pen/MWXwKem?editors=1000
const popupTemplate = {
title: "2010 Population: {POP2010}",
outFields: ["*"],
content: "Test Content",
fieldInfos: [{
fieldName: "POP2010",
format: {
digitSeparator: true,
places: 0
}
}]
};
Hope this helps!