- Source:
Methods
-
stream( [stream])
-
If stream is an object or an array of objects, appends the stream to existing data. If stream is specified, during re-rendering, it will keeps the domain interval limited by
viewInterval
. When re-renders chart, should use .render(true). If stream is not specified, returns the existing stream.Parameters:
Name Type Argument Default Description stream
object | Array.<Object> <optional>
null - Source:
Returns:
- Type
- zoom | ZoomMixin
Example
stream.stream({category:'A', sales: 100}) .render(true); stream.stream([ {category: 'D', sales: 100}, {category: 'E', sales: 200} ]).render(true);
-
viewInterval( [unit] [, multiple])
-
If unit is number or string, limit the key domain's length or distance within the interval. If the key domain's scale is ordnial, the length of domain will be the same to unit. Also, if the scale is continous, the distance of domain will be fixed as much as unit. If unit is string, it must be a time interval. When multiple exists, it will multiply the unit. If unit is not specified, returns the existing viewInterval.
Parameters:
Name Type Argument Default Description unit
number | string <optional>
null multiple
number <optional>
1 - Source:
Returns:
- Type
- zoom | ZoomMixin
Example
stream.viewInterval(1000) stream.viewInterval('month', 3)