reaviz
Version:
Data Visualization using React
68 lines (66 loc) • 1.47 kB
TypeScript
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
*/
fontFill: string;
/**
* FontSize
*/
fontSize: number;
/**
* FontFamily
*/
fontFamily: string;
/**
* Line stroke of the label connector
*/
lineStroke: string;
/**
* Outer radius of the corresponding `PieArc`
*/
outerRadius: number;
/**
* y Padding of the label
*/
padding: string;
/**
* The label position set by the parent component
*/
position: [number, number];
/**
* Width of the label
*/
width?: number;
/**
* Height of the label
*/
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;
};