Skip to content

Chart Wrapper

Maryland Geographic Information Office edited this page Aug 9, 2017 · 7 revisions

Wrapper for charts

Include the bit below to add in charts to your open data page. Add in sources below the dummy data source (necessary to bypass Cedar).

{
  "dataset": {
    "data": {"features": []},
    "mappings": {
      "query": {
        "where": "1=1",
        "returnGeometry": false,
        "returnDistinctValues": false,
        "returnIdsOnly": false,
        "returnCountOnly": false,
        "outFields": "*",
        "sqlFormat": "standard",
        "f": "json"
      }
    },
    "query": {
      "where": "1=1",
      "returnGeometry": false,
      "returnDistinctValues": false,
      "returnIdsOnly": false,
      "returnCountOnly": false,
      "outFields": "*",
      "sqlFormat": "standard",
      "f": "json"
    }
  },
  "specification": {
    "inputs": [],
    "template": {
      "padding": "strict",
      "data": [
        {
          "name": "dummy",
          "url": "https://example.org",
          "format": {"type": "json","property": "features"}
        }
      ]
    }
  }
}

Add values that you configure in the Vega editor to the template object.

Clone this wiki locally