View
Previous
wordCloud
Next
overview
Loading...
In G2, a View is used to draw multiple marks. A view possesses a coordinate system and serves as the smallest unit for applying interactions.
({type: 'view',children: [{ type: 'interval' }],});
The top-level Chart is, by default, a view:
// Add an Interval to this viewchart.interval();
When composite nodes are added to the top-level Chart, views can be declared using chart.view
:
const spaceFlex = chart.spaceFlex();const view = spaceFlex.view();view.line();view.point();
({type: 'view',data: [],encode: {},scale: {},transform: [],coordinate: {},style: {},labelTransform: {},title: {},axis: {},legend: {},tooltip: {},scrollbar: {},slider: {},interaction: {},theme: {},});