UNPKG

reaviz

Version:

Data Visualization using React

81 lines (80 loc) 2.61 kB
import { FC, ReactElement } from 'react'; import { ChartDataShape } from '../../common/data'; import { ColorSchemeType } from '../../common/color'; import { RadialGaugeArc, RadialGaugeArcProps } from './RadialGaugeArc'; import { RadialGaugeStackedArc, RadialGaugeStackedArcProps } from './RadialGaugeStackedArc'; import { StackedRadialGaugeValueLabel, StackedRadialGaugeValueLabelProps } from './StackedRadialGaugeValueLabel'; import { StackedRadialGaugeDescriptionLabel, StackedRadialGaugeDescriptionLabelProps } from './StackedRadialGaugeDescriptionLabel'; export interface StackedRadialGaugeSeriesProps { /** * Data to render set by `RadialGauge` component. */ data: ChartDataShape[]; /** * D3 scale function set by `RadialGauge` component. */ scale: any; /** * Start angle set by `RadialGauge` component. */ startAngle: number; /** * Start angle set by `RadialGauge` component. */ endAngle: number; /** * Width set by `RadialGauge` component. */ width: number; /** * Height set by `RadialGauge` component. */ height: number; /** * Color scheme to apply. * * @default ['#00ECB1'] */ colorScheme: ColorSchemeType; /** * Arc component. * * @default `<RadialGaugeArc animated />` */ innerArc: ReactElement<RadialGaugeArcProps, typeof RadialGaugeArc>; /** * Stacked Arc component. * * @default `<RadialGaugeStackedArc animated />` */ stackedInnerArc: ReactElement<RadialGaugeStackedArcProps, typeof RadialGaugeStackedArc>; /** * Outer arc component. This is the 'fill' element. * * @default `<RadialGaugeArc disabled animated={false} />` */ outerArc: ReactElement<RadialGaugeArcProps, typeof RadialGaugeArc> | null; /** * Label component. * * @default `<StackedRadialGaugeValueLabel />` */ label: ReactElement<StackedRadialGaugeValueLabelProps, typeof StackedRadialGaugeValueLabel> | null; /** * Description label component. */ descriptionLabel: ReactElement<StackedRadialGaugeDescriptionLabelProps, typeof StackedRadialGaugeDescriptionLabel> | null; /** * A factor from 0 to 1 determining how much of the Gauge should be filled with arcs * * @default 0.2 */ fillFactor: number; /** * Padding between the stacked arcs, following d3 bandwidth innerPadding * * @default 0.15 */ arcPadding: number; } export declare const StackedRadialGaugeSeries: FC<Partial<StackedRadialGaugeSeriesProps>>;