@nivo/core
- Version 0.99.0
- Published
- 254 kB
- 14 dependencies
- MIT license
Install
npm i @nivo/coreyarn add @nivo/corepnpm add @nivo/coreOverview
Overview not available.
Index
Variables
Functions
- alignBox()
- clampArc()
- curveFromProp()
- Defs()
- degreesToRadians()
- getAngle()
- getDistance()
- getPropertyAccessor()
- getRelativeCursor()
- getValueFormatter()
- isCursorInRect()
- linearGradientDef()
- mergeRefs()
- midAngle()
- normalizeAngleDegrees()
- PatternDots()
- patternDotsDef()
- PatternLines()
- patternLinesDef()
- PatternSquares()
- patternSquaresDef()
- positionFromAngle()
- radiansToDegrees()
- useAnimatedPath()
- useCurveInterpolation()
- useDimensions()
- useMeasure()
- useMotionConfig()
- usePropertyAccessor()
- useValueFormatter()
Interfaces
Type Aliases
- Accessor
- AreaCurve
- AreaCurveFactoryId
- Box
- BoxAlign
- BoxAnchor
- CartesianMarkersType
- ClosedCurveFactoryId
- Colors
- ContainerType
- CssMixBlendMode
- CurveFactoryId
- DatumPropertyAccessor
- DatumValue
- Def
- DefaultChartContext
- DefaultMargin
- DefsProps
- DotsItemSymbolComponent
- EventMap
- ExtractProps
- GetColor
- GradientColor
- HtmlElementTag
- InteractionHandlers
- LinearGradientDef
- LineCurveFactoryId
- Margin
- MotionDefaultProps
- MotionProps
- NodeEventHandler
- Padding
- PatternDotsDef
- PatternLinesDef
- PatternSquaresDef
- PropertyAccessor
- ResponsiveProps
- ResponsiveWrapperType
- StackOffset
- StackOrder
- SvgElementTag
- SvgFillMatcher
- SvgWrapperType
- ValueFormat
- WithChartRef
Variables
variable BOX_ANCHORS
const BOX_ANCHORS: readonly BoxAnchor[];variable boxAlignments
const boxAlignments: readonly BoxAlign[];variable CartesianMarkers
const CartesianMarkers: CartesianMarkersType;variable ChartContext
const ChartContext: React.Context<DefaultChartContext>;variable closedCurvePropKeys
const closedCurvePropKeys: readonly ClosedCurveFactoryId[];variable Container
const Container: ContainerType;variable defaultAnimate
const defaultAnimate: boolean;variable defaultMargin
const defaultMargin: DefaultMargin;variable DotsItem
const DotsItem: React.FunctionComponent<DotsItemProps<any>>;variable motionDefaultProps
const motionDefaultProps: MotionDefaultProps;variable ResponsiveWrapper
const ResponsiveWrapper: ResponsiveWrapperType;variable SvgWrapper
const SvgWrapper: SvgWrapperType;Functions
function alignBox
alignBox: ( box: AlignBox, container: AlignBox, alignment: BoxAlign) => [number, number];function clampArc
clampArc: ( startAngle: number, endAngle: number, length?: number) => [number, number];function curveFromProp
curveFromProp: (interpolation: CurveFactoryId) => CurveFactory;function Defs
Defs: (props: DefsProps) => JSX.Element;function degreesToRadians
degreesToRadians: (degrees: number) => number;function getAngle
getAngle: (x1: number, y1: number, x2: number, y2: number) => number;function getDistance
getDistance: (x1: number, y1: number, x2: number, y2: number) => number;function getPropertyAccessor
getPropertyAccessor: <Datum, Value>( accessor: PropertyAccessor<Datum, Value>) => (datum: Datum) => Value;function getRelativeCursor
getRelativeCursor: ( element: Element, event: React.MouseEvent | React.TouchEvent) => [number, number];function getValueFormatter
getValueFormatter: <Value, Context = void>( format?: ValueFormat<Value, Context>) => Context extends void ? (value: Value) => string : (value: Value, context: Context) => string;function isCursorInRect
isCursorInRect: ( x: number, y: number, width: number, height: number, cursorX: number, cursorY: number) => boolean;function linearGradientDef
linearGradientDef: ( id: string, colors: GradientColor[], options?: React.SVGProps<SVGLinearGradientElement>) => { id: string; type: 'linearGradient'; colors: GradientColor[];} & React.SVGProps<SVGLinearGradientElement>;function mergeRefs
mergeRefs: <T>(...refs: any[]) => (value: T) => void;function midAngle
midAngle: (arc: { startAngle: number; endAngle: number }) => number;function normalizeAngleDegrees
normalizeAngleDegrees: (degrees: number) => number;function PatternDots
PatternDots: (props: Omit<PatternDotsDef, 'type'>) => JSX.Element;function patternDotsDef
patternDotsDef: ( id: string, options?: Omit<PatternDotsDef, 'id' | 'type'>) => PatternDotsDef;function PatternLines
PatternLines: (props: Omit<PatternLinesDef, 'type'>) => JSX.Element;function patternLinesDef
patternLinesDef: ( id: string, options?: Omit<PatternLinesDef, 'id' | 'type'>) => PatternLinesDef;function PatternSquares
PatternSquares: (props: Omit<PatternSquaresDef, 'type'>) => JSX.Element;function patternSquaresDef
patternSquaresDef: ( id: string, options?: Omit<PatternSquaresDef, 'id' | 'type'>) => PatternSquaresDef;function positionFromAngle
positionFromAngle: (angle: number, distance: number) => { x: number; y: number };function radiansToDegrees
radiansToDegrees: (radians: number) => number;function useAnimatedPath
useAnimatedPath: (path: string) => Interpolation<string>;function useCurveInterpolation
useCurveInterpolation: (interpolation: CurveFactoryId) => CurveFactory;function useDimensions
useDimensions: ( width: number, height: number, margin?: Box) => { margin: Margin; innerWidth: number; innerHeight: number; outerWidth: number; outerHeight: number;};function useMeasure
useMeasure: () => [ React.RefObject<HTMLDivElement>, { left: number; top: number; width: number; height: number }];function useMotionConfig
useMotionConfig: () => { animate: boolean; config: SpringConfig };function usePropertyAccessor
usePropertyAccessor: <Datum, Value>( accessor: PropertyAccessor<Datum, Value>) => (datum: Datum) => Value;function useValueFormatter
useValueFormatter: <Value, Context = void>( format?: ValueFormat<Value, Context>) => Context extends void ? (value: Value) => string : (value: Value, context: Context) => string;Interfaces
interface AlignBox
interface AlignBox extends Dimensions, Point {}interface CartesianMarkerProps
interface CartesianMarkerProps<V extends DatumValue = DatumValue> {}property axis
axis: 'x' | 'y';property legend
legend?: string;property legendOrientation
legendOrientation?: 'horizontal' | 'vertical';property legendPosition
legendPosition?: BoxAlign;property lineStyle
lineStyle?: Partial<React.CSSProperties>;property textStyle
textStyle?: Partial<React.CSSProperties>;property value
value: V;interface CartesianMarkersProps
interface CartesianMarkersProps< X extends DatumValue = DatumValue, Y extends DatumValue = DatumValue> {}interface ColorProps
interface ColorProps<T> {}interface ContainerProps
interface ContainerProps {}property animate
animate?: boolean;property isInteractive
isInteractive?: boolean;property motionConfig
motionConfig?: string | SpringConfig;property renderWrapper
renderWrapper?: boolean;property theme
theme?: PartialTheme;interface Dimensions
interface Dimensions {}interface DotsItemProps
interface DotsItemProps<D = any> {}property ariaDescribedBy
ariaDescribedBy?: React.AriaAttributes['aria-describedby'];property ariaDisabled
ariaDisabled?: React.AriaAttributes['aria-disabled'];property ariaHidden
ariaHidden?: React.AriaAttributes['aria-hidden'];property ariaLabel
ariaLabel?: React.AriaAttributes['aria-label'];property ariaLabelledBy
ariaLabelledBy?: React.AriaAttributes['aria-labelledby'];property borderColor
borderColor: string;property borderWidth
borderWidth: number;property color
color: string;property datum
datum: D;property isFocusable
isFocusable?: boolean;property label
label?: string | number;property labelTextAnchor
labelTextAnchor?: 'start' | 'middle' | 'end';property labelYOffset
labelYOffset?: number;property onBlur
onBlur?: (datum: D, event: React.FocusEvent<SVGGElement>) => void;property onFocus
onFocus?: (datum: D, event: React.FocusEvent<SVGGElement>) => void;property size
size: number;property symbol
symbol?: DotsItemSymbolComponent<D>;property tabIndex
tabIndex?: number;property testId
testId?: string;property x
x: number;property y
y: number;interface DotsItemSymbolProps
interface DotsItemSymbolProps<D = any> {}property borderColor
borderColor: string;property borderWidth
borderWidth: number;property color
color: string;property datum
datum: D;property size
size: number;interface SvgDefsAndFill
interface SvgDefsAndFill<T> {}Type Aliases
type Accessor
type Accessor<T extends keyof U, U> = T extends string ? U[T] : never;type AreaCurve
type AreaCurve = | 'basis' | 'cardinal' | 'catmullRom' | 'linear' | 'monotoneX' | 'monotoneY' | 'natural' | 'step' | 'stepAfter' | 'stepBefore';type AreaCurveFactoryId
type AreaCurveFactoryId = | 'basis' | 'cardinal' | 'catmullRom' | 'linear' | 'monotoneX' | 'monotoneY' | 'natural' | 'step' | 'stepAfter' | 'stepBefore';type Box
type Box = Partial<Margin>;type BoxAlign
type BoxAlign = | 'center' | 'top-left' | 'top' | 'top-right' | 'right' | 'bottom-right' | 'bottom' | 'bottom-left' | 'left';type BoxAnchor
type BoxAnchor = | 'center' | 'top-left' | 'top' | 'top-right' | 'right' | 'bottom-right' | 'bottom' | 'bottom-left' | 'left';type CartesianMarkersType
type CartesianMarkersType = < X extends DatumValue = DatumValue, Y extends DatumValue = DatumValue>( props: CartesianMarkersProps<X, Y>) => JSX.Element;type ClosedCurveFactoryId
type ClosedCurveFactoryId = | 'basisClosed' | 'cardinalClosed' | 'catmullRomClosed' | 'linearClosed';type Colors
type Colors = readonly string[] | string;type ContainerType
type ContainerType = (props: React.PropsWithChildren<ContainerProps>) => JSX.Element;type CssMixBlendMode
type CssMixBlendMode = | 'normal' | 'multiply' | 'screen' | 'overlay' | 'darken' | 'lighten' | 'color-dodge' | 'color-burn' | 'hard-light' | 'soft-light' | 'difference' | 'exclusion' | 'hue' | 'saturation' | 'color' | 'luminosity';type CurveFactoryId
type CurveFactoryId = | 'basis' | 'basisClosed' | 'basisOpen' | 'bundle' | 'cardinal' | 'cardinalClosed' | 'cardinalOpen' | 'catmullRom' | 'catmullRomClosed' | 'catmullRomOpen' | 'linear' | 'linearClosed' | 'monotoneX' | 'monotoneY' | 'natural' | 'step' | 'stepAfter' | 'stepBefore';type DatumPropertyAccessor
type DatumPropertyAccessor<RawDatum, T> = (datum: RawDatum) => T;type DatumValue
type DatumValue = string | number | Date;type Def
type Def = LinearGradientDef | PatternDotsDef | PatternSquaresDef | PatternLinesDef;type DefaultChartContext
type DefaultChartContext = Record<string, unknown>;type DefaultMargin
type DefaultMargin = { top: 0; right: 0; bottom: 0; left: 0;};type DefsProps
type DefsProps = { defs: readonly Def[];};type DotsItemSymbolComponent
type DotsItemSymbolComponent<D = any> = React.FunctionComponent< DotsItemSymbolProps<D>>;type EventMap
type EventMap = { onMouseEnter: MouseEvent; onMouseMove: MouseEvent; onMouseLeave: MouseEvent; onClick: MouseEvent; onDoubleClick: MouseEvent; onFocus: FocusEvent; onBlur: FocusEvent; onKeyDown: KeyboardEvent; onWheel: WheelEvent; onContextMenu: MouseEvent;};type ExtractProps
type ExtractProps<TComponent> = TComponent extends ComponentType<infer TProps> ? TProps : never;type GetColor
type GetColor<T> = (datum: T) => string;type GradientColor
type GradientColor = { offset: number; color: string; opacity?: number;};type HtmlElementTag
type HtmlElementTag = { [K in keyof JSX.IntrinsicElements]: JSX.IntrinsicElements[K] extends React.HTMLAttributes<HTMLElement> ? K : never;}[keyof JSX.IntrinsicElements];type InteractionHandlers
type InteractionHandlers<Node, EM extends Record<string, SyntheticEvent>> = { [K in keyof EM]?: NodeEventHandler<Node, EM[K]>;};type LinearGradientDef
type LinearGradientDef = { id: string; type: 'linearGradient'; colors: { offset: number; color: string; opacity?: number; }[]; gradientTransform?: string;};type LineCurveFactoryId
type LineCurveFactoryId = | 'basis' | 'cardinal' | 'catmullRom' | 'linear' | 'monotoneX' | 'monotoneY' | 'natural' | 'step' | 'stepAfter' | 'stepBefore';type Margin
type Margin = { bottom: number; left: number; right: number; top: number;};type MotionDefaultProps
type MotionDefaultProps = { animate: true; config: 'default';};type MotionProps
type MotionProps = Partial<{ animate: boolean; motionConfig: string | SpringConfig;}>;type NodeEventHandler
type NodeEventHandler<NodeType, E extends SyntheticEvent> = ( node: NodeType, event: E) => void;type Padding
type Padding = Margin;type PatternDotsDef
type PatternDotsDef = { id: string; type: 'patternDots'; color?: string; background?: string; size?: number; padding?: number; stagger?: boolean;};type PatternLinesDef
type PatternLinesDef = { id: string; type: 'patternLines'; spacing?: number; rotation?: number; background?: string; color?: string; lineWidth?: number;};type PatternSquaresDef
type PatternSquaresDef = Omit<PatternDotsDef, 'type'> & { type: 'patternSquares';};type PropertyAccessor
type PropertyAccessor<Datum, Value> = // path to use with `lodash.get()` | string // explicit accessor function | ((datum: Datum) => Value);type ResponsiveProps
type ResponsiveProps<Props> = Omit<Props, 'width' | 'height'> & { defaultWidth?: number; defaultHeight?: number; onResize?: (dimensions: { width: number; height: number }) => void; debounceResize?: number;};type ResponsiveWrapperType
type ResponsiveWrapperType = (props: { children: (dimensions: { width: number; height: number }) => JSX.Element; defaultWidth?: number; defaultHeight?: number; onResize?: (dimensions: { width: number; height: number }) => void; debounceResize?: number;}) => JSX.Element;type StackOffset
type StackOffset = 'expand' | 'diverging' | 'none' | 'silhouette' | 'wiggle';type StackOrder
type StackOrder = 'ascending' | 'descending' | 'insideOut' | 'none' | 'reverse';type SvgElementTag
type SvgElementTag = Exclude< { [K in keyof JSX.IntrinsicElements]: JSX.IntrinsicElements[K] extends React.SVGProps<SVGElement> ? K : never; }[keyof JSX.IntrinsicElements], 'svg'>;type SvgFillMatcher
type SvgFillMatcher<T> = (datum: T) => boolean;type SvgWrapperType
type SvgWrapperType = ( props: React.PropsWithChildren<{ width: number; height: number; margin: Margin; defs?: any; role?: string; ariaLabel?: React.AriaAttributes['aria-label']; ariaLabelledBy?: React.AriaAttributes['aria-labelledby']; ariaDescribedBy?: React.AriaAttributes['aria-describedby']; isFocusable?: boolean; ref?: React.Ref<SVGSVGElement>; }>) => JSX.Element;type ValueFormat
type ValueFormat<Value, Context = void> = | string // d3 formatter // explicit formatting function | (Context extends void ? (value: Value) => string : (value: Value, context: Context) => string);type WithChartRef
type WithChartRef< Props, T extends SVGSVGElement | HTMLCanvasElement | HTMLDivElement> = Props & { ref?: Ref<T> };Package Files (1)
Dependencies (14)
Dev Dependencies (0)
No dev dependencies.
Peer Dependencies (1)
Badge
To add a badge like this oneto your package's README, use the codes available below.
You may also use Shields.io to create a custom badge linking to https://www.jsdocs.io/package/@nivo/core.
- Markdown[](https://www.jsdocs.io/package/@nivo/core)
- HTML<a href="https://www.jsdocs.io/package/@nivo/core"><img src="https://img.shields.io/badge/jsDocs.io-reference-blue" alt="jsDocs.io"></a>
- Updated .
Package analyzed in 5389 ms. - Missing or incorrect documentation? Open an issue for this package.
