fybdp-d3-kg
Version:
Knowledge Graph using React and D3.js
83 lines (82 loc) • 2.04 kB
TypeScript
import { Component } from 'react';
import { ChartInternalShallowDataShape, Direction } from '../../common/data';
import { BarType } from './Bar';
export interface RangeLinesProps {
/**
* Height of the bar.
*/
height: number;
/**
* Width of the bar.
*/
width: number;
/**
* SVG x attribute for the bar.
*/
x: number;
/**
* SVG y attribute for the bar.
*/
y: number;
/**
* Group index or index of the bar. Set internally by `BarSeries`.
*/
index: number;
/**
* Stroke width of the range line.
*/
strokeWidth: number;
/**
* D3 scale for Axis. Set internally by `BarChart`.
*/
scale: any;
/**
* Position of the range line.
*/
position: 'top' | 'bottom';
/**
* Parsed data shape. Set internally by `BarChart`.
*/
data: ChartInternalShallowDataShape;
/**
* Color for the range line.
*/
color: string;
/**
* Total number of bars used for animation. Set internally by `BarSeries`.
*/
barCount: number;
/**
* Direction of the chart. Set internally by `BarSeries`.
*/
layout: Direction;
/**
* Whether to animate the enter/update/exit. Set internally by `BarSeries`.
*/
animated: boolean;
/**
* Type of bar chart. Set internally by `BarSeries`.
*/
type: BarType;
}
export declare class RangeLines extends Component<RangeLinesProps> {
static defaultProps: Partial<RangeLinesProps>;
getIsVertical(): boolean;
getEnter(rangeLineHeight: number): {
x: number;
y: number;
opacity: number;
};
getExit(rangeLineHeight: number): {
y: number;
x: number;
opacity: number;
};
getLineHeight(): number;
getHeightWidth(rangeLineHeight: number): {
width: number;
height: number;
};
getDelay(): number;
render(): JSX.Element;
}