cedar
cedar copied to clipboard
Add to doc - examples of changing data formats
This one takes a string to a number...
{
"type": "line",
"datasets": [
{
"url": "https://services1.arcgis.com/KVHZNprt62ZdIujN/arcgis/rest/services/Affordable_Housing/FeatureServer/0",
"query": {
"groupByFieldsForStatistics": "Year",
"outStatistics": [
{
"statisticType": "sum",
"onStatisticField": "CAST(Ownership_Homes as float)",
"outStatisticFieldName": "Ownership_Homes_Sum"
},
{
"statisticType": "sum",
"onStatisticField": "CAST(Rental_Homes as float)",
"outStatisticFieldName": "Rental_Homes_Sum"
}
],
"orderByFields": "Year ASC",
"sqlFormat": "standard"
}
}
],
"series": [
{
"category": {
"field": "Year",
"label": "Year"
},
"group": true,
"value": {
"field": "Ownership_Homes_Sum",
"label": "Ownership_Homes_Sum"
}
},
{
"category": {
"field": "Year",
"label": "Year"
},
"value": {
"field": "Rental_Homes_Sum",
"label": "Rental_Homes_Sum"
},
"group": true
}
]
}
yea, but 'is one goes to 11!