Vega-Lite: rule line over heatmap

67 views
Skip to first unread message

jak...@cs.washington.edu

unread,
Sep 14, 2016, 11:28:50 AM9/14/16
to vega-js
Hello,
I've been playing with the development version of Vega-Lite, particularly the layered charts. One thing I could not figure out how to do is add a rule line to a heatmap.  For example, what layer should I create to add a vertical rule to this plot?

{
  "data": {
  },
  "mark": "text",
  "encoding": {
    "text": {"value": " "},
    "row": {"field": "Origin"},
    "column": {"field": "Cylinders"},
    "color": {"aggregate": "average","field": "Miles_per_Gallon"}
  },
  "config": {"mark": {"applyColorToBackground": true}}
}

Any encoding I've tried with {... "mark": "rule"  ...} as a layer results in an error.

FYI – the reason for this is I want to be able to complete this example: http://nbviewer.jupyter.org/github/ellisonbg/altair/blob/master/altair/notebooks/12-Measles.ipynb
Thanks!
   Jake
Reply all
Reply to author
Forward
0 new messages