You signed in with another tab or window.Reload to refresh your session.You signed out in another tab or window.Reload to refresh your session.You switched accounts on another tab or window.Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/docs/api/view.md
+10-2Lines changed: 10 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -401,10 +401,18 @@ Returns the [scale](https://github.com/vega/vega/blob/master/packages/vega-scale
401
401
[projection](https://github.com/vega/vega/blob/master/packages/vega-projection/) instance with the given*name*. The return value is a*live* instance used by the underlying dataflow. Callers should take care not to modify the returned instance!
Returns the data set with the given*name*. The returned array of data objects is a*live* array used by the underlying dataflow. Callers that wish to modify the returned array should first make a defensive copy, for example using`view.data('name').slice()`.
407
+
If only one argument is provided, returns the data set with the given*name*. The returned array of data objects is a*live* array used by the underlying dataflow. Callers that wish to modify the returned array should first make a defensive copy, for example using`view.data('name').slice()`.
408
+
409
+
If two arguments are provided, removes the current data and inserts the provied input*values*, which can be either a single data object or an array of data objects. This call is equivalent to:
Data updates do not force an immediate update to the view: invoke the[runAsync](#view_runAsync) method when ready. Note also that a single argument (getter) call returns the*output* of the data transform pipeline, whereas the two argument (setter) call sets the*input* to the transform pipeline.