vega / vega-lite-api

A JavaScript API for Vega-Lite.
https://observablehq.com/@vega/vega-lite-api
BSD 3-Clause "New" or "Revised" License
211 stars 17 forks source link

Example in docs gives different output for `mark` field #440

Open mhkeller opened 1 year ago

mhkeller commented 1 year ago

The example in this repo's README says it will produce JSON with a "mark": "bar", field. When I run the example, however, this field outputs as:

"mark": {
   "type": "bar"
 }

Here's a reproduction: https://svelte.dev/repl/ff231e9d0f5f474082d5dbc73e040a64?version=3.57.0

Everything else seems correct. Here's the full output:

{
  "$schema": "https://vega.github.io/schema/vega-lite/v5.json",
  "mark": {
    "type": "bar"
  },
  "data": {
    "url": "data/movies.json"
  },
  "encoding": {
    "x": {
      "field": "IMDB_Rating",
      "type": "quantitative",
      "bin": true
    },
    "y": {
      "type": "quantitative",
      "aggregate": "count"
    }
  }
}