1.2.6 • Published 6 months ago
@types/react-svg-radar-chart v1.2.6
Installation
npm install --save @types/react-svg-radar-chart
Summary
This package contains type definitions for react-svg-radar-chart (https://github.com/Spyna/react-svg-radar-chart).
Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/react-svg-radar-chart.
index.d.ts
// Type definitions for react-svg-radar-chart 1.2
// Project: https://github.com/Spyna/react-svg-radar-chart
// Definitions by: Lukas Tutkus <https://github.com/luksys5>
// Alberto Francesco Motta <https://github.com/afmotta>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// Minimum TypeScript Version: 3.5
import * as React from 'react';
export interface ChartData {
data: {
[value: string]: number;
};
meta: { color: string };
}
export interface ChartOptionsProps {
/**
* set size
*
* overwritten by size prop on component
* @default 300
*/
size?: number | undefined;
/**
* show axes
* @default true
*/
axes?: boolean | undefined;
/**
* show scale circles
* @default 3
*/
scales?: number | undefined;
/**
* show captions
* @default true
*/
captions?: boolean | undefined;
/**
* set caption margin
* @default 10
*/
captionMargin?: number | undefined;
/**
* show dots
* @default false
*/
dots?: boolean | undefined;
/**
* where on the axes are the captions
* @default 1.2
*/
zoomDistance?: number | undefined;
/** custom viewBox */
setViewBox?: ((options: ChartOptionsProps) => number) | undefined;
/** custom smoothing fn */
smoothing?: ((points: ReadonlyArray<[]>) => string) | undefined;
/** custom axis props */
axisProps?: (() => { className: string }) | undefined;
/** custom scale props */
scaleProps?: (() => {
className: string;
fill: string;
}) | undefined;
/** custom shape props */
shapeProps?: (() => { className: string }) | undefined;
/** custom captions props */
captionProps?: (() => {
className: string;
textAnchor: string;
fontSize: number;
fontFamily: string;
}) | undefined;
/** custom dot props */
dotProps?: (() => {
className: string;
}) | undefined;
}
export interface ChartProps {
captions: {
[key: string]: string;
};
data: ChartData[];
size: number;
options?: ChartOptionsProps | undefined;
}
export default class RadarChart extends React.Component<ChartProps> {}
Additional Details
- Last updated: Thu, 08 Jul 2021 22:41:37 GMT
- Dependencies: @types/react
- Global values: none
Credits
These definitions were written by Lukas Tutkus, and Alberto Francesco Motta.