UNPKG

reaviz

Version:

Data Visualization using React

79 lines (78 loc) 1.67 kB
import { default as React, FC } from 'react'; import { ArcData } from '..'; export interface PieArcLabelProps { /** * Data set by the parent component */ data: ArcData; /** * A function returning the centroid of the corresponding `PieArc` * @param d PieArcDatum */ centroid: (d: ArcData) => [number, number]; /** * A Formatting function for the label value * @param v The label value */ format?: (v: any & ArcData['data'] & { textAnchor: 'start' | 'end'; }) => React.ReactNode; /** * FontFill color * * @default '#8F979F' */ fontFill: string; /** * FontSize * * @default 11 */ fontSize: number; /** * FontFamily * * @default 'sans-serif' */ fontFamily: string; /** * Line stroke of the label connector * * @default 'rgba(127,127,127,0.5)' */ lineStroke: string; /** * Outer radius of the corresponding `PieArc` */ outerRadius: number; /** * y Padding of the label * * @default '.35em' */ padding: string; /** * The label position set by the parent component */ position: [number, number]; /** * Width of the label */ width?: number; /** * Height of the label * * @default 11 */ height?: number; } export declare const PieArcLabel: FC<Partial<PieArcLabelProps>>; export declare const PIE_ARC_LABEL_DEFAULT_PROPS: { format: any; lineStroke: string; fontFill: string; fontSize: number; fontFamily: string; padding: string; height: number; };