Can any one help to answer two questions? 1) how to configure the number format for value in tooltip? 2) is there a way to convert value on the fly without change its self in data?
I am using JSON chart in Hub.I tested code using https://esri.github.io/cedar/
the value of outStatisticFieldName "MAX_MAX_De_sum" from the query, I want to make sure
really appreciated for your help
{
"type": "bar-horizontal",
"numberFormatter":[{
"numberFormat":{"decimalSeparator":".", "thousandsSeparator":",", "precision":-1}
}],
"datasets": [
{
"name": "dataset1",
"query": {
"where": "FIRST_Stre <>' ' and FIRST_Stre <> 'Hwy 7'",
"orderByFields": "MAX_MAX_De_sum DESC",
"groupByFieldsForStatistics": "FIRST_Stre",
"having": "SUM(MAX_MAX_De)>24",
"outStatistics": [
{
"statisticType": "sum",
"onStatisticField": "MAX_MAX_De",
"outStatisticFieldName": "MAX_MAX_De_sum"
}
]
},
"url": "https://services.arcgis.com/6iGx1Dq91oKtcE7x/arcgis/rest/services/UUID_Delay_Summary_Hourly_pub_view..."
}
],
"series": [
{
"source": "dataset1",
"category": {
"field": "FIRST_Stre",
"label": "Highway"
},
"value": {
"field": "cast(MAX_MAX_De_sum as decimal(10,2))",
"label": "Delay (in sec)"
}
}
],
"style": {
"colors": [
"#026873"
]
},
"overrides": {
"graphs": [{
"valueField" : "MAX_MAX_De_sum",
"balloonText": "[[MAX_MAX_De_sum]]",
"numberFormatter":{"decimalSeparator":".", "thousandsSeparator":",", "precision":2,"numberFormat": "#,###.00"}
}],
"valueAxes": [{
"title": "Elevation (feets)",
"numberFormatter": {
"numberFormat": "#,###.00"
}
}],
"xAxes":[{
"numberFormatter": {
"numberFormat": "#,###.00"
}
}]
}
}