UNPKG

one

Version:

One is a React framework for web, iOS, and Android apps.

30 lines (28 loc) • 1.18 kB
import type { ColorValue } from 'react-native' // Swift.Chart takes Expo UI's Chart props (@expo/ui/swift-ui Chart), so a chart // written for Expo renders unchanged. export type ChartType = 'line' | 'point' | 'bar' | 'area' | 'pie' | 'rectangle' export type ChartPointStyle = 'circle' | 'square' | 'diamond' export type ChartDataPoint = Readonly<{ // a label string plots on a categorical axis, a number on a numeric one. x: string | number y: number color?: ColorValue }> export type LineChartStyle = Readonly<{ dashArray?: readonly number[] width?: number pointStyle?: ChartPointStyle pointSize?: number color?: ColorValue }> export type AreaChartStyle = Readonly<{ color?: ColorValue }> export type BarChartStyle = Readonly<{ cornerRadius?: number; width?: number }> export type PieChartStyle = Readonly<{ innerRadius?: number; angularInset?: number }> export type PointChartStyle = Readonly<{ pointStyle?: ChartPointStyle; pointSize?: number }> export type RectangleChartStyle = Readonly<{ color?: ColorValue; cornerRadius?: number }> export type RuleChartStyle = Readonly<{ color?: ColorValue lineWidth?: number dashArray?: readonly number[] }>