fybdp-d3-kg
Version:
Knowledge Graph using React and D3.js
33 lines (32 loc) • 1.48 kB
TypeScript
import { Component, ReactElement } from 'react';
import { ChartProps, ChartContainerChildProps } from '../common/containers';
import { ChartShallowDataShape, ChartInternalNestedDataShape } from '../common/data';
import { LinearGaugeSeries, LinearGaugeSeriesProps } from './LinearGaugeSeries';
export interface LinearGaugeProps extends ChartProps {
/**
* Data the chart will receive to render.
*/
data: ChartShallowDataShape | ChartShallowDataShape[];
/**
* The series component that renders the bar components.
*/
series: ReactElement<LinearGaugeSeriesProps, typeof LinearGaugeSeries>;
/**
* Min value to scale on. Only applicable for single-series.
*/
minValue: number;
/**
* Max value to scale on. Only applicable for single-series.
*/
maxValue: number;
}
export declare class LinearGauge extends Component<LinearGaugeProps> {
static defaultProps: Partial<LinearGaugeProps>;
getData(data: ChartShallowDataShape | ChartShallowDataShape[]): ChartInternalNestedDataShape[] | import("../common/data").ChartInternalShallowDataShape[];
getScales(isMultiSeries: boolean, data: ChartInternalNestedDataShape[], width: number, height: number, minValue: number, maxValue: number): {
keyScale: any;
valueScale: any;
};
renderChart({ chartHeight, chartWidth, id, chartSized }: ChartContainerChildProps): JSX.Element;
render(): JSX.Element;
}