Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/solid-charts/src/axis/Axis.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ export type { ScaleType }
const Axis = (props: AxisProps) => {
const defaultedProps = mergeProps(
{
type: props.axis === 'x' ? ('categorial' as const) : ('linear' as const),
type: props.axis === 'x' ? ('categorical' as const) : ('linear' as const),
axisId: '0',
tickCount: 5,
axisRange: 'auto' as const,
Expand Down
8 changes: 4 additions & 4 deletions packages/solid-charts/src/lib/createScale.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@ import {
} from 'd3-scale'
import { type Accessor, createMemo } from 'solid-js'

export type ScaleType = 'linear' | 'categorial'
export type ScaleType = 'linear' | 'categorical'
export type Scale =
| {
type: 'linear'
scale: ScaleLinear<number, number, any>
}
| {
type: 'categorial'
type: 'categorical'
scale: ScalePoint<string>
}

Expand Down Expand Up @@ -64,9 +64,9 @@ const createScale = (props: {
scale,
}
}
case 'categorial':
case 'categorical':
return {
type: 'categorial' as const,
type: 'categorical' as const,
scale: scalePoint(props.data(), [start, end]),
}
}
Expand Down
2 changes: 1 addition & 1 deletion packages/solid-charts/src/lib/createTicks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const createTicks = (props: {
switch (scale.type) {
case 'linear':
return scale.scale.ticks(props.tickCount())
case 'categorial': {
case 'categorical': {
return scale.scale.domain()
}
}
Expand Down