@linkdesign/screen
Version:
屏组件库,但使用场景又不局限于屏。主要用于BI、大盘和屏
54 lines (53 loc) • 1.2 kB
TypeScript
import React, { PureComponent } from 'react';
import { Options } from '@antv/g2/lib/interface';
import { ITitle, UniversalStyle } from '../title';
interface Config {
min?: number;
max?: number;
value: number;
limit: number;
tickInterval?: number;
label: string;
content?: number | string | ((value: number | string) => string);
}
interface IProps {
/**
* 类名
*/
className?: string;
/**
* 图表标题
*/
title?: React.ReactNode;
/**
* 通用样式
*/
universalStyle?: UniversalStyle;
/**
* 标题配置
*/
titleOptions?: ITitle;
/**
* gauge config配置
*/
config: Config;
}
declare class GaugeChart extends PureComponent<IProps> {
private containerRef;
private titleRef;
private chartRef;
private chart;
private containerHeight;
constructor(props: IProps);
componentDidMount(): void;
componentDidUpdate(prevProps: IProps): void;
componentWillUnmount(): void;
/**
* 获取配置项
*
* @memberof GaugeChart
*/
getOptions: (config: Config) => Options;
render(): React.ReactNode;
}
export default GaugeChart;