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 7ac4a6f
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions 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 @@ -31,8 +31,12 @@ export type CommonGridProps = {
strokeWidth?: string | number;
/** Grid line stroke-dasharray attribute. */
strokeDasharray?: string;
/** Approximate number of grid lines. Approximate due to d3 alogrithm, specify `tickValues` for precise control. */
/** Approximate number of grid lines. Approximate due to d3 alogrithm, specify `rowTickValues` or `columnTickValues` for precise control. */
numTicks?: number;
/** Exact values to be used for GridRows lines, passed to yScale. Use this if you need precise control over GridRows values. */
rowTickValues?: ScaleInput<GridScale>[];
/** Exact values to be used for GridColumns lines, passed to xScale. Use this if you need precise control over GridColumns values. */
columnTickValues?: ScaleInput<GridScale>[];
/** 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 7ac4a6f

Please sign in to comment.