vega / vega-lite

A concise grammar of interactive graphics, built on Vega.
https://vega.github.io/vega-lite/
BSD 3-Clause "New" or "Revised" License
4.67k stars 608 forks source link

please add a "grouped bar" example to the gallery #572

Closed jowens closed 9 years ago

jowens commented 9 years ago

Also perhaps useful: show both a grouped-bar and a grouped-point graph showing the same data, simply so users can see how the two vega-lite specs differ.

domoritz commented 9 years ago

Great ideas. We will add some more examples. Maybe you can send a pr for some of the examples you mentioned.

jowens commented 9 years ago

If I had a grouped-bar working, which I don't, I would. :)

domoritz commented 9 years ago

Like this (created with polestar)

{
  "marktype": "bar",
  "encoding": {
    "x": {"name": "Acceleration","type": "Q","aggregate": "median"},
    "y": {"name": "Origin","type": "N"},
    "row": {"axis": {"maxLabelLength": 12},"name": "Cylinders","type": "O"},
    "color": {"scale": {"quantitativeRange": ["#AFC6A3","#09622A"]}}
  },
  "data": {"url": "data/cars.json"}
}
jowens commented 9 years ago

Yes! Like that! Thank you! I'll play with my examples later this week.