Kiva
Chart
Comprehensive charting library with 13 chart types, VChart adapter, touch interactions, and animations.
iOSAndroid
Installation
pnpm dlx @kivacore/ui-cli add @kivacore/rn-chartRequired Packages(1 package)
pnpm add react-native-svgUsage
import { KivaLineChart } from '@/components/kiva-native/chart';
const data = {
categories: ['Jan', 'Feb', 'Mar', 'Apr', 'May'],
series: [
{ name: 'Revenue', data: [30, 40, 35, 50, 49] },
{ name: 'Expenses', data: [20, 25, 30, 28, 32] }
]
};
<KivaLineChart
data={data}
title="Revenue vs Expenses"
showGrid
animated
height={300}
/>Chart Types
Line Chart
import { KivaLineChart } from '@/components/kiva-native/chart';
<KivaLineChart
data={{ categories: ['A', 'B', 'C'], series: [{ name: 'S1', data: [10, 20, 15] }] }}
smooth
showArea
showGrid
showCrosshair
showTooltip
/>Bar Chart
import { KivaBarChart } from '@/components/kiva-native/chart';
<KivaBarChart
data={{ categories: ['Q1', 'Q2', 'Q3'], series: [{ name: '2024', data: [120, 200, 150] }] }}
stack
horizontal
/>Pie Chart
import { KivaPieChart } from '@/components/kiva-native/chart';
<KivaPieChart
data={[
{ name: 'Chrome', value: 65 },
{ name: 'Safari', value: 18 },
{ name: 'Firefox', value: 10 }
]}
donut
showLabels
/>Area Chart
import { KivaAreaChart } from '@/components/kiva-native/chart';
<KivaAreaChart
data={{ categories: ['Mon', 'Tue', 'Wed'], series: [{ name: 'Users', data: [120, 132, 101] }] }}
smooth
stack
/>Scatter Chart
import { KivaScatterChart } from '@/components/kiva-native/chart';
<KivaScatterChart
data={{ series: [{ name: 'Points', data: [{ x: 10, y: 20 }, { x: 30, y: 40 }] }] }}
showGrid
/>Radar Chart
import { KivaRadarChart } from '@/components/kiva-native/chart';
<KivaRadarChart
data={{
categories: ['Speed', 'Power', 'Defense', 'Agility', 'Stamina'],
series: [{ name: 'Player', data: [80, 90, 70, 85, 75] }]
}}
/>Gauge Chart
import { KivaGaugeChart } from '@/components/kiva-native/chart';
<KivaGaugeChart
data={{ value: 72, min: 0, max: 100, label: 'Score' }}
showValue
/>Funnel Chart
import { KivaFunnelChart } from '@/components/kiva-native/chart';
<KivaFunnelChart
data={[
{ name: 'Visits', value: 5000 },
{ name: 'Leads', value: 2500 },
{ name: 'Sales', value: 500 }
]}
showLabels
/>Heatmap Chart
import { KivaHeatmapChart } from '@/components/kiva-native/chart';
<KivaHeatmapChart
data={{
xLabels: ['Mon', 'Tue', 'Wed'],
yLabels: ['Morning', 'Afternoon', 'Evening'],
data: [
{ x: 0, y: 0, value: 10 },
{ x: 1, y: 1, value: 25 },
{ x: 2, y: 2, value: 15 }
]
}}
showValues
/>Treemap Chart
import { KivaTreemapChart } from '@/components/kiva-native/chart';
<KivaTreemapChart
data={[
{ name: 'Engineering', value: 45 },
{ name: 'Design', value: 25 },
{ name: 'Marketing', value: 30 }
]}
showLabels
showValues
/>Candlestick Chart
import { KivaCandlestickChart } from '@/components/kiva-native/chart';
<KivaCandlestickChart
data={{
data: [
{ date: 'Mon', open: 100, high: 120, low: 95, close: 115 },
{ date: 'Tue', open: 115, high: 125, low: 110, close: 108 }
]
}}
showVolume
/>Sparkline Chart
import { KivaSparklineChart } from '@/components/kiva-native/chart';
<KivaSparklineChart
data={{ data: [5, 10, 5, 20, 8, 15] }}
width={200}
height={40}
showArea
smooth
/>Combo Chart (Bar + Line)
import { KivaComboChart } from '@/components/kiva-native/chart';
<KivaComboChart
data={{
categories: ['Q1', 'Q2', 'Q3', 'Q4'],
series: [
{ name: 'Revenue', data: [120, 200, 150, 80], type: 'bar' },
{ name: 'Growth', data: [10, 15, 12, 8], type: 'line', smooth: true }
]
}}
/>VChart Adapter
The KivaVChart component accepts VChart-compatible spec format and renders the appropriate chart.
import { KivaVChart } from '@/components/kiva-native/chart';
<KivaVChart
spec={{
type: 'bar',
data: [{ values: [{ x: 'A', y: 10 }, { x: 'B', y: 20 }] }],
xField: 'x',
yField: 'y'
}}
width={300}
height={200}
/>API Reference — Base Props
All chart components share these base props:
| Prop | Type | Default | Description |
|---|---|---|---|
width | number | screen width | Chart width in pixels |
height | number | 300 | Chart height in pixels |
title | string | — | Chart title text |
description | string | — | Chart description text |
loading | boolean | false | Show loading state |
error | string | — | Error message to display |
className | string | — | Additional CSS classes |
config | ChartConfig | — | Axis, grid, legend, tooltip configuration |
animated | boolean | false | Enable entry animations |
animationDuration | number | 500 | Animation duration in milliseconds |
animationDelay | number | 0 | Animation delay in milliseconds |
API Reference — Touch Props
Charts with touch support (Line, Area, Combo) accept:
| Prop | Type | Default | Description |
|---|---|---|---|
showCrosshair | boolean | false | Show crosshair line on touch |
showTooltip | boolean | false | Show tooltip on touch |
tooltipComponent | (data: TooltipData) => ReactNode | — | Custom tooltip renderer |
onTouch | (point: TooltipData | null) => void | — | Touch event callback |
API Reference — Chart Config
| Prop | Type | Default | Description |
|---|---|---|---|
padding | { top, right, bottom, left } | { 20, 20, 50, 50 } | Chart SVG internal padding |
xAxis | ChartAxis | — | X axis configuration |
yAxis | ChartAxis | — | Y axis configuration |
grid | ChartGrid | — | Grid line configuration |
legend | ChartLegend | — | Legend position and alignment |
tooltip | ChartTooltip | — | Tooltip formatting |
Components
| Component | Description |
|---|---|
KivaLineChart | Line chart with smooth curves, area fill, crosshair |
KivaBarChart | Vertical/horizontal bar chart with stacking |
KivaPieChart | Pie/donut chart with labels |
KivaAreaChart | Stacked area chart with smooth curves |
KivaScatterChart | Scatter plot with grid |
KivaRadarChart | Radar/spider chart |
KivaGaugeChart | Semicircular gauge with value display |
KivaFunnelChart | Funnel/pyramid chart with labels |
KivaHeatmapChart | Color-encoded matrix chart |
KivaTreemapChart | Proportional rectangle layout |
KivaCandlestickChart | OHLC financial chart with volume |
KivaSparklineChart | Inline mini chart (no axes) |
KivaComboChart | Combined bar + line chart |
KivaVChart | VChart spec adapter |
Core Sub-Components
| Component | Description |
|---|---|
KivaChartAxis | Axis labels and ticks |
KivaChartGrid | Background grid lines |
KivaChartLegend | Color legend with series names |
KivaChartCrosshair | Touch crosshair overlay |
KivaChartTooltip | Floating data tooltip |
Hooks
| Hook | Description |
|---|---|
useChartAnimation | Returns animated progress value (0 → 1) for chart transitions |
useChartTouch | Pan responder for crosshair and tooltip interactions |
Type Exports
| Type | Description |
|---|---|
LineChartProps | Props for KivaLineChart |
BarChartProps | Props for KivaBarChart |
PieChartProps | Props for KivaPieChart |
AreaChartProps | Props for KivaAreaChart |
ScatterChartProps | Props for KivaScatterChart |
RadarChartProps | Props for KivaRadarChart |
GaugeChartProps | Props for KivaGaugeChart |
FunnelChartProps | Props for KivaFunnelChart |
HeatmapChartProps | Props for KivaHeatmapChart |
TreemapChartProps | Props for KivaTreemapChart |
CandlestickChartProps | Props for KivaCandlestickChart |
SparklineChartProps | Props for KivaSparklineChart |
ComboChartProps | Props for KivaComboChart |
KivaVChartProps | Props for KivaVChart adapter |
ChartConfig | Chart configuration object |
ChartData | Generic chart data type |
ChartSeries | Series data definition |
TooltipData | Tooltip callback data |
VChartSpec | VChart-compatible spec type |
Calendar
Full calendar for React Native — month, week, day, agenda and year views plus year-timeline, quarter and 13-week period timelines, with drag & drop, resize, user / color filters, settings and event sheets.
Check In
Location-based check-in/check-out system with timer, option selection, and check-out form.