cedar icon indicating copy to clipboard operation
cedar copied to clipboard

Add to doc - examples of changing data formats

Open ghudgins opened this issue 6 years ago • 1 comments

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
    }
  ]
}

ghudgins avatar Sep 28 '18 13:09 ghudgins

yea, but 'is one goes to 11!

tomwayson avatar Sep 28 '18 23:09 tomwayson