Hi,
I'm creating a dashboard without a map, only statistics. I know that if I was using a map that I could change it in the web map. But this one is only numbers and pie charts. I'm using advanced formatting to generate some of the data that is used in indicators. How do I get the commas to show up in numbers such as 30,705 rather than 30705?
Thanks,
Lorinda
Solved! Go to Solution.
If popdiff is the label, not the data, you can use this
var popdiff = Text(tot20 - tot10, '#,###')
Hello... I think you may have to format the data this way before adding it to your dashboard. Either in the data source itself (ie. database, service, etc.) or in a web map. I know there is a way to show comma separators in a web map by formatting the fields.
Actually, yes, the data is formatted the way I want for the simple content. However, I'm using the advanced formatting in the online version of dashboards. I'm looking for how to have the calculated fields have the commas included. They are calculating properly, just not formatted properly.
Thanks,
Lorinda
Go to Configure and click on Indicator.
Click on Edit off to the right of Value Formatting and turn on Digit grouping.
Using Advanced Formatting, the Value Formatting is disabled. Hence, asking for if there is a CSS, HTML, javascript, what have you type of formatting that will be in this scripting:
var tot20 = $datapoint["TOTAL"]
var tot10 = $datapoint["TOTAL_1"]
var popdiff = tot20 - tot10
return {
//textColor:'',
//backgroundColor:'',
//topText: '',
//topTextColor: '',
//topTextOutlineColor: '',
//topTextMaxSize: 'medium',
middleText: (popdiff),
middleTextColor: '#38a800',
middleTextOutlineColor: '',
middleTextMaxSize: 'large',
//bottomText: '',
//bottomTextColor: '',
//bottomTextOutlineColor: '',
//bottomTextMaxSize: 'medium',
iconName:'People',
//iconAlign:'left',
iconColor:'#38a800',
//iconOutlineColor:'',
//noValue:false,
//attributes: {
// attribute1: '',
// attribute2: ''
// }
}
If popdiff is the label, not the data, you can use this
var popdiff = Text(tot20 - tot10, '#,###')