react-native-chart-kit
Version:
If you're looking to **build a website or a cross-platform mobile app** – we will be happy to help you! Send a note to clients@ui1.io and we will be in touch with you shortly.
53 lines • 5.48 kB
TypeScript
/// <reference types="react" />
import { ViewStyle } from "react-native";
import AbstractChart, { AbstractChartConfig, AbstractChartProps } from "./AbstractChart";
import { ChartData } from "./HelperTypes";
export interface BarChartProps extends AbstractChartProps {
data: ChartData;
width: number;
height: number;
fromZero?: boolean;
withInnerLines?: boolean;
yAxisLabel: string;
yAxisSuffix: string;
chartConfig: AbstractChartConfig;
style?: Partial<ViewStyle>;
horizontalLabelRotation?: number;
verticalLabelRotation?: number;
/**
* Show vertical labels - default: True.
*/
withVerticalLabels?: boolean;
/**
* Show horizontal labels - default: True.
*/
withHorizontalLabels?: boolean;
/**
* The number of horizontal lines
*/
segments?: number;
showBarTops?: boolean;
showValuesOnTopOfBars?: boolean;
withCustomBarColorFromData?: boolean;
flatColor?: boolean;
}
declare type BarChartState = {};
declare class BarChart extends AbstractChart<BarChartProps, BarChartState> {
getBarPercentage: () => number;
renderBars: ({ data, width, height, paddingTop, paddingRight, barRadius, withCustomBarColorFromData }: Pick<Pick<AbstractChartConfig, "color" | "style" | "backgroundColor" | "height" | "paddingRight" | "paddingTop" | "width" | "strokeWidth" | "propsForBackgroundLines" | "propsForLabels" | "labelColor" | "propsForVerticalLabels" | "propsForHorizontalLabels" | "count" | "horizontalLabelRotation" | "formatYLabel" | "labels" | "horizontalOffset" | "stackedBar" | "verticalLabelRotation" | "formatXLabel" | "verticalLabelsHeightPercentage" | "formatTopBarValue" | "backgroundGradientFrom" | "backgroundGradientFromOpacity" | "backgroundGradientTo" | "backgroundGradientToOpacity" | "fillShadowGradient" | "fillShadowGradientOpacity" | "fillShadowGradientFrom" | "fillShadowGradientFromOpacity" | "fillShadowGradientFromOffset" | "fillShadowGradientTo" | "fillShadowGradientToOpacity" | "fillShadowGradientToOffset" | "useShadowColorFromDataset" | "barPercentage" | "barRadius" | "propsForDots" | "decimalPlaces" | "linejoinType" | "scrollableDotFill" | "scrollableDotStrokeColor" | "scrollableDotStrokeWidth" | "scrollableDotRadius" | "scrollableInfoViewStyle" | "scrollableInfoTextStyle" | "scrollableInfoTextDecorator" | "scrollableInfoOffset" | "scrollableInfoSize">, "height" | "paddingRight" | "paddingTop" | "width" | "barRadius"> & {
data: number[];
withCustomBarColorFromData: boolean;
}) => JSX.Element[];
renderBarTops: ({ data, width, height, paddingTop, paddingRight }: Pick<Pick<AbstractChartConfig, "color" | "style" | "backgroundColor" | "height" | "paddingRight" | "paddingTop" | "width" | "strokeWidth" | "propsForBackgroundLines" | "propsForLabels" | "labelColor" | "propsForVerticalLabels" | "propsForHorizontalLabels" | "count" | "horizontalLabelRotation" | "formatYLabel" | "labels" | "horizontalOffset" | "stackedBar" | "verticalLabelRotation" | "formatXLabel" | "verticalLabelsHeightPercentage" | "formatTopBarValue" | "backgroundGradientFrom" | "backgroundGradientFromOpacity" | "backgroundGradientTo" | "backgroundGradientToOpacity" | "fillShadowGradient" | "fillShadowGradientOpacity" | "fillShadowGradientFrom" | "fillShadowGradientFromOpacity" | "fillShadowGradientFromOffset" | "fillShadowGradientTo" | "fillShadowGradientToOpacity" | "fillShadowGradientToOffset" | "useShadowColorFromDataset" | "barPercentage" | "barRadius" | "propsForDots" | "decimalPlaces" | "linejoinType" | "scrollableDotFill" | "scrollableDotStrokeColor" | "scrollableDotStrokeWidth" | "scrollableDotRadius" | "scrollableInfoViewStyle" | "scrollableInfoTextStyle" | "scrollableInfoTextDecorator" | "scrollableInfoOffset" | "scrollableInfoSize">, "height" | "paddingRight" | "paddingTop" | "width"> & {
data: number[];
}) => JSX.Element[];
renderColors: ({ data, flatColor }: Pick<AbstractChartConfig, "data"> & {
flatColor: boolean;
}) => JSX.Element[];
renderValuesOnTopOfBars: ({ data, width, height, paddingTop, paddingRight }: Pick<Pick<AbstractChartConfig, "color" | "style" | "backgroundColor" | "height" | "paddingRight" | "paddingTop" | "width" | "strokeWidth" | "propsForBackgroundLines" | "propsForLabels" | "labelColor" | "propsForVerticalLabels" | "propsForHorizontalLabels" | "count" | "horizontalLabelRotation" | "formatYLabel" | "labels" | "horizontalOffset" | "stackedBar" | "verticalLabelRotation" | "formatXLabel" | "verticalLabelsHeightPercentage" | "formatTopBarValue" | "backgroundGradientFrom" | "backgroundGradientFromOpacity" | "backgroundGradientTo" | "backgroundGradientToOpacity" | "fillShadowGradient" | "fillShadowGradientOpacity" | "fillShadowGradientFrom" | "fillShadowGradientFromOpacity" | "fillShadowGradientFromOffset" | "fillShadowGradientTo" | "fillShadowGradientToOpacity" | "fillShadowGradientToOffset" | "useShadowColorFromDataset" | "barPercentage" | "barRadius" | "propsForDots" | "decimalPlaces" | "linejoinType" | "scrollableDotFill" | "scrollableDotStrokeColor" | "scrollableDotStrokeWidth" | "scrollableDotRadius" | "scrollableInfoViewStyle" | "scrollableInfoTextStyle" | "scrollableInfoTextDecorator" | "scrollableInfoOffset" | "scrollableInfoSize">, "height" | "paddingRight" | "paddingTop" | "width"> & {
data: number[];
}) => JSX.Element[];
render(): JSX.Element;
}
export default BarChart;
//# sourceMappingURL=BarChart.d.ts.map