forked from indiespirit/react-native-chart-kit
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.d.ts
115 lines (101 loc) · 2.51 KB
/
index.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
// Type definitions for ReactNativeChartKit 2.6
// Project: https://github.com/indiespirit/react-native-chart-kit
// TypeScript Version: 3.0
import * as React from 'react'
// LineChart
export interface LineChartProps {
data: object
width: number
height: number
withDots?: boolean
withShadow?: boolean
withInnerLines?: boolean
withOuterLines?: boolean
fromZero?: boolean
yAxisLabel?: string
chartConfig: object
decorator?: Function
/**
* Callback that is called when a data point is clicked.
*/
onDataPointClick?: (data: {
index: number;
value: number;
dataset: Dataset;
x: number;
y: number;
getColor: (opacity: number) => string;
}) => void;
/**
* Renders additional content for dots in a line chart.
* Takes `({x, y, index})` as arguments.
*/
renderDotContent?: (params: {
x: number;
y: number;
index: number;
value: number;
}) => React.ReactNode;
style?: object
bezier?: boolean
getDotColor?: (dataPoint: any, index: number) => string
horizontalLabelRotation?: number
verticalLabelRotation?: number
}
export class LineChart extends React.Component<LineChartProps> {}
// ProgressChart
export interface ProgressChartProps {
data: Array<number>
width: number
height: number
chartConfig: object
}
export class ProgressChart extends React.Component<ProgressChartProps> {}
// BarChart
export interface BarChartProps {
data: object
width: number
height: number
fromZero?: boolean
yAxisLabel: string
chartConfig: object
style?: object
horizontalLabelRotation?: number
verticalLabelRotation?: number
}
export class BarChart extends React.Component<BarChartProps> {}
// StackedBarChart
export interface StackedBarChartProps {
data: object
width: number
height: number
chartConfig: object
style?: object
}
export class StackedBarChart extends React.Component<StackedBarChartProps> {}
// PieChart
export interface PieChartProps {
data: Array<any>
width: number
height: number
chartConfig: object
accessor: string
backgroundColor: string
paddingLeft: string
center?: Array<number>
absolute?: boolean
}
export class PieChart extends React.Component<PieChartProps> {}
// ContributionGraph
export interface ContributionGraphProps {
values: Array<any>
endDate: Date
numDays: number
width: number
height: number
chartConfig: object
accessor?: string
}
export class ContributionGraph extends React.Component<ContributionGraphProps> {}
// AbstractChart
export class AbstractChart extends React.Component {}