UNPKG

fybdp-d3-kg

Version:

Knowledge Graph using React and D3.js

82 lines (81 loc) 2.56 kB
import { Component, ReactElement } from 'react'; import { Bar, BarProps, BarType } from './Bar'; import { ChartInternalDataShape, ChartInternalNestedDataShape, ChartInternalShallowDataShape, Direction } from '../../common/data'; import { ColorSchemeType } from '../../common/color'; import { ThresholdCountGenerator, ThresholdArrayGenerator } from 'd3-array'; import { CountableTimeInterval } from 'd3-time'; declare type BarElement = ReactElement<BarProps, typeof Bar>; export interface BarSeriesProps { /** * Parsed data shape. Set internally by `BarChart`. */ data: ChartInternalDataShape[]; /** * Id of the bar chart. Set internally by `BarChart`. */ id: string; /** * D3 scale for X Axis. Set internally by `BarChart`. */ xScale: any; /** * D3 scale for Y Axis. Set internally by `BarChart`. */ yScale: any; /** * D3 scale for X Multi-Group Axis. Set internally by `BarChart`. */ xScale1: any; /** * Bar element. */ bar: BarElement | BarElement[]; /** * Type of the chart. */ type: BarType; /** * Color scheme for the chart. */ colorScheme: ColorSchemeType; /** * Whether the chart is animated or not. */ animated: boolean; /** * Amount of padding between each bar. */ padding: number; /** * Amount of padding between each group. */ groupPadding: number; /** * Whether the chart is categorical or not. Set internally by `BarChart`. */ isCategorical: boolean; /** * Direction of the chart */ layout: Direction; /** * Threshold for the binning of histogram charts. */ binThreshold?: number | ThresholdCountGenerator | ArrayLike<number | Date> | ThresholdArrayGenerator | CountableTimeInterval; } export declare class BarSeries extends Component<BarSeriesProps> { static defaultProps: Partial<BarSeriesProps>; getIsMulti(): boolean; /** * Get the translation for the bar group. */ getTransform(data: ChartInternalNestedDataShape): string; getColor(point: any, index: any): any; renderBar(data: ChartInternalShallowDataShape, barIndex: number, barCount: number, groupIndex?: number): JSX.Element; /** * Get the bar group. */ renderBarGroup(data: ChartInternalShallowDataShape[], barCount: number, groupIndex?: number): JSX.Element; render(): JSX.Element; } export {};