Hosts
A host is the top-level composable function or view for a chart. Hosts act as entry points—they accept implementations or subclasses of Chart, ChartEntryModel or ChartModelProducer, and AxisRenderer, among other things. They also house options related to scrolling, zooming, and other Chart-independent matters.
Notably, a host accepts an instance of HorizontalLayout, which lets you switch between a segmented style and a full-width one. You can also override the x step, which is the difference between the x values of neighboring major entries and defaults to the GCD of all the x values. For charts with dynamic data, placeholders can be added. These are shown when no ChartEntryModel is available.
For Jetpack Compose, the host is the Chart composable function. It is interacted with via its parameters. In the view system, there are two hosts—ChartView and ComposedChartView—both of which extend BaseChartView. They are interacted with via their public members and XML attributes.
Across this wiki, in the context of the view system, we’ll be mentioning fields and functions of BaseChartView, so keep in mind that you can access all those fields and functions via ChartView and ComposedChartView.