Skip to content

Commit

Permalink
Add another example to docs
Browse files Browse the repository at this point in the history
  • Loading branch information
davidanthoff committed Jun 9, 2018
1 parent af85d03 commit dc84ff9
Showing 1 changed file with 41 additions and 1 deletion.
42 changes: 41 additions & 1 deletion docs/src/examples/examples_repeat_concatenation.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,4 +56,44 @@ dataset("cars") |>

## Interactive Scatterplot Matrix

TODO
```@example
using VegaLite, VegaDatasets
dataset("cars") |>
@vlplot(
repeat={
row=[:Horsepower, :Acceleration, :Miles_per_Gallon],
column=[:Miles_per_Gallon, :Acceleration, :Horsepower]
}
) +
@vlplot(
:point,
selection={
brush={
typ=:interval,
resolve=:union,
on="[mousedown[event.shiftKey], window:mouseup] > window:mousemove!",
translate="[mousedown[event.shiftKey], window:mouseup] > window:mousemove!",
zoom="wheel![event.shiftKey]"
},
grid={
typ=:interval,
resolve=:global,
bind=:scales,
translate="[mousedown[!event.shiftKey], window:mouseup] > window:mousemove!",
zoom="wheel![!event.shiftKey]"
}
},
x={field={repeat=:column}, typ=:quantitative},
y={field={repeat=:row}, typ=:quantitative},
color={
condition={
selection=:brush,
field=:Origin,
typ=:nominal
},
value=:grey
}
)
```

0 comments on commit dc84ff9

Please sign in to comment.