Docyrus
Chart
Comprehensive charting library with 13 chart types, VChart adapter, touch interactions, and animations.
iOSAndroid
Installation
pnpm dlx @docyrus/cli add @docyrus/rn-chartRequired Packages(1 package)
pnpm add react-native-svgUsage
import { DocyLineChart } from '@/components/docyrus-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] }
]
};
<DocyLineChart
data={data}
title="Revenue vs Expenses"
showGrid
animated
height={300}
/>Chart Types
Line Chart
import { DocyLineChart } from '@/components/docyrus-native/chart';
<DocyLineChart
data={{ categories: ['A', 'B', 'C'], series: [{ name: 'S1', data: [10, 20, 15] }] }}
smooth
showArea
showGrid
showCrosshair
showTooltip
/>Bar Chart
import { DocyBarChart } from '@/components/docyrus-native/chart';
<DocyBarChart
data={{ categories: ['Q1', 'Q2', 'Q3'], series: [{ name: '2024', data: [120, 200, 150] }] }}
stack
horizontal
/>Pie Chart
import { DocyPieChart } from '@/components/docyrus-native/chart';
<DocyPieChart
data={[
{ name: 'Chrome', value: 65 },
{ name: 'Safari', value: 18 },
{ name: 'Firefox', value: 10 }
]}
donut
showLabels
/>Area Chart
import { DocyAreaChart } from '@/components/docyrus-native/chart';
<DocyAreaChart
data={{ categories: ['Mon', 'Tue', 'Wed'], series: [{ name: 'Users', data: [120, 132, 101] }] }}
smooth
stack
/>Scatter Chart
import { DocyScatterChart } from '@/components/docyrus-native/chart';
<DocyScatterChart
data={{ series: [{ name: 'Points', data: [{ x: 10, y: 20 }, { x: 30, y: 40 }] }] }}
showGrid
/>Radar Chart
import { DocyRadarChart } from '@/components/docyrus-native/chart';
<DocyRadarChart
data={{
categories: ['Speed', 'Power', 'Defense', 'Agility', 'Stamina'],
series: [{ name: 'Player', data: [80, 90, 70, 85, 75] }]
}}
/>Gauge Chart
import { DocyGaugeChart } from '@/components/docyrus-native/chart';
<DocyGaugeChart
data={{ value: 72, min: 0, max: 100, label: 'Score' }}
showValue
/>Funnel Chart
import { DocyFunnelChart } from '@/components/docyrus-native/chart';
<DocyFunnelChart
data={[
{ name: 'Visits', value: 5000 },
{ name: 'Leads', value: 2500 },
{ name: 'Sales', value: 500 }
]}
showLabels
/>Heatmap Chart
import { DocyHeatmapChart } from '@/components/docyrus-native/chart';
<DocyHeatmapChart
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 { DocyTreemapChart } from '@/components/docyrus-native/chart';
<DocyTreemapChart
data={[
{ name: 'Engineering', value: 45 },
{ name: 'Design', value: 25 },
{ name: 'Marketing', value: 30 }
]}
showLabels
showValues
/>Candlestick Chart
import { DocyCandlestickChart } from '@/components/docyrus-native/chart';
<DocyCandlestickChart
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 { DocySparklineChart } from '@/components/docyrus-native/chart';
<DocySparklineChart
data={{ data: [5, 10, 5, 20, 8, 15] }}
width={200}
height={40}
showArea
smooth
/>Combo Chart (Bar + Line)
import { DocyComboChart } from '@/components/docyrus-native/chart';
<DocyComboChart
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 DocyVChart component accepts VChart-compatible spec format and renders the appropriate chart.
import { DocyVChart } from '@/components/docyrus-native/chart';
<DocyVChart
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 |
|---|---|
DocyLineChart | Line chart with smooth curves, area fill, crosshair |
DocyBarChart | Vertical/horizontal bar chart with stacking |
DocyPieChart | Pie/donut chart with labels |
DocyAreaChart | Stacked area chart with smooth curves |
DocyScatterChart | Scatter plot with grid |
DocyRadarChart | Radar/spider chart |
DocyGaugeChart | Semicircular gauge with value display |
DocyFunnelChart | Funnel/pyramid chart with labels |
DocyHeatmapChart | Color-encoded matrix chart |
DocyTreemapChart | Proportional rectangle layout |
DocyCandlestickChart | OHLC financial chart with volume |
DocySparklineChart | Inline mini chart (no axes) |
DocyComboChart | Combined bar + line chart |
DocyVChart | VChart spec adapter |
Core Sub-Components
| Component | Description |
|---|---|
DocyChartAxis | Axis labels and ticks |
DocyChartGrid | Background grid lines |
DocyChartLegend | Color legend with series names |
DocyChartCrosshair | Touch crosshair overlay |
DocyChartTooltip | 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 DocyLineChart |
BarChartProps | Props for DocyBarChart |
PieChartProps | Props for DocyPieChart |
AreaChartProps | Props for DocyAreaChart |
ScatterChartProps | Props for DocyScatterChart |
RadarChartProps | Props for DocyRadarChart |
GaugeChartProps | Props for DocyGaugeChart |
FunnelChartProps | Props for DocyFunnelChart |
HeatmapChartProps | Props for DocyHeatmapChart |
TreemapChartProps | Props for DocyTreemapChart |
CandlestickChartProps | Props for DocyCandlestickChart |
SparklineChartProps | Props for DocySparklineChart |
ComboChartProps | Props for DocyComboChart |
DocyVChartProps | Props for DocyVChart 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.