Skip to content

Commit

Permalink
fix(line): update types from DataFormatter to ValueFormat (#1546)
Browse files Browse the repository at this point in the history
  • Loading branch information
wyze authored May 26, 2021
1 parent 3199570 commit 37c89e0
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions packages/line/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import {
MotionProps,
CartesianMarkerProps,
SvgDefsAndFill,
DataFormatter,
ValueFormat,
DatumValue as CoreDatumValue,
} from '@nivo/core'
import { OrdinalColorScaleConfig } from '@nivo/colors'
Expand Down Expand Up @@ -133,9 +133,9 @@ declare module '@nivo/line' {
data: Serie[]

xScale?: Scale
xFormat?: string | DataFormatter
xFormat?: ValueFormat<DatumValue>
yScale?: Scale
yFormat?: string | DataFormatter
yFormat?: ValueFormat<DatumValue>

layers?: Layer[]

Expand Down Expand Up @@ -193,7 +193,7 @@ declare module '@nivo/line' {
debugSlices?: boolean
sliceTooltip?: SliceTooltip

tooltipFormat?: DataFormatter | string
tooltipFormat?: ValueFormat<DatumValue>
tooltip?: PointTooltip

enableCrosshair?: boolean
Expand Down Expand Up @@ -221,7 +221,7 @@ declare module '@nivo/line' {
export type CustomCanvasLayer = (props: CustomCanvasLayerProps) => void
export type CanvasLayer = LineLayerType | CustomCanvasLayer

export interface LineCanvasProps extends LineProps {
export interface LineCanvasProps extends Omit<LineProps, 'layers'> {
pixelRatio?: number
layers?: CanvasLayer[]
}
Expand Down

0 comments on commit 37c89e0

Please sign in to comment.