Vico

2.1. CartesianChart

2.1.1. Anatomy

CartesianChart draws charts based on Cartesian coordinate planes. Any such chart includes one or more CartesianLayers. The CartesianLayers are stacked, and each one has its own data.

For CartesianChart creation, see 5.2.2 (Compose) and 8.2.2 (views).

2.1.2. Hosts

A CartesianChart is used with a host—a composable or view that passes it data, draws it, and handles framework-specific matters, such as gesture detection.

For more, see 5.2.1 (Compose) and 8.2.1 (views).

2.2.3. Scroll and zoom

While scroll and zoom are handled at the framework level, core includes two shared high-level interfaces. The first one is Scroll, which is split into Scroll.Absolute and Scroll.Relative. These subinterfaces are used to represent absolute and relative scroll values, respectively. The following factory functions are available:

The second interface is Zoom, which is used to define zoom factors. The following factory functions are available:

For more, see 5.2.3 (Compose) and 8.2.3 (views).