Moves charts onto an in-package Skia v3 engine, drops victory-native and @shopify/react-native-skia, and layers component styles for Uniwind 1.13.
The twelfth beta of HeroUI Native Pro keeps the chart components and replaces the engine under them. Cartesian, polar, and pie charts now render through a Skia v3 engine that ships with the package. victory-native is no longer a dependency, and @shopify/react-native-skia is replaced by the optional react-native-skia peer (>=3.0.0). Component props are unchanged. Component styles and brutalism overrides also move into @layer components so they follow Uniwind 1.13: a Tailwind utility on className overrides the component class.
Follow the installation guide to authenticate the private registry with your HEROUI_PERSONAL_TOKEN, install heroui-native-pro, and wire up HeroUINativeProvider.
Update to the latest version:
npm install heroui-native-pro@latestpnpm add heroui-native-pro@latestyarn add heroui-native-pro@latestbun add heroui-native-pro@latestAreaChart, BarChart, LineChart, ComposedChart, PieChart, RadarChart, and RadialChart no longer wrap victory-native. The cartesian, polar, and pie engines live in the package, adapted from victory-native for react-native-skia v3. Press-state helpers that used to come from victory-native are exported from heroui-native-pro:
useChartPressStateChartBoundsChartPressStatePointsArrayScatter and ScatterShapePath hooks such as useLinePath, useAreaPath, useBarPath, useBarGroupPaths, useStackedBarPaths, useSlicePath, and useSliceAngularInsetPath stay on heroui-native-pro.
react-native-skia stays an optional peer. Apps that never render a chart can skip it. Rendering a chart without the peer throws, and the message tells you to install it:
npx expo install react-native-skiaReact Native Skia v3 draws with Graphite, Skia's GPU backend, on Dawn. Dawn talks to Metal on Apple platforms and Vulkan on Android. Set the iOS deployment target to 15.1 and Android minSdkVersion to 26 (Vulkan 1.1). Expo Go still bundles Skia v2, so charts need a development build. On Expo, raise the Android floor with expo-build-properties.
Then rebuild the native app. LinearGradient, RadialGradient, DashPathEffect, and useFont keep the same props; import them from react-native-skia.
react-native-skia remains optional, so a missing peer fails when a chart renders and prints an install hint (#95).Component styles and brutalism overrides are wrapped in @layer components (#96). Upgrade Uniwind to 1.13 so those rules take part in the cascade. On 1.13, a Tailwind utility on className overrides the component class.
Remove victory-native and @shopify/react-native-skia. Charts need react-native-skia >=3.0.0. That release renders through Graphite on Dawn (Metal on Apple, Vulkan on Android) and requires iOS 15.1 and Android API 26. The v3 migration guide covers the platform floors, Expo Go, and the path API changes.
npm uninstall victory-native @shopify/react-native-skia
npx expo install react-native-skiaBefore:
import { useChartPressState, type ChartBounds } from "victory-native";
import { LinearGradient, vec } from "@shopify/react-native-skia";After:
import { useChartPressState, type ChartBounds } from "heroui-native-pro";
import { LinearGradient, vec } from "react-native-skia";heroui-native stays at ^1.0.10.
Custom drawing that built a mutable path with Skia.Path.Make(), moveTo, and lineTo has to use the Skia v3 path API (Skia.Path.Line or Skia.PathBuilder). Chart component props are unchanged.
The following chart pages now import Skia from react-native-skia and press state from heroui-native-pro:
Thanks to @VladyslavMartynov10 for the Skia v3 chart engine (#94, #95) and the Uniwind 1.13 style layers (#96).