Native

Android

@hzblj/zyplot/android draws on a Jetpack Compose Canvas. Marks, axis text, grid, annotations and the tooltip are all drawn by the module, so a chart is one view rather than a tree of them. Importing it commits a file to Android, so name that file *.android.tsx.

tsx
// spend.android.tsx
import { Chart } from '@hzblj/zyplot/android'

export function Spend() {
  return (
    <Chart.Waterfall
      data={movements}
      format={{ prefix: '$', decimals: 0 }}
      interaction={{ haptics: true, tooltip: true }}
    />
  )
}

Android-only charts

Two forms the Compose Canvas draws that neither other renderer does.

Web not supportediOS not supportedAndroid supported
PropTypeDefaultDescription
Chart.Waterfall*ChartWaterfallPropsAndroidRunning total across signed movements, colored by direction.
Chart.Lollipop*ChartLollipopPropsAndroidA stem and a dot per category — a bar chart with the ink of a dot plot.

Android axis options

xAxis and yAxis accept everything ChartAxisOptions defines, plus overflow handling for long tick labels.

PropTypeDefaultDescription
xAxis.labelOverflow"clip" | "ellipsis" | "visible""ellipsis"How a tick label that exceeds its band is cut.
yAxis.labelOverflow"clip" | "ellipsis" | "visible""ellipsis"How a tick label that exceeds the gutter is cut.