svelteplot 0.2.9 → 0.2.10-pr-110.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/Mark.svelte +5 -4
- package/dist/Plot.svelte +3 -2
- package/dist/core/Plot.svelte +37 -20
- package/dist/helpers/colors.d.ts +1 -1
- package/dist/helpers/index.d.ts +2 -2
- package/dist/helpers/scales.d.ts +1 -1
- package/dist/helpers/scales.js +9 -1
- package/dist/helpers/typeChecks.d.ts +4 -4
- package/dist/marks/Area.svelte +31 -29
- package/dist/marks/AreaX.svelte +7 -3
- package/dist/marks/AreaX.svelte.d.ts +1 -6
- package/dist/marks/AreaY.svelte +7 -2
- package/dist/marks/AreaY.svelte.d.ts +1 -9
- package/dist/marks/Arrow.svelte +21 -7
- package/dist/marks/AxisX.svelte +24 -21
- package/dist/marks/AxisX.svelte.d.ts +3 -4
- package/dist/marks/AxisY.svelte +23 -20
- package/dist/marks/AxisY.svelte.d.ts +3 -4
- package/dist/marks/BarX.svelte +18 -2
- package/dist/marks/BarX.svelte.d.ts +2 -2
- package/dist/marks/BarY.svelte +18 -3
- package/dist/marks/BarY.svelte.d.ts +2 -2
- package/dist/marks/BollingerX.svelte.d.ts +1 -1
- package/dist/marks/BollingerY.svelte.d.ts +1 -1
- package/dist/marks/BrushX.svelte +1 -1
- package/dist/marks/BrushY.svelte +1 -1
- package/dist/marks/Cell.svelte +1 -0
- package/dist/marks/Cell.svelte.d.ts +2 -2
- package/dist/marks/ColorLegend.svelte +3 -2
- package/dist/marks/Dot.svelte +29 -24
- package/dist/marks/Dot.svelte.d.ts +2 -2
- package/dist/marks/Frame.svelte +24 -4
- package/dist/marks/Frame.svelte.d.ts +2 -2
- package/dist/marks/Geo.svelte +27 -33
- package/dist/marks/Geo.svelte.d.ts +4 -2
- package/dist/marks/Graticule.svelte +2 -2
- package/dist/marks/Rect.svelte +1 -0
- package/dist/marks/Rect.svelte.d.ts +2 -2
- package/dist/marks/Sphere.svelte +2 -2
- package/dist/marks/Sphere.svelte.d.ts +3 -58
- package/dist/marks/helpers/Anchor.svelte +37 -0
- package/dist/marks/helpers/Anchor.svelte.d.ts +15 -0
- package/dist/marks/helpers/BaseAxisX.svelte +59 -53
- package/dist/marks/helpers/BaseAxisX.svelte.d.ts +1 -0
- package/dist/marks/helpers/BaseAxisY.svelte +24 -18
- package/dist/marks/helpers/BaseAxisY.svelte.d.ts +1 -0
- package/dist/marks/helpers/MarkerPath.svelte.d.ts +1 -41
- package/dist/marks/helpers/RectPath.svelte +33 -30
- package/dist/marks/helpers/Regression.svelte +1 -1
- package/dist/transforms/bollinger.d.ts +1 -8
- package/dist/transforms/centroid.d.ts +1 -8
- package/dist/transforms/group.d.ts +4 -12
- package/dist/transforms/interval.d.ts +2 -6
- package/dist/transforms/map.d.ts +4 -10
- package/dist/transforms/normalize.d.ts +2 -6
- package/dist/transforms/select.d.ts +7 -21
- package/dist/transforms/sort.d.ts +5 -17
- package/dist/transforms/sort.js +23 -13
- package/dist/transforms/window.d.ts +2 -14
- package/dist/types.d.ts +232 -78
- package/dist/ui/ExamplesGrid.svelte +1 -1
- package/package.json +121 -120
|
@@ -1,28 +1,16 @@
|
|
|
1
1
|
import type { DataRecord, DataRow, TransformArg } from '../types.js';
|
|
2
2
|
export declare const SORT_KEY: unique symbol;
|
|
3
|
+
export declare const IS_SORTED: unique symbol;
|
|
3
4
|
export declare function sort({ data, ...channels }: TransformArg<DataRecord>, options?: {
|
|
4
5
|
reverse?: boolean;
|
|
5
|
-
}):
|
|
6
|
-
sort: null;
|
|
7
|
-
data: {
|
|
8
|
-
___orig___?: import("../types.js").RawValue | [import("../types.js").RawValue, import("../types.js").RawValue];
|
|
9
|
-
}[];
|
|
10
|
-
} | {
|
|
11
|
-
data: DataRecord[];
|
|
12
|
-
};
|
|
6
|
+
}): any;
|
|
13
7
|
/**
|
|
14
|
-
*
|
|
8
|
+
* shuffles the data row order
|
|
15
9
|
*/
|
|
16
10
|
export declare function shuffle({ data, ...channels }: TransformArg<DataRow[]>, options?: {
|
|
17
11
|
seed?: number;
|
|
18
|
-
}):
|
|
19
|
-
sort: null;
|
|
20
|
-
data: DataRow[][];
|
|
21
|
-
};
|
|
12
|
+
}): any;
|
|
22
13
|
/**
|
|
23
14
|
* reverses the data row order
|
|
24
15
|
*/
|
|
25
|
-
export declare function reverse({ data, ...channels }: TransformArg<DataRow[]>):
|
|
26
|
-
sort: null;
|
|
27
|
-
data: DataRow[][];
|
|
28
|
-
};
|
|
16
|
+
export declare function reverse({ data, ...channels }: TransformArg<DataRow[]>): any;
|
package/dist/transforms/sort.js
CHANGED
|
@@ -3,6 +3,7 @@ import { resolveChannel } from '../helpers/resolve.js';
|
|
|
3
3
|
import { shuffler } from 'd3-array';
|
|
4
4
|
import { randomLcg } from 'd3-random';
|
|
5
5
|
export const SORT_KEY = Symbol('sortKey');
|
|
6
|
+
export const IS_SORTED = Symbol('isSorted');
|
|
6
7
|
export function sort({ data, ...channels }, options = {}) {
|
|
7
8
|
if (!Array.isArray(data))
|
|
8
9
|
return { data, ...channels };
|
|
@@ -14,19 +15,26 @@ export function sort({ data, ...channels }, options = {}) {
|
|
|
14
15
|
sort.channel = sort.channel.substring(1);
|
|
15
16
|
sort.order = 'descending';
|
|
16
17
|
}
|
|
18
|
+
// if sort is a function that does not take exactly one argument, we treat it
|
|
19
|
+
// as comparator function, as you would pass to array.sort
|
|
20
|
+
const isComparator = typeof channels.sort === 'function' && channels.sort.length !== 1;
|
|
17
21
|
// sort data
|
|
18
22
|
return {
|
|
19
|
-
data:
|
|
20
|
-
.
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
? -1
|
|
27
|
-
|
|
28
|
-
|
|
23
|
+
data: isComparator
|
|
24
|
+
? data.toSorted(channels.sort)
|
|
25
|
+
: data
|
|
26
|
+
.map((d) => ({
|
|
27
|
+
...d,
|
|
28
|
+
[SORT_KEY]: resolveChannel('sort', d, { ...channels, sort })
|
|
29
|
+
}))
|
|
30
|
+
.toSorted((a, b) => (a[SORT_KEY] > b[SORT_KEY] ? 1 : a[SORT_KEY] < b[SORT_KEY] ? -1 : 0) *
|
|
31
|
+
(options.reverse ||
|
|
32
|
+
(isDataRecord(sort) && sort?.order === 'descending')
|
|
33
|
+
? -1
|
|
34
|
+
: 1))
|
|
35
|
+
.map(({ [SORT_KEY]: a, ...rest }) => rest),
|
|
29
36
|
...channels,
|
|
37
|
+
[IS_SORTED]: sort,
|
|
30
38
|
// set the sort channel to null to disable the implicit alphabetical
|
|
31
39
|
// ordering of ordinal domains, and also to avoid double sorting in case
|
|
32
40
|
// this transform is used "outside" a mark
|
|
@@ -39,7 +47,7 @@ export function sort({ data, ...channels }, options = {}) {
|
|
|
39
47
|
};
|
|
40
48
|
}
|
|
41
49
|
/**
|
|
42
|
-
*
|
|
50
|
+
* shuffles the data row order
|
|
43
51
|
*/
|
|
44
52
|
export function shuffle({ data, ...channels }, options = {}) {
|
|
45
53
|
const random = randomLcg(options.seed);
|
|
@@ -49,7 +57,8 @@ export function shuffle({ data, ...channels }, options = {}) {
|
|
|
49
57
|
...channels,
|
|
50
58
|
// set the sort channel to null to disable the implicit
|
|
51
59
|
// alphabetical ordering of ordinal domains
|
|
52
|
-
sort: null
|
|
60
|
+
sort: null,
|
|
61
|
+
[IS_SORTED]: true
|
|
53
62
|
};
|
|
54
63
|
}
|
|
55
64
|
/**
|
|
@@ -61,6 +70,7 @@ export function reverse({ data, ...channels }) {
|
|
|
61
70
|
...channels,
|
|
62
71
|
// set the sort channel to null to disable the implicit
|
|
63
72
|
// alphabetical ordering of ordinal domains
|
|
64
|
-
sort: null
|
|
73
|
+
sort: null,
|
|
74
|
+
[IS_SORTED]: true
|
|
65
75
|
};
|
|
66
76
|
}
|
|
@@ -7,18 +7,6 @@ type WindowOptions = {
|
|
|
7
7
|
reduce: ReducerName;
|
|
8
8
|
strict: boolean;
|
|
9
9
|
};
|
|
10
|
-
export declare function windowX(args: TransformArg<DataRecord>, options: WindowOptions):
|
|
11
|
-
|
|
12
|
-
[x: string]: import("../types.js").RawValue;
|
|
13
|
-
[x: symbol]: import("../types.js").RawValue;
|
|
14
|
-
___orig___?: import("../types.js").RawValue | [import("../types.js").RawValue, import("../types.js").RawValue];
|
|
15
|
-
}[];
|
|
16
|
-
};
|
|
17
|
-
export declare function windowY(args: TransformArg<DataRecord>, options: WindowOptions): {
|
|
18
|
-
data: {
|
|
19
|
-
[x: string]: import("../types.js").RawValue;
|
|
20
|
-
[x: symbol]: import("../types.js").RawValue;
|
|
21
|
-
___orig___?: import("../types.js").RawValue | [import("../types.js").RawValue, import("../types.js").RawValue];
|
|
22
|
-
}[];
|
|
23
|
-
};
|
|
10
|
+
export declare function windowX(args: TransformArg<DataRecord>, options: WindowOptions): any;
|
|
11
|
+
export declare function windowY(args: TransformArg<DataRecord>, options: WindowOptions): any;
|
|
24
12
|
export {};
|
package/dist/types.d.ts
CHANGED
|
@@ -4,6 +4,34 @@ import type { MouseEventHandler } from 'svelte/elements';
|
|
|
4
4
|
import type { MarkerShape } from './marks/helpers/Marker.svelte';
|
|
5
5
|
import type { Writable } from 'svelte/store';
|
|
6
6
|
import type * as CSS from 'csstype';
|
|
7
|
+
import type { AreaMarkProps } from './marks/Area.svelte';
|
|
8
|
+
import type { ArrowMarkProps } from './marks/Arrow.svelte';
|
|
9
|
+
import type { AxisXMarkProps } from './marks/AxisX.svelte';
|
|
10
|
+
import type { AxisYMarkProps } from './marks/AxisY.svelte';
|
|
11
|
+
import type { BarXMarkProps } from './marks/BarX.svelte';
|
|
12
|
+
import type { CellMarkProps } from './marks/Cell.svelte';
|
|
13
|
+
import type { DotMarkProps } from './marks/Dot.svelte';
|
|
14
|
+
import type { FrameMarkProps } from './marks/Frame.svelte';
|
|
15
|
+
import type { GeoMarkProps } from './marks/Geo.svelte';
|
|
16
|
+
import type { GraticuleMarkProps } from './marks/Graticule.svelte';
|
|
17
|
+
import type { LineMarkProps } from './marks/Line.svelte';
|
|
18
|
+
import type { LinkMarkProps } from './marks/Link.svelte';
|
|
19
|
+
import type { RectMarkProps } from './marks/Rect.svelte';
|
|
20
|
+
import type { RuleXMarkProps } from './marks/RuleX.svelte';
|
|
21
|
+
import type { SphereMarkProps } from './marks/Sphere.svelte';
|
|
22
|
+
import type { SpikeMarkProps } from './marks/Spike.svelte';
|
|
23
|
+
import type { TextMarkProps } from './marks/Text.svelte';
|
|
24
|
+
import type { TickXMarkProps } from './marks/TickX.svelte';
|
|
25
|
+
import type { VectorMarkProps } from './marks/Vector.svelte';
|
|
26
|
+
import type { BrushMarkProps } from './marks/Brush.svelte';
|
|
27
|
+
import type { BrushXMarkProps } from './marks/BrushX.svelte';
|
|
28
|
+
import type { BrushYMarkProps } from './marks/BrushY.svelte';
|
|
29
|
+
import type { RectXMarkProps } from './marks/RectX.svelte';
|
|
30
|
+
import type { RectYMarkProps } from './marks/RectY.svelte';
|
|
31
|
+
import type { RuleYMarkProps } from './marks/RuleY.svelte';
|
|
32
|
+
import type { TickYMarkProps } from './marks/TickY.svelte';
|
|
33
|
+
import type { GridYMarkProps } from './marks/GridY.svelte';
|
|
34
|
+
import type { GridXMarkProps } from './marks/GridX.svelte';
|
|
7
35
|
export type MarkType = 'area' | 'arrow' | 'axisX' | 'axisY' | 'barX' | 'barY' | 'cell' | 'dot' | 'vector' | 'frame' | 'geo' | 'gridX' | 'gridY' | 'line' | 'rect' | 'regression' | 'ruleX' | 'ruleY' | 'swoopyArrow' | 'text' | 'tickX' | 'tickY';
|
|
8
36
|
export type ScaleName = 'x' | 'y' | 'r' | 'color' | 'opacity' | 'length' | 'symbol' | 'fx' | 'fy' | 'projection';
|
|
9
37
|
export type ScaleType = 'linear' | 'pow' | 'sqrt' | 'log' | 'symlog' | 'time' | 'point' | 'ordinal' | 'sequential' | 'band' | 'categorical' | 'cyclical' | 'threshold' | 'quantile-cont' | 'quantile' | 'quantize' | 'diverging' | 'diverging-log' | 'diverging-pow' | 'diverging-sqrt' | 'diverging-symlog';
|
|
@@ -300,52 +328,7 @@ export type PlotOptions = {
|
|
|
300
328
|
*/
|
|
301
329
|
css: (d: string) => string | undefined;
|
|
302
330
|
};
|
|
303
|
-
export type
|
|
304
|
-
axisXAnchor: AxisXAnchor;
|
|
305
|
-
axisYAnchor: AxisYAnchor;
|
|
306
|
-
xTickSpacing: number;
|
|
307
|
-
yTickSpacing: number;
|
|
308
|
-
height: number;
|
|
309
|
-
inset: number;
|
|
310
|
-
colorScheme: ColorScheme | string[];
|
|
311
|
-
categoricalColorScheme: ColorScheme | string[];
|
|
312
|
-
dotRadius: number;
|
|
313
|
-
/**
|
|
314
|
-
* for computing the automatic height based on the number of
|
|
315
|
-
* domain items in a point scale
|
|
316
|
-
*/
|
|
317
|
-
pointScaleHeight: number;
|
|
318
|
-
/**
|
|
319
|
-
* for computing the automatic height based on the number of
|
|
320
|
-
* domain items in a band scale
|
|
321
|
-
*/
|
|
322
|
-
bandScaleHeight: number;
|
|
323
|
-
/**
|
|
324
|
-
* add frame to plots by default
|
|
325
|
-
*/
|
|
326
|
-
frame: boolean;
|
|
327
|
-
grid: boolean;
|
|
328
|
-
axes: boolean;
|
|
329
|
-
/**
|
|
330
|
-
* initial width of the plot before measuring the actual width
|
|
331
|
-
*/
|
|
332
|
-
initialWidth: number;
|
|
333
|
-
/**
|
|
334
|
-
* locale, used for automatic axis ticks
|
|
335
|
-
*/
|
|
336
|
-
locale: string;
|
|
337
|
-
/**
|
|
338
|
-
* default number format for axis ticks
|
|
339
|
-
*/
|
|
340
|
-
numberFormat: Intl.NumberFormatOptions;
|
|
341
|
-
markerDotRadius: number;
|
|
342
|
-
/**
|
|
343
|
-
* fallback color to be used for null/NA
|
|
344
|
-
*/
|
|
345
|
-
unknown: string;
|
|
346
|
-
css: (d: string) => string | undefined;
|
|
347
|
-
};
|
|
348
|
-
export type GenericMarkOptions = Record<string, any>;
|
|
331
|
+
export type GenericMarkOptions = Record<string | symbol, any>;
|
|
349
332
|
export type DataRecord = Record<string | symbol, RawValue> & {
|
|
350
333
|
___orig___?: RawValue | [RawValue, RawValue];
|
|
351
334
|
};
|
|
@@ -490,15 +473,30 @@ export type FacetContext = {
|
|
|
490
473
|
};
|
|
491
474
|
export type LinkableMarkProps = {
|
|
492
475
|
/**
|
|
493
|
-
*
|
|
476
|
+
* if set, the mark element will be wrapped in a <a> link element
|
|
477
|
+
*/
|
|
478
|
+
href?: ConstantAccessor<string>;
|
|
479
|
+
/**
|
|
480
|
+
* the relationship of the target object to the link object (e.g. "noopener")
|
|
481
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/a#rel
|
|
482
|
+
*/
|
|
483
|
+
rel?: ConstantAccessor<string>;
|
|
484
|
+
/**
|
|
485
|
+
* the link target mime type, e.g. "text/csv"
|
|
486
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/a#type
|
|
494
487
|
*/
|
|
495
|
-
|
|
488
|
+
type?: ConstantAccessor<string>;
|
|
496
489
|
/**
|
|
497
|
-
*
|
|
498
|
-
*
|
|
490
|
+
* the target of the link, e.g. "_blank" or "_self"
|
|
491
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/a#target
|
|
499
492
|
*/
|
|
500
|
-
|
|
501
|
-
|
|
493
|
+
target?: ConstantAccessor<'_self' | '_blank' | '_parent' | '_top' | string>;
|
|
494
|
+
/**
|
|
495
|
+
* if set to true, the link will be downloaded instead of navigating to it
|
|
496
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a#download
|
|
497
|
+
*/
|
|
498
|
+
download?: ConstantAccessor<boolean>;
|
|
499
|
+
[key: `data-sveltekit-${string}`]: string | boolean;
|
|
502
500
|
};
|
|
503
501
|
export type BaseMarkProps = Partial<{
|
|
504
502
|
/**
|
|
@@ -512,6 +510,12 @@ export type BaseMarkProps = Partial<{
|
|
|
512
510
|
dy: ConstantAccessor<number>;
|
|
513
511
|
fill: ConstantAccessor<string>;
|
|
514
512
|
fillOpacity: ConstantAccessor<number>;
|
|
513
|
+
sort: string | ConstantAccessor<RawValue> | ((a: RawValue, b: RawValue) => number) | {
|
|
514
|
+
/** sort data using an already defined channel */
|
|
515
|
+
channel: string;
|
|
516
|
+
/** sort order */
|
|
517
|
+
order?: 'ascending' | 'descending';
|
|
518
|
+
};
|
|
515
519
|
stroke: ConstantAccessor<string>;
|
|
516
520
|
strokeWidth: ConstantAccessor<number>;
|
|
517
521
|
strokeOpacity: ConstantAccessor<number>;
|
|
@@ -577,7 +581,7 @@ export type BaseRectMarkProps = {
|
|
|
577
581
|
borderRadius?: BorderRadius;
|
|
578
582
|
};
|
|
579
583
|
export type Channels = Record<string, ChannelAccessor | ConstantAccessor<string | number | boolean | symbol>>;
|
|
580
|
-
export type TransformArg<K> = Channels & {
|
|
584
|
+
export type TransformArg<K> = Channels & BaseMarkProps & {
|
|
581
585
|
data: K[];
|
|
582
586
|
};
|
|
583
587
|
export type MapArg<K> = Channels & {
|
|
@@ -597,11 +601,12 @@ export type AutoMarginStores = {
|
|
|
597
601
|
autoMarginRight: Writable<Map<string, number>>;
|
|
598
602
|
autoMarginBottom: Writable<Map<string, number>>;
|
|
599
603
|
};
|
|
604
|
+
type IgnoreDefaults = 'data' | 'facet' | ChannelName | 'title' | 'automatic';
|
|
600
605
|
/**
|
|
601
606
|
* these are the default options for the plot marks that can be set using
|
|
602
607
|
* the 'svelteplot/defaults' context.
|
|
603
608
|
*/
|
|
604
|
-
export type
|
|
609
|
+
export type PlotDefaults = {
|
|
605
610
|
/**
|
|
606
611
|
* default plot height
|
|
607
612
|
*/
|
|
@@ -611,41 +616,32 @@ export type DefaultOptions = {
|
|
|
611
616
|
*/
|
|
612
617
|
inset: number;
|
|
613
618
|
/**
|
|
614
|
-
* default
|
|
615
|
-
*/
|
|
616
|
-
tickSize: number;
|
|
617
|
-
/**
|
|
618
|
-
* default padding between tick line and tick label
|
|
619
|
-
*/
|
|
620
|
-
tickPadding: number;
|
|
621
|
-
/**
|
|
622
|
-
* default font size for tick labels
|
|
623
|
-
*/
|
|
624
|
-
tickFontSize: number;
|
|
625
|
-
/**
|
|
626
|
-
* default anchor for x axis
|
|
619
|
+
* default color scheme
|
|
627
620
|
*/
|
|
628
|
-
|
|
621
|
+
colorScheme: ColorScheme;
|
|
622
|
+
categoricalColorScheme: ColorScheme | string[];
|
|
629
623
|
/**
|
|
630
|
-
*
|
|
624
|
+
* fallback color to be used for null/NA
|
|
631
625
|
*/
|
|
632
|
-
|
|
626
|
+
unknown: string;
|
|
633
627
|
/**
|
|
634
|
-
*
|
|
628
|
+
* optional @emotion/css function to style the plot
|
|
635
629
|
*/
|
|
636
|
-
|
|
630
|
+
css: (d: string) => string | undefined;
|
|
637
631
|
/**
|
|
638
|
-
*
|
|
632
|
+
* for computing the automatic height based on the number of
|
|
633
|
+
* domain items in a point scale
|
|
639
634
|
*/
|
|
640
|
-
|
|
635
|
+
pointScaleHeight: number;
|
|
641
636
|
/**
|
|
642
|
-
*
|
|
637
|
+
* for computing the automatic height based on the number of
|
|
638
|
+
* domain items in a band scale
|
|
643
639
|
*/
|
|
644
|
-
|
|
640
|
+
bandScaleHeight: number;
|
|
645
641
|
/**
|
|
646
|
-
*
|
|
642
|
+
* initial width of the plot before measuring the actual width
|
|
647
643
|
*/
|
|
648
|
-
|
|
644
|
+
initialWidth: number;
|
|
649
645
|
/**
|
|
650
646
|
* locale, used for automatic axis ticks
|
|
651
647
|
*/
|
|
@@ -658,6 +654,164 @@ export type DefaultOptions = {
|
|
|
658
654
|
* default dot radius for line markers, used in dot, circle, and circle-stroke markers
|
|
659
655
|
*/
|
|
660
656
|
markerDotRadius: number;
|
|
657
|
+
/**
|
|
658
|
+
* default props for area marks, applied to area, areaX, and areaY marks
|
|
659
|
+
*/
|
|
660
|
+
area: Partial<Omit<AreaMarkProps, IgnoreDefaults>>;
|
|
661
|
+
/**
|
|
662
|
+
* default props for areaX marks
|
|
663
|
+
*/
|
|
664
|
+
areaX: Partial<Omit<AreaMarkProps, IgnoreDefaults>>;
|
|
665
|
+
/**
|
|
666
|
+
* default props for areaY marks
|
|
667
|
+
*/
|
|
668
|
+
areaY: Partial<Omit<AreaMarkProps, IgnoreDefaults>>;
|
|
669
|
+
/**
|
|
670
|
+
* default props for arrow marks
|
|
671
|
+
*/
|
|
672
|
+
arrow: Partial<Omit<ArrowMarkProps, IgnoreDefaults>>;
|
|
673
|
+
/**
|
|
674
|
+
* default props for axis marks, applied to both axisX and axisY marks
|
|
675
|
+
*/
|
|
676
|
+
axis: Partial<Omit<AxisXMarkProps, 'data' | 'facet' | ChannelName | 'facetAnchor' | 'labelAnchor' | 'anchor'> & {
|
|
677
|
+
implicit: boolean;
|
|
678
|
+
}>;
|
|
679
|
+
/**
|
|
680
|
+
* default props for axisX marks
|
|
681
|
+
*/
|
|
682
|
+
axisX: Partial<Omit<AxisXMarkProps, IgnoreDefaults> & {
|
|
683
|
+
implicit: boolean;
|
|
684
|
+
}>;
|
|
685
|
+
/**
|
|
686
|
+
* default props for axisY marks
|
|
687
|
+
*/
|
|
688
|
+
axisY: Partial<Omit<AxisYMarkProps, IgnoreDefaults> & {
|
|
689
|
+
implicit: boolean;
|
|
690
|
+
}>;
|
|
691
|
+
/**
|
|
692
|
+
* default props for bar marks, applied to both barX and barY marks
|
|
693
|
+
*/
|
|
694
|
+
bar: Partial<Omit<BarXMarkProps, IgnoreDefaults>>;
|
|
695
|
+
/**
|
|
696
|
+
* default props for barX marks
|
|
697
|
+
*/
|
|
698
|
+
barX: Partial<Omit<BarXMarkProps, IgnoreDefaults>>;
|
|
699
|
+
/**
|
|
700
|
+
* default props for barY marks
|
|
701
|
+
*/
|
|
702
|
+
barY: Partial<Omit<BarXMarkProps, IgnoreDefaults>>;
|
|
703
|
+
/**
|
|
704
|
+
* default props for brush marks, applied to brush, brushX and brushY marks
|
|
705
|
+
*/
|
|
706
|
+
brush: Partial<Omit<BrushMarkProps, IgnoreDefaults | 'limitDimension'>>;
|
|
707
|
+
/**
|
|
708
|
+
* default props for brushX marks
|
|
709
|
+
*/
|
|
710
|
+
brushX: Partial<Omit<BrushXMarkProps, IgnoreDefaults>>;
|
|
711
|
+
/**
|
|
712
|
+
* default props for brushY marks
|
|
713
|
+
*/
|
|
714
|
+
brushY: Partial<Omit<BrushYMarkProps, IgnoreDefaults>>;
|
|
715
|
+
/**
|
|
716
|
+
* default props for cell marks
|
|
717
|
+
*/
|
|
718
|
+
cell: Partial<Omit<CellMarkProps, IgnoreDefaults>>;
|
|
719
|
+
/**
|
|
720
|
+
* default props for dot marks
|
|
721
|
+
*/
|
|
722
|
+
dot: Partial<Omit<DotMarkProps, IgnoreDefaults>>;
|
|
723
|
+
/**
|
|
724
|
+
* default props for frame marks
|
|
725
|
+
*/
|
|
726
|
+
frame: Partial<FrameMarkProps & {
|
|
727
|
+
implicit: boolean;
|
|
728
|
+
}>;
|
|
729
|
+
/**
|
|
730
|
+
* default props for geo marks
|
|
731
|
+
*/
|
|
732
|
+
geo: Partial<Omit<GeoMarkProps, IgnoreDefaults>>;
|
|
733
|
+
/**
|
|
734
|
+
* default props for graticule marks
|
|
735
|
+
*/
|
|
736
|
+
graticule: Partial<Omit<GraticuleMarkProps, IgnoreDefaults>>;
|
|
737
|
+
/**
|
|
738
|
+
* default props for grid marks, applied to both gridX and gridY marks
|
|
739
|
+
*/
|
|
740
|
+
grid: Partial<Omit<GridXMarkProps, IgnoreDefaults> & {
|
|
741
|
+
implicit: boolean;
|
|
742
|
+
}>;
|
|
743
|
+
/**
|
|
744
|
+
* default props for gridX marks
|
|
745
|
+
*/
|
|
746
|
+
gridX: Partial<Omit<GridXMarkProps, IgnoreDefaults> & {
|
|
747
|
+
implicit: boolean;
|
|
748
|
+
}>;
|
|
749
|
+
/**
|
|
750
|
+
* default props for gridY marks
|
|
751
|
+
*/
|
|
752
|
+
gridY: Partial<Omit<GridYMarkProps, IgnoreDefaults> & {
|
|
753
|
+
implicit: boolean;
|
|
754
|
+
}>;
|
|
755
|
+
/**
|
|
756
|
+
* default props for line marks
|
|
757
|
+
*/
|
|
758
|
+
line: Partial<Omit<LineMarkProps, IgnoreDefaults>>;
|
|
759
|
+
/**
|
|
760
|
+
* default props for link marks
|
|
761
|
+
*/
|
|
762
|
+
link: Partial<Omit<LinkMarkProps, IgnoreDefaults>>;
|
|
763
|
+
/**
|
|
764
|
+
* default props for rect marks, applied to rect and rectX marks
|
|
765
|
+
*/
|
|
766
|
+
rect: Partial<Omit<RectMarkProps, IgnoreDefaults>>;
|
|
767
|
+
/**
|
|
768
|
+
* default props for rectX marks
|
|
769
|
+
*/
|
|
770
|
+
rectX: Partial<Omit<RectXMarkProps, IgnoreDefaults>>;
|
|
771
|
+
/**
|
|
772
|
+
* default props for rectY marks
|
|
773
|
+
*/
|
|
774
|
+
rectY: Partial<Omit<RectYMarkProps, IgnoreDefaults>>;
|
|
775
|
+
/**
|
|
776
|
+
* default props for rule marks
|
|
777
|
+
*/
|
|
778
|
+
rule: Partial<Omit<RuleXMarkProps, IgnoreDefaults>>;
|
|
779
|
+
/**
|
|
780
|
+
* default props for rule marks
|
|
781
|
+
*/
|
|
782
|
+
ruleX: Partial<Omit<RuleXMarkProps, IgnoreDefaults>>;
|
|
783
|
+
/**
|
|
784
|
+
* default props for rule marks
|
|
785
|
+
*/
|
|
786
|
+
ruleY: Partial<Omit<RuleYMarkProps, IgnoreDefaults>>;
|
|
787
|
+
/**
|
|
788
|
+
* default props for sphere marks
|
|
789
|
+
*/
|
|
790
|
+
sphere: Partial<SphereMarkProps>;
|
|
791
|
+
/**
|
|
792
|
+
* default props for spike marks
|
|
793
|
+
*/
|
|
794
|
+
spike: Partial<Omit<SpikeMarkProps, IgnoreDefaults>>;
|
|
795
|
+
/**
|
|
796
|
+
* default props for text marks
|
|
797
|
+
*/
|
|
798
|
+
text: Partial<Omit<TextMarkProps, IgnoreDefaults>>;
|
|
799
|
+
/**
|
|
800
|
+
* default props for tick marks, applied to tickX and tickY marks
|
|
801
|
+
*/
|
|
802
|
+
tick: Partial<Omit<TickXMarkProps, IgnoreDefaults>>;
|
|
803
|
+
/**
|
|
804
|
+
* default props for tickX marks
|
|
805
|
+
*/
|
|
806
|
+
tickX: Partial<Omit<TickXMarkProps, IgnoreDefaults>>;
|
|
807
|
+
/**
|
|
808
|
+
* default props for tickY marks
|
|
809
|
+
*/
|
|
810
|
+
tickY: Partial<Omit<TickYMarkProps, IgnoreDefaults>>;
|
|
811
|
+
/**
|
|
812
|
+
* default props for vector marks
|
|
813
|
+
*/
|
|
814
|
+
vector: Partial<Omit<VectorMarkProps, IgnoreDefaults>>;
|
|
661
815
|
};
|
|
662
816
|
export type MapIndexObject = {
|
|
663
817
|
mapIndex: (I: number[], S: RawValue[], T: RawValue[]) => void;
|