1 |
|
2 | import { ViewStyle } from "react-native";
|
3 | import AbstractChart, { AbstractChartConfig, AbstractChartProps } from "./AbstractChart";
|
4 | export interface StackedBarChartData {
|
5 | labels: string[];
|
6 | legend: string[];
|
7 | data: number[][];
|
8 | barColors: string[];
|
9 | }
|
10 | export interface StackedBarChartProps extends AbstractChartProps {
|
11 | |
12 |
|
13 |
|
14 |
|
15 |
|
16 |
|
17 |
|
18 |
|
19 |
|
20 |
|
21 |
|
22 | data: StackedBarChartData;
|
23 | width: number;
|
24 | height: number;
|
25 | chartConfig: AbstractChartConfig;
|
26 | hideLegend: boolean;
|
27 | style?: Partial<ViewStyle>;
|
28 | barPercentage?: number;
|
29 | decimalPlaces?: number;
|
30 | |
31 |
|
32 |
|
33 | withVerticalLabels?: boolean;
|
34 | |
35 |
|
36 |
|
37 | withHorizontalLabels?: boolean;
|
38 | |
39 |
|
40 |
|
41 | segments?: number;
|
42 | }
|
43 | declare type StackedBarChartState = {};
|
44 | declare class StackedBarChart extends AbstractChart<StackedBarChartProps, StackedBarChartState> {
|
45 | getBarPercentage: () => number;
|
46 | getBarRadius: (ret: string | any[], x: string | any[]) => number;
|
47 | renderBars: ({ data, width, height, paddingTop, paddingRight, border, colors, stackedBar }: Pick<Pick<AbstractChartConfig, "color" | "style" | "height" | "width" | "propsForBackgroundLines" | "propsForLabels" | "labelColor" | "count" | "paddingTop" | "paddingRight" | "horizontalLabelRotation" | "formatYLabel" | "labels" | "horizontalOffset" | "stackedBar" | "verticalLabelRotation" | "formatXLabel" | "backgroundColor" | "backgroundGradientFrom" | "backgroundGradientFromOpacity" | "backgroundGradientTo" | "backgroundGradientToOpacity" | "fillShadowGradient" | "fillShadowGradientOpacity" | "useShadowColorFromDataset" | "strokeWidth" | "barPercentage" | "barRadius" | "propsForDots" | "decimalPlaces" | "linejoinType" | "scrollableDotFill" | "scrollableDotStrokeColor" | "scrollableDotStrokeWidth" | "scrollableDotRadius" | "scrollableInfoViewStyle" | "scrollableInfoTextStyle" | "scrollableInfoTextDecorator" | "scrollableInfoOffset" | "scrollableInfoSize">, "height" | "width" | "paddingTop" | "paddingRight" | "stackedBar"> & {
|
48 | border: number;
|
49 | colors: string[];
|
50 | data: number[][];
|
51 | }) => any[][];
|
52 | renderLegend: ({ legend, colors, width, height }: Pick<AbstractChartConfig, "height" | "width"> & {
|
53 | legend: string[];
|
54 | colors: string[];
|
55 | }) => JSX.Element[];
|
56 | render(): JSX.Element;
|
57 | }
|
58 | export default StackedBarChart;
|
59 |
|
\ | No newline at end of file |