Skip to content

Commit

Permalink
fix: Add missing tickValues prop type
Browse files Browse the repository at this point in the history
  • Loading branch information
f1multiviewer committed Jun 21, 2024
1 parent 1aed091 commit 90039a9
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/visx-grid/src/types.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { CSSProperties, ReactNode } from 'react';
import { D3Scale, NumberLike } from '@visx/scale';
import { D3Scale, NumberLike, ScaleInput } from '@visx/scale';

// In order to plot values on an axis, output of the scale must be number.
// Some scales return undefined.
Expand Down Expand Up @@ -33,6 +33,8 @@ export type CommonGridProps = {
strokeDasharray?: string;
/** Approximate number of grid lines. Approximate due to d3 alogrithm, specify `tickValues` for precise control. */
numTicks?: number;
/** An array of values that determine the number and values of the ticks. Falls back to `scale.ticks()` or `.domain()`. */
tickValues?: ScaleInput<Scale>[];
/** Styles to apply as grid line style. */
lineStyle?: CSSProperties;
/** Pixel offset to apply as a translation (y- for Rows, x- for Columns) to each grid lines. */
Expand Down

0 comments on commit 90039a9

Please sign in to comment.