Advertisement
Guest User

Untitled

a guest
Oct 19th, 2019
116
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.45 KB | None | 0 0
  1. A responsive chart demo in Vega. The spec is a modification of a Vega-Lite output:
  2.  
  3. - Set width and height to be signals. The signals gets their initial values from `containerSize()`, and listens to subsequent resize events on `window:resize`.
  4. - Use `autosize: { type: "fit", contains: "padding" }`. This ensures that the width / height correspond to the entire chart, not the plotting area.
  5.  
  6. Click `Open` and resize the window to see this example in action.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement