From d63a9ebfe7e7ec715161c510d3963b58b1566b29 Mon Sep 17 00:00:00 2001 From: James Scott-Brown Date: Thu, 22 May 2025 14:58:19 +0100 Subject: [PATCH] fix typos --- src/lib/Plot.svelte | 2 +- src/lib/helpers/autoScales.ts | 2 +- src/lib/helpers/callWithProps.ts | 2 +- src/lib/helpers/group.test.ts | 2 +- src/lib/helpers/scales.ts | 6 +++--- src/lib/marks/GridX.svelte | 4 ++-- src/lib/marks/helpers/BaseAxisX.svelte | 2 +- src/lib/marks/helpers/BaseAxisY.svelte | 2 +- src/lib/marks/helpers/MarkerPath.svelte | 2 +- src/lib/transforms/bin.test.ts | 4 ++-- src/lib/transforms/bin.ts | 2 +- src/routes/features/plot/+page.md | 2 +- src/routes/features/scales/+page.md | 6 +++--- src/routes/getting-started/+page.md | 2 +- src/routes/introduction/+page.md | 4 ++-- src/routes/marks/dot/+page.md | 2 +- src/routes/marks/frame/+page.md | 2 +- src/routes/marks/line/+page.md | 2 +- src/routes/marks/text/+page.md | 2 +- src/routes/marks/vector/+page.md | 2 +- 20 files changed, 27 insertions(+), 27 deletions(-) diff --git a/src/lib/Plot.svelte b/src/lib/Plot.svelte index 65c9e2bb..ae81faf6 100644 --- a/src/lib/Plot.svelte +++ b/src/lib/Plot.svelte @@ -4,7 +4,7 @@ their data and channels and computes the shared scales. The Plot component is split into two parts. This is the outer Plot which - provides convenient defaults and automatically adds axes etc to the grapihcs. + provides convenient defaults and automatically adds axes etc to the graphics. The downside is that it adds a bunch of imports that you may not be using. To help with this you can use the core/Plot component directly for a more low-level Plot wrapper. diff --git a/src/lib/helpers/autoScales.ts b/src/lib/helpers/autoScales.ts index 9c1418f0..2577fed4 100644 --- a/src/lib/helpers/autoScales.ts +++ b/src/lib/helpers/autoScales.ts @@ -321,7 +321,7 @@ function getScaleRange( : name === 'r' ? [0, 10] : name === 'symbol' - ? // Plot is smart enough to pick different default shapes depending on wether + ? // Plot is smart enough to pick different default shapes depending on whether // or not there are filled dot marks in the plot, so we have to pass this // information all the way here plotHasFilledDotMarks diff --git a/src/lib/helpers/callWithProps.ts b/src/lib/helpers/callWithProps.ts index 78f3259d..25d707fb 100644 --- a/src/lib/helpers/callWithProps.ts +++ b/src/lib/helpers/callWithProps.ts @@ -4,7 +4,7 @@ type Setter = (v: any) => void; /** * Helper function to call a D3 "function class" while also calling - * porperty setter functions on the result. + * property setter functions on the result. */ export default function ( d3func: () => Record, diff --git a/src/lib/helpers/group.test.ts b/src/lib/helpers/group.test.ts index 102e6517..432a7240 100644 --- a/src/lib/helpers/group.test.ts +++ b/src/lib/helpers/group.test.ts @@ -27,7 +27,7 @@ describe('groupFacetsAndZ', () => { expect(result).toEqual([2, 1, 1, 1]); }); - it('implicitely groups by fill and stroke if z is not present', () => { + it('implicitly groups by fill and stroke if z is not present', () => { const items = [ { color: 'red', value: 10 }, { color: 'red', value: 15 }, diff --git a/src/lib/helpers/scales.ts b/src/lib/helpers/scales.ts index 706a3ccb..fbed5e58 100644 --- a/src/lib/helpers/scales.ts +++ b/src/lib/helpers/scales.ts @@ -402,9 +402,9 @@ const scaledChannelNames: ScaledChannelName[] = [ ]; /** - * Mark channels can explicitely or implicitely be exempt from being + * Mark channels can explicitly or implicitly be exempt from being * mapped to a scale, so everywhere where values are being mapped to - * scales, we need to check if the the scale is supposed to be used + * scales, we need to check if the scale is supposed to be used * not. That's what this function is used for. */ export function getUsedScales( @@ -450,7 +450,7 @@ export function projectXY( ): [number, number] { if (scales.projection) { // TODO: pretty sure this is not how projection streams are supposed to be used - // efficiantly, in observable plot, all data points of a mark are projected using + // efficiently, in observable plot, all data points of a mark are projected using // the same stream let x_, y_; const stream = scales.projection.stream({ diff --git a/src/lib/marks/GridX.svelte b/src/lib/marks/GridX.svelte index d3a7605c..6ae6e5f9 100644 --- a/src/lib/marks/GridX.svelte +++ b/src/lib/marks/GridX.svelte @@ -7,12 +7,12 @@ import { testFilter } from '$lib/helpers/index.js'; import { RAW_VALUE } from '$lib/transforms/recordize.js'; - type GrixXMarkProps = BaseMarkProps & { + type GridXMarkProps = BaseMarkProps & { data?: RawValue[]; automatic?: boolean; }; - let { data = [], automatic = false, ...options }: GrixXMarkProps = $props(); + let { data = [], automatic = false, ...options }: GridXMarkProps = $props(); const { getPlotState } = getContext('svelteplot'); const plot = $derived(getPlotState()); diff --git a/src/lib/marks/helpers/BaseAxisX.svelte b/src/lib/marks/helpers/BaseAxisX.svelte index 85c7a99c..fe531fb2 100644 --- a/src/lib/marks/helpers/BaseAxisX.svelte +++ b/src/lib/marks/helpers/BaseAxisX.svelte @@ -88,7 +88,7 @@ const T = tickObjects.length; for (let i = 0; i < T; i++) { let j = i; - // find the preceeding tick that was not hidden + // find the preceding tick that was not hidden do { j--; } while (j >= 0 && tickObjects[j].hidden); diff --git a/src/lib/marks/helpers/BaseAxisY.svelte b/src/lib/marks/helpers/BaseAxisY.svelte index d0e10f53..d0f85d53 100644 --- a/src/lib/marks/helpers/BaseAxisY.svelte +++ b/src/lib/marks/helpers/BaseAxisY.svelte @@ -70,7 +70,7 @@ const T = tickObjects.length; for (let i = 0; i < T; i++) { let j = i; - // find the preceeding tick that was not hidden + // find the preceding tick that was not hidden do { j--; } while (j >= 0 && tickObjects[j].hidden); diff --git a/src/lib/marks/helpers/MarkerPath.svelte b/src/lib/marks/helpers/MarkerPath.svelte index 72d4c691..d7d3ef2e 100644 --- a/src/lib/marks/helpers/MarkerPath.svelte +++ b/src/lib/marks/helpers/MarkerPath.svelte @@ -25,7 +25,7 @@ datum: DataRecord; /** * the marker shape to use at the start of the path, defaults to - * cirlce + * circle */ markerStart?: boolean | MarkerShape; /** diff --git a/src/lib/transforms/bin.test.ts b/src/lib/transforms/bin.test.ts index 3f554a29..d8478715 100644 --- a/src/lib/transforms/bin.test.ts +++ b/src/lib/transforms/bin.test.ts @@ -73,7 +73,7 @@ describe('binX', () => { y: d })); - it('bins dailys into weekly data', () => { + it('bins daily into weekly data', () => { const { data, ...channels } = binX( { data: dailyData, @@ -119,7 +119,7 @@ describe('binX', () => { expect(binDuration).toBeLessThanOrEqual(7 * 24 * 60 * 60 * 1000); }); - // it.only('bins dailys into weekly data', () => { + // it.only('bins daily into weekly data', () => { // const { data, ...channels } = binX( // { // data: dailyData, diff --git a/src/lib/transforms/bin.ts b/src/lib/transforms/bin.ts index c4898276..e5fba5fe 100644 --- a/src/lib/transforms/bin.ts +++ b/src/lib/transforms/bin.ts @@ -159,7 +159,7 @@ export function binY( } /** - * for binning in x and y dimension simulatenously + * for binning in x and y dimension simultaneously */ export function bin( { data, ...channels }: TransformArg, diff --git a/src/routes/features/plot/+page.md b/src/routes/features/plot/+page.md index 68070ccc..dbdaafbc 100644 --- a/src/routes/features/plot/+page.md +++ b/src/routes/features/plot/+page.md @@ -336,7 +336,7 @@ to add events and scoped styles. ## Core plot -SveltePlot provides a lot of convenience features with the unfortunate side-effect of blowing up the bundle size a bit. In situations where this is a concern, you may use a more light-weight version of the Plot component. Note that you need to explicitely include all marks that you want, such as grids or axis marks. +SveltePlot provides a lot of convenience features with the unfortunate side-effect of blowing up the bundle size a bit. In situations where this is a concern, you may use a more light-weight version of the Plot component. Note that you need to explicitly include all marks that you want, such as grids or axis marks. ```svelte live