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 Swift Charts has no equivalent for. They are absent from the shared @hzblj/zyplot namespace, so TypeScript rejects them unless the file imports @hzblj/zyplot/android.

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.

The Compose renderer

One Canvas draws the whole chart — marks, axis text, grid, annotations and the tooltip — so a chart is a single view rather than a tree of them. Every documented form links to the draw function behind it from its own page.

PropTypeDefaultDescription
android/.../bridge/ZyplotModule.ktbridgeThe Expo module: the ExpoComposeView, its single prop, and the composable root.
android/.../core/ChartConfiguration.ktmodelParses the JSON configuration and resolves the palette, axes and theme.
android/.../charts/ZyplotChart.kthostAnimation, gestures, the surface container and dispatch to the draw functions.
android/.../charts/{cartesian,radial,specialized}canvasThe draw functions themselves, split into cartesian, radial and specialized.

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.