svelteplot 0.4.6 → 0.4.7-pr-216.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.
Files changed (63) hide show
  1. package/dist/core/Plot.svelte +50 -28
  2. package/dist/helpers/colors.d.ts +1 -1
  3. package/dist/helpers/index.d.ts +2 -2
  4. package/dist/helpers/scales.d.ts +2 -2
  5. package/dist/helpers/scales.js +21 -10
  6. package/dist/helpers/typeChecks.d.ts +4 -4
  7. package/dist/marks/AreaX.svelte.d.ts +2 -1
  8. package/dist/marks/AreaY.svelte.d.ts +2 -1
  9. package/dist/marks/AxisX.svelte.d.ts +1 -1
  10. package/dist/marks/AxisY.svelte.d.ts +1 -1
  11. package/dist/marks/BarX.svelte.d.ts +1 -1
  12. package/dist/marks/BollingerX.svelte.d.ts +2 -74
  13. package/dist/marks/BollingerY.svelte.d.ts +2 -74
  14. package/dist/marks/ColorLegend.svelte +2 -2
  15. package/dist/marks/CustomMark.svelte.d.ts +2 -81
  16. package/dist/marks/DifferenceY.svelte.d.ts +7 -67
  17. package/dist/marks/Line.svelte.d.ts +2 -2
  18. package/dist/marks/LineX.svelte.d.ts +2 -1
  19. package/dist/marks/LineY.svelte.d.ts +2 -1
  20. package/dist/marks/helpers/CanvasLayer.svelte +1 -1
  21. package/dist/marks/helpers/RectPath.svelte.d.ts +3 -63
  22. package/dist/marks/helpers/Regression.svelte +1 -1
  23. package/dist/regression/exponential.d.ts +17 -0
  24. package/dist/regression/exponential.js +56 -0
  25. package/dist/regression/index.d.ts +10 -0
  26. package/dist/regression/index.js +10 -0
  27. package/dist/regression/linear.d.ts +17 -0
  28. package/dist/regression/linear.js +59 -0
  29. package/dist/regression/loess.d.ts +14 -0
  30. package/dist/regression/loess.js +122 -0
  31. package/dist/regression/logarithmic.d.ts +20 -0
  32. package/dist/regression/logarithmic.js +60 -0
  33. package/dist/regression/polynomial.d.ts +21 -0
  34. package/dist/regression/polynomial.js +160 -0
  35. package/dist/regression/power.d.ts +18 -0
  36. package/dist/regression/power.js +56 -0
  37. package/dist/regression/quadratic.d.ts +19 -0
  38. package/dist/regression/quadratic.js +70 -0
  39. package/dist/regression/types.d.ts +4 -0
  40. package/dist/regression/types.js +1 -0
  41. package/dist/regression/utils/determination.d.ts +6 -0
  42. package/dist/regression/utils/determination.js +16 -0
  43. package/dist/regression/utils/geometry.d.ts +9 -0
  44. package/dist/regression/utils/geometry.js +12 -0
  45. package/dist/regression/utils/interpose.d.ts +6 -0
  46. package/dist/regression/utils/interpose.js +37 -0
  47. package/dist/regression/utils/median.d.ts +4 -0
  48. package/dist/regression/utils/median.js +8 -0
  49. package/dist/regression/utils/ols.d.ts +6 -0
  50. package/dist/regression/utils/ols.js +9 -0
  51. package/dist/regression/utils/points.d.ts +11 -0
  52. package/dist/regression/utils/points.js +45 -0
  53. package/dist/transforms/bollinger.d.ts +1 -67
  54. package/dist/transforms/group.d.ts +4 -12
  55. package/dist/transforms/interval.d.ts +2 -124
  56. package/dist/transforms/recordize.d.ts +1 -4
  57. package/dist/transforms/select.d.ts +7 -434
  58. package/dist/transforms/sort.d.ts +3 -246
  59. package/dist/transforms/stack.d.ts +3 -23
  60. package/dist/transforms/window.d.ts +2 -130
  61. package/dist/types/plot.d.ts +14 -7
  62. package/dist/types/scale.d.ts +6 -0
  63. package/package.json +128 -128
@@ -21,7 +21,8 @@
21
21
  PlotScale,
22
22
  PlotDefaults,
23
23
  PlotState,
24
- RawValue
24
+ RawValue,
25
+ PlotMargin
25
26
  } from '../types/index.js';
26
27
  import FacetGrid from './FacetGrid.svelte';
27
28
 
@@ -59,6 +60,7 @@
59
60
  height: 350,
60
61
  initialWidth: 500,
61
62
  inset: 0,
63
+ margin: 'auto',
62
64
  colorScheme: 'turbo',
63
65
  unknown: '#cccccc99',
64
66
 
@@ -122,7 +124,7 @@
122
124
  explicitScales: Set<ScaleName>;
123
125
  explicitDomains: Set<ScaleName>;
124
126
  hasProjection: boolean;
125
- margins?: number;
127
+ margin?: number | 'auto';
126
128
  inset?: number;
127
129
  };
128
130
 
@@ -173,7 +175,7 @@
173
175
  explicitScales,
174
176
  explicitDomains,
175
177
  hasProjection: !!initialOpts.projection,
176
- margins: initialOpts.margins,
178
+ margin: initialOpts.margin,
177
179
  inset: initialOpts.inset
178
180
  })
179
181
  );
@@ -363,6 +365,38 @@
363
365
  return mergeDeep<PlotOptions>({}, smartDefaultPlotOptions(opts), initialOpts);
364
366
  }
365
367
 
368
+ function maybeMargin(
369
+ // the margin option provided to the <Plot> component
370
+ margin: number | 'auto' | PlotMargin | undefined,
371
+ // direction to extract from the margin object
372
+ direction: 'left' | 'right' | 'top' | 'bottom',
373
+ // the margin option defined in the plot defaults
374
+ defaultValue: PlotMargin | number | 'auto',
375
+ // automatic margins computed from the marks
376
+ autoMargins: {
377
+ left: number;
378
+ right: number;
379
+ top: number;
380
+ bottom: number;
381
+ }
382
+ ): number {
383
+ // direction-specific margin value takes precedence
384
+ const marginValue =
385
+ typeof margin === 'object' && margin[direction] != null
386
+ ? margin[direction]
387
+ : // use the margin value if it's a number
388
+ typeof margin === 'number' || margin === 'auto'
389
+ ? margin
390
+ : // use direction-specific default value if defined
391
+ typeof defaultValue === 'object' && defaultValue[direction] != null
392
+ ? defaultValue[direction]
393
+ : typeof defaultValue === 'number' || defaultValue === 'auto'
394
+ ? defaultValue
395
+ : 'auto';
396
+
397
+ return marginValue === 'auto' ? autoMargins[direction] : marginValue;
398
+ }
399
+
366
400
  /**
367
401
  * compute smart default options for the plot based on the scales and marks
368
402
  */
@@ -370,43 +404,31 @@
370
404
  explicitScales,
371
405
  explicitDomains,
372
406
  hasProjection,
373
- margins
407
+ margin
374
408
  }: PlotOptionsParameters): PlotOptions {
375
409
  const autoXAxis = explicitScales.has('x') || explicitDomains.has('x');
376
410
  const autoYAxis = explicitScales.has('y') || explicitDomains.has('y');
377
411
  const isOneDimensional = autoXAxis !== autoYAxis;
378
412
  const oneDimX = autoXAxis && !autoYAxis;
379
413
  const oneDimY = autoYAxis && !autoXAxis;
414
+
415
+ const autoMargins = {
416
+ left: hasProjection ? 0 : Math.max(maxMarginLeft + 1, 1),
417
+ right: hasProjection ? 0 : oneDimY ? 0 : Math.max(maxMarginRight + 1, 4),
418
+ top: hasProjection ? 0 : oneDimX ? 0 : Math.max(5, maxMarginTop),
419
+ bottom: hasProjection ? 0 : Math.max(5, maxMarginBottom)
420
+ };
421
+
380
422
  return {
381
423
  title: '',
382
424
  subtitle: '',
383
425
  caption: '',
384
426
  height: 'auto',
385
427
  // maxWidth: oneDimY ? `${60 * e}px` : undefined,
386
- marginLeft: hasProjection
387
- ? 0
388
- : margins != null
389
- ? margins
390
- : Math.max(maxMarginLeft + 1, 1),
391
- marginRight: hasProjection
392
- ? 0
393
- : margins != null
394
- ? margins
395
- : oneDimY
396
- ? 0
397
- : Math.max(maxMarginRight + 1, 4),
398
- marginTop: hasProjection
399
- ? 0
400
- : margins != null
401
- ? margins
402
- : oneDimX
403
- ? 0
404
- : Math.max(5, maxMarginTop),
405
- marginBottom: hasProjection
406
- ? 0
407
- : margins != null
408
- ? margins
409
- : Math.max(5, maxMarginBottom),
428
+ marginLeft: maybeMargin(margin, 'left', DEFAULTS.margin, autoMargins),
429
+ marginRight: maybeMargin(margin, 'right', DEFAULTS.margin, autoMargins),
430
+ marginTop: maybeMargin(margin, 'top', DEFAULTS.margin, autoMargins),
431
+ marginBottom: maybeMargin(margin, 'bottom', DEFAULTS.margin, autoMargins),
410
432
  inset: isOneDimensional ? 10 : DEFAULTS.inset,
411
433
  grid: (DEFAULTS.gridX?.implicit ?? false) && (DEFAULTS.gridY?.implicit ?? false),
412
434
  axes: (DEFAULTS.axisX?.implicit ?? false) && (DEFAULTS.axisY?.implicit ?? false),
@@ -6,7 +6,7 @@ type SchemeGetter = (n: number) => readonly string[];
6
6
  export declare function isOrdinalScheme(scheme: ColorScheme): boolean;
7
7
  export declare function ordinalScheme(scheme: string): SchemeGetter | undefined;
8
8
  export declare function ordinalRange(scheme: string, length: number): readonly string[] | undefined;
9
- export declare function maybeBooleanRange(domain: boolean[], scheme?: string): unknown[] | undefined;
9
+ export declare function maybeBooleanRange(domain: boolean[], scheme?: string): any[] | undefined;
10
10
  export declare function isQuantitativeScheme(scheme: string): boolean;
11
11
  export declare function quantitativeScheme(scheme: string): typeof interpolateBrBG | undefined;
12
12
  export declare function isDivergingScheme(scheme: string): boolean;
@@ -3,8 +3,8 @@ import type { Snippet } from 'svelte';
3
3
  /**
4
4
  * Returns first argument that is not null or undefined
5
5
  */
6
- export declare function coalesce(...args: (RawValue | undefined | null)[]): RawValue | null;
7
- export declare function testFilter<T>(datum: T, options: Channels<T>): true | T | null;
6
+ export declare function coalesce(...args: (RawValue | undefined | null)[]): any;
7
+ export declare function testFilter<T>(datum: T, options: Channels<T>): any;
8
8
  export declare function randomId(): string;
9
9
  export declare function isSnippet(value: unknown): value is Snippet;
10
10
  export declare function isValid(value: RawValue | undefined): value is number | Date | string;
@@ -15,7 +15,7 @@ export declare function createScale<T extends ScaleOptions>(name: ScaleName, sca
15
15
  autoTitle?: undefined;
16
16
  } | {
17
17
  type: ScaleType;
18
- domain: RawValue[] | [undefined, undefined];
18
+ domain: any;
19
19
  range: any;
20
20
  fn: any;
21
21
  skip: Map<ScaledChannelName, Set<symbol>>;
@@ -28,7 +28,7 @@ export declare function createScale<T extends ScaleOptions>(name: ScaleName, sca
28
28
  * Infer a scale type based on the scale name, the data values mapped to it and
29
29
  * the mark types that are bound to the scale
30
30
  */
31
- export declare function inferScaleType(name: ScaleName, dataValues: RawValue[], markTypes: Set<MarkType>): ScaleType;
31
+ export declare function inferScaleType(name: ScaleName, dataValues: RawValue[], markTypes: Set<MarkType>, scaleOptions?: Partial<ScaleOptions>): ScaleType;
32
32
  /**
33
33
  * Mark channels can explicitly or implicitly be exempt from being
34
34
  * mapped to a scale, so everywhere where values are being mapped to
@@ -1,5 +1,5 @@
1
1
  import { extent, ascending } from 'd3-array';
2
- import { isColorOrNull, isDateOrNull, isNumberOrNull, isNumberOrNullOrNaN, isStringOrNull } from './typeChecks.js';
2
+ import { isColorOrNull, isDate, isDateOrNull, isNumberOrNull, isNumberOrNullOrNaN, isStringOrNull } from './typeChecks.js';
3
3
  import { CHANNEL_SCALE, VALID_SCALE_TYPES } from '../constants.js';
4
4
  import { isSymbolOrNull } from './typeChecks.js';
5
5
  import { resolveProp, toChannelOption } from './resolve.js';
@@ -146,7 +146,7 @@ export function createScale(name, scaleOptions, marks, plotOptions, plotWidth, p
146
146
  // construct domain from data values
147
147
  const valueArr = [...dataValues.values(), ...(scaleOptions.domain || [])].filter((d) => d != null);
148
148
  const type = scaleOptions.type === 'auto'
149
- ? inferScaleType(name, valueArr, markTypes)
149
+ ? inferScaleType(name, valueArr, markTypes, scaleOptions)
150
150
  : scaleOptions.type;
151
151
  if (VALID_SCALE_TYPES[name] && !VALID_SCALE_TYPES[name].has(type)) {
152
152
  throw new Error(`Invalid scale type ${type} for scale
@@ -217,11 +217,15 @@ function domainFromInterval(domain, interval, name) {
217
217
  const out = interval_.range(lo, interval_.offset(hi));
218
218
  return name === 'y' ? out.toReversed() : out;
219
219
  }
220
+ const markTypesWithBandDefault = {
221
+ x: new Set(['barY', 'cell', 'tickY']),
222
+ y: new Set(['barX', 'cell', 'tickX'])
223
+ };
220
224
  /**
221
225
  * Infer a scale type based on the scale name, the data values mapped to it and
222
226
  * the mark types that are bound to the scale
223
227
  */
224
- export function inferScaleType(name, dataValues, markTypes) {
228
+ export function inferScaleType(name, dataValues, markTypes, scaleOptions = {}) {
225
229
  if (name === 'color') {
226
230
  if (!dataValues.length)
227
231
  return 'ordinal';
@@ -235,15 +239,22 @@ export function inferScaleType(name, dataValues, markTypes) {
235
239
  }
236
240
  if (name === 'symbol')
237
241
  return 'ordinal';
238
- // for positional scales, try to pick a scale that's required by the mark types
239
242
  if (name === 'x' || name === 'y') {
240
- if (name === 'y' &&
241
- (markTypes.has('barX') || markTypes.has('tickX') || markTypes.has('cell')))
242
- return 'band';
243
- if (name === 'x' &&
244
- (markTypes.has('barY') || markTypes.has('tickY') || markTypes.has('cell')))
245
- return 'band';
243
+ // if for a positional scale we may infer the scale type from the scale options
244
+ if (scaleOptions.nice || scaleOptions.zero)
245
+ return 'linear';
246
+ if (scaleOptions.domain && scaleOptions.domain.length === 2) {
247
+ if (scaleOptions.domain.every(Number.isFinite))
248
+ return 'linear';
249
+ if (scaleOptions.domain.every(isDate))
250
+ return 'time';
251
+ }
246
252
  }
253
+ // for positional scales, try to pick a scale that's required by the mark types
254
+ if (name === 'y' && Array.from(markTypes).some((d) => markTypesWithBandDefault.y.has(d)))
255
+ return 'band';
256
+ if (name === 'x' && Array.from(markTypes).some((d) => markTypesWithBandDefault.x.has(d)))
257
+ return 'band';
247
258
  if (!dataValues.length)
248
259
  return 'linear';
249
260
  if (dataValues.length === 1)
@@ -1,10 +1,10 @@
1
1
  import type { RawValue } from '../types/index.js';
2
- export declare function isBooleanOrNull(v: RawValue): v is boolean;
2
+ export declare function isBooleanOrNull(v: RawValue): boolean;
3
3
  export declare function isDate(v: RawValue): v is Date;
4
- export declare function isDateOrNull(v: RawValue | null | undefined): v is Date | null | undefined;
4
+ export declare function isDateOrNull(v: RawValue | null | undefined): boolean;
5
5
  export declare function isNumberOrNull(v: RawValue | null | undefined): boolean;
6
6
  export declare function isNumberOrNullOrNaN(v: RawValue | null | undefined): boolean;
7
- export declare function isStringOrNull(v: RawValue | null | undefined): v is string | null | undefined;
7
+ export declare function isStringOrNull(v: RawValue | null | undefined): boolean;
8
8
  export declare function isSymbolOrNull(v: RawValue | null | undefined): boolean;
9
- export declare function isColorOrNull(v: RawValue | null | undefined): boolean;
9
+ export declare function isColorOrNull(v: RawValue | null | undefined): any;
10
10
  export declare function isOpacityOrNull(v: RawValue): boolean;
@@ -1,3 +1,4 @@
1
+ import { renameChannels } from '../transforms/rename.js';
1
2
  import type { ChannelAccessor, DataRow } from '../types/index.js';
2
3
  declare class __sveltets_Render<Datum extends DataRow> {
3
4
  props(): Omit<Partial<{
@@ -72,7 +73,7 @@ declare class __sveltets_Render<Datum extends DataRow> {
72
73
  sort?: import("../types/index.js").ConstantAccessor<import("../types/data").RawValue> | {
73
74
  channel: "stroke" | "fill";
74
75
  };
75
- stack?: Partial<import("../transforms/stack.js").StackOptions>;
76
+ stack?: Partial<renameChannels>;
76
77
  canvas?: boolean;
77
78
  }, "y1" | "y2"> & {
78
79
  x?: ChannelAccessor<Datum>;
@@ -1,3 +1,4 @@
1
+ import { renameChannels } from '../transforms/rename.js';
1
2
  import type { ChannelAccessor, DataRow } from '../types/index.js';
2
3
  declare class __sveltets_Render<Datum extends DataRow> {
3
4
  props(): Omit<Partial<{
@@ -72,7 +73,7 @@ declare class __sveltets_Render<Datum extends DataRow> {
72
73
  sort?: import("../types/index.js").ConstantAccessor<import("../types/data").RawValue> | {
73
74
  channel: "stroke" | "fill";
74
75
  };
75
- stack?: Partial<import("../transforms/stack.js").StackOptions>;
76
+ stack?: Partial<renameChannels>;
76
77
  canvas?: boolean;
77
78
  }, "x1" | "x2"> & {
78
79
  x?: ChannelAccessor<Datum>;
@@ -61,7 +61,7 @@ declare class __sveltets_Render<Datum extends RawValue> {
61
61
  class?: string;
62
62
  style?: string;
63
63
  cursor: ConstantAccessor<CSS.Property.Cursor, Datum>;
64
- }>, "fillOpacity" | "href" | "target" | "paintOrder" | "title"> & {
64
+ }>, "fillOpacity" | "href" | "target" | "title" | "paintOrder"> & {
65
65
  data?: Datum[] | undefined;
66
66
  automatic?: boolean;
67
67
  title?: string | false | null;
@@ -61,7 +61,7 @@ declare class __sveltets_Render<Datum extends RawValue> {
61
61
  class?: string;
62
62
  style?: string;
63
63
  cursor: ConstantAccessor<CSS.Property.Cursor, Datum>;
64
- }>, "fillOpacity" | "href" | "target" | "paintOrder" | "title"> & {
64
+ }>, "fillOpacity" | "href" | "target" | "title" | "paintOrder"> & {
65
65
  data?: Datum[] | undefined;
66
66
  automatic?: boolean;
67
67
  title?: string | false | null;
@@ -14,7 +14,7 @@ declare class __sveltets_Render<Datum extends DataRow> {
14
14
  sort: {
15
15
  channel: string;
16
16
  order?: "ascending" | "descending";
17
- } | ((a: import("../types/index.js").RawValue, b: import("../types/index.js").RawValue) => number) | import("../types/index.js").ConstantAccessor<import("../types/index.js").RawValue, Datum>;
17
+ } | ((a: import("../types/data").RawValue, b: import("../types/data").RawValue) => number) | import("../types/index.js").ConstantAccessor<import("../types/data").RawValue, Datum>;
18
18
  stroke: ChannelAccessor<Datum>;
19
19
  strokeWidth: import("../types/index.js").ConstantAccessor<number, Datum>;
20
20
  strokeOpacity: import("../types/index.js").ConstantAccessor<number, Datum>;
@@ -1,78 +1,6 @@
1
- import type { ChannelAccessor, DataRecord } from '../types/index.js';
1
+ import type { DataRecord } from '../types/index.js';
2
2
  declare class __sveltets_Render<Datum extends DataRecord> {
3
- props(): Partial<{
4
- filter?: import("../types/index.js").ConstantAccessor<boolean, Datum>;
5
- facet?: "auto" | "include" | "exclude";
6
- fx: ChannelAccessor<Datum>;
7
- fy: ChannelAccessor<Datum>;
8
- dx: import("../types/index.js").ConstantAccessor<number, Datum>;
9
- dy: import("../types/index.js").ConstantAccessor<number, Datum>;
10
- fill: ChannelAccessor<Datum>;
11
- fillOpacity: import("../types/index.js").ConstantAccessor<number, Datum>;
12
- sort: {
13
- channel: string;
14
- order?: "ascending" | "descending";
15
- } | ((a: import("../types/index.js").RawValue, b: import("../types/index.js").RawValue) => number) | import("../types/index.js").ConstantAccessor<import("../types/index.js").RawValue, Datum>;
16
- stroke: ChannelAccessor<Datum>;
17
- strokeWidth: import("../types/index.js").ConstantAccessor<number, Datum>;
18
- strokeOpacity: import("../types/index.js").ConstantAccessor<number, Datum>;
19
- strokeLinejoin: import("../types/index.js").ConstantAccessor<import("csstype").Property.StrokeLinejoin, Datum>;
20
- strokeLinecap: import("../types/index.js").ConstantAccessor<import("csstype").Property.StrokeLinecap, Datum>;
21
- strokeMiterlimit: import("../types/index.js").ConstantAccessor<number, Datum>;
22
- opacity: ChannelAccessor<Datum>;
23
- strokeDasharray: import("../types/index.js").ConstantAccessor<string, Datum>;
24
- strokeDashoffset: import("../types/index.js").ConstantAccessor<number, Datum>;
25
- mixBlendMode: import("../types/index.js").ConstantAccessor<import("csstype").Property.MixBlendMode, Datum>;
26
- clipPath: string;
27
- imageFilter: import("../types/index.js").ConstantAccessor<string, Datum>;
28
- shapeRendering: import("../types/index.js").ConstantAccessor<import("csstype").Property.ShapeRendering, Datum>;
29
- paintOrder: import("../types/index.js").ConstantAccessor<string, Datum>;
30
- onclick?: import("svelte/elements").MouseEventHandler<SVGPathElement>;
31
- ondblclick?: import("svelte/elements").MouseEventHandler<SVGPathElement>;
32
- onmouseup?: import("svelte/elements").MouseEventHandler<SVGPathElement>;
33
- onmousedown?: import("svelte/elements").MouseEventHandler<SVGPathElement>;
34
- onmouseenter?: import("svelte/elements").MouseEventHandler<SVGPathElement>;
35
- onmousemove?: import("svelte/elements").MouseEventHandler<SVGPathElement>;
36
- onmouseleave?: import("svelte/elements").MouseEventHandler<SVGPathElement>;
37
- onmouseout?: import("svelte/elements").MouseEventHandler<SVGPathElement>;
38
- onmouseover?: import("svelte/elements").MouseEventHandler<SVGPathElement>;
39
- onpointercancel?: import("svelte/elements").MouseEventHandler<SVGPathElement>;
40
- onpointerdown?: import("svelte/elements").MouseEventHandler<SVGPathElement>;
41
- onpointerup?: import("svelte/elements").MouseEventHandler<SVGPathElement>;
42
- onpointerenter?: import("svelte/elements").MouseEventHandler<SVGPathElement>;
43
- onpointerleave?: import("svelte/elements").MouseEventHandler<SVGPathElement>;
44
- onpointermove?: import("svelte/elements").MouseEventHandler<SVGPathElement>;
45
- onpointerover?: import("svelte/elements").MouseEventHandler<SVGPathElement>;
46
- onpointerout?: import("svelte/elements").MouseEventHandler<SVGPathElement>;
47
- ondrag?: import("svelte/elements").MouseEventHandler<SVGPathElement>;
48
- ondrop?: import("svelte/elements").MouseEventHandler<SVGPathElement>;
49
- ondragstart?: import("svelte/elements").MouseEventHandler<SVGPathElement>;
50
- ondragenter?: import("svelte/elements").MouseEventHandler<SVGPathElement>;
51
- ondragleave?: import("svelte/elements").MouseEventHandler<SVGPathElement>;
52
- ondragover?: import("svelte/elements").MouseEventHandler<SVGPathElement>;
53
- ondragend?: import("svelte/elements").MouseEventHandler<SVGPathElement>;
54
- ontouchstart?: import("svelte/elements").MouseEventHandler<SVGPathElement>;
55
- ontouchmove?: import("svelte/elements").MouseEventHandler<SVGPathElement>;
56
- ontouchend?: import("svelte/elements").MouseEventHandler<SVGPathElement>;
57
- ontouchcancel?: import("svelte/elements").MouseEventHandler<SVGPathElement>;
58
- oncontextmenu?: import("svelte/elements").MouseEventHandler<SVGPathElement>;
59
- onwheel?: import("svelte/elements").MouseEventHandler<SVGPathElement>;
60
- class?: string;
61
- style?: string;
62
- cursor: import("../types/index.js").ConstantAccessor<import("csstype").Property.Cursor, Datum>;
63
- }> & {
64
- data: Datum[];
65
- x?: ChannelAccessor<Datum>;
66
- y?: ChannelAccessor<Datum>;
67
- /**
68
- * the window size (the window transform's k option), an integer; defaults to 20
69
- */
70
- n?: number;
71
- /**
72
- * the band radius, a number representing a multiple of standard deviations; defaults to 2
73
- */
74
- k?: number;
75
- };
3
+ props(): any;
76
4
  events(): {};
77
5
  slots(): {};
78
6
  bindings(): "";
@@ -1,78 +1,6 @@
1
- import type { ChannelAccessor, DataRecord } from '../types/index.js';
1
+ import type { DataRecord } from '../types/index.js';
2
2
  declare class __sveltets_Render<Datum extends DataRecord> {
3
- props(): Partial<{
4
- filter?: import("../types/index.js").ConstantAccessor<boolean, Datum>;
5
- facet?: "auto" | "include" | "exclude";
6
- fx: ChannelAccessor<Datum>;
7
- fy: ChannelAccessor<Datum>;
8
- dx: import("../types/index.js").ConstantAccessor<number, Datum>;
9
- dy: import("../types/index.js").ConstantAccessor<number, Datum>;
10
- fill: ChannelAccessor<Datum>;
11
- fillOpacity: import("../types/index.js").ConstantAccessor<number, Datum>;
12
- sort: {
13
- channel: string;
14
- order?: "ascending" | "descending";
15
- } | ((a: import("../types/index.js").RawValue, b: import("../types/index.js").RawValue) => number) | import("../types/index.js").ConstantAccessor<import("../types/index.js").RawValue, Datum>;
16
- stroke: ChannelAccessor<Datum>;
17
- strokeWidth: import("../types/index.js").ConstantAccessor<number, Datum>;
18
- strokeOpacity: import("../types/index.js").ConstantAccessor<number, Datum>;
19
- strokeLinejoin: import("../types/index.js").ConstantAccessor<import("csstype").Property.StrokeLinejoin, Datum>;
20
- strokeLinecap: import("../types/index.js").ConstantAccessor<import("csstype").Property.StrokeLinecap, Datum>;
21
- strokeMiterlimit: import("../types/index.js").ConstantAccessor<number, Datum>;
22
- opacity: ChannelAccessor<Datum>;
23
- strokeDasharray: import("../types/index.js").ConstantAccessor<string, Datum>;
24
- strokeDashoffset: import("../types/index.js").ConstantAccessor<number, Datum>;
25
- mixBlendMode: import("../types/index.js").ConstantAccessor<import("csstype").Property.MixBlendMode, Datum>;
26
- clipPath: string;
27
- imageFilter: import("../types/index.js").ConstantAccessor<string, Datum>;
28
- shapeRendering: import("../types/index.js").ConstantAccessor<import("csstype").Property.ShapeRendering, Datum>;
29
- paintOrder: import("../types/index.js").ConstantAccessor<string, Datum>;
30
- onclick?: import("svelte/elements").MouseEventHandler<SVGPathElement>;
31
- ondblclick?: import("svelte/elements").MouseEventHandler<SVGPathElement>;
32
- onmouseup?: import("svelte/elements").MouseEventHandler<SVGPathElement>;
33
- onmousedown?: import("svelte/elements").MouseEventHandler<SVGPathElement>;
34
- onmouseenter?: import("svelte/elements").MouseEventHandler<SVGPathElement>;
35
- onmousemove?: import("svelte/elements").MouseEventHandler<SVGPathElement>;
36
- onmouseleave?: import("svelte/elements").MouseEventHandler<SVGPathElement>;
37
- onmouseout?: import("svelte/elements").MouseEventHandler<SVGPathElement>;
38
- onmouseover?: import("svelte/elements").MouseEventHandler<SVGPathElement>;
39
- onpointercancel?: import("svelte/elements").MouseEventHandler<SVGPathElement>;
40
- onpointerdown?: import("svelte/elements").MouseEventHandler<SVGPathElement>;
41
- onpointerup?: import("svelte/elements").MouseEventHandler<SVGPathElement>;
42
- onpointerenter?: import("svelte/elements").MouseEventHandler<SVGPathElement>;
43
- onpointerleave?: import("svelte/elements").MouseEventHandler<SVGPathElement>;
44
- onpointermove?: import("svelte/elements").MouseEventHandler<SVGPathElement>;
45
- onpointerover?: import("svelte/elements").MouseEventHandler<SVGPathElement>;
46
- onpointerout?: import("svelte/elements").MouseEventHandler<SVGPathElement>;
47
- ondrag?: import("svelte/elements").MouseEventHandler<SVGPathElement>;
48
- ondrop?: import("svelte/elements").MouseEventHandler<SVGPathElement>;
49
- ondragstart?: import("svelte/elements").MouseEventHandler<SVGPathElement>;
50
- ondragenter?: import("svelte/elements").MouseEventHandler<SVGPathElement>;
51
- ondragleave?: import("svelte/elements").MouseEventHandler<SVGPathElement>;
52
- ondragover?: import("svelte/elements").MouseEventHandler<SVGPathElement>;
53
- ondragend?: import("svelte/elements").MouseEventHandler<SVGPathElement>;
54
- ontouchstart?: import("svelte/elements").MouseEventHandler<SVGPathElement>;
55
- ontouchmove?: import("svelte/elements").MouseEventHandler<SVGPathElement>;
56
- ontouchend?: import("svelte/elements").MouseEventHandler<SVGPathElement>;
57
- ontouchcancel?: import("svelte/elements").MouseEventHandler<SVGPathElement>;
58
- oncontextmenu?: import("svelte/elements").MouseEventHandler<SVGPathElement>;
59
- onwheel?: import("svelte/elements").MouseEventHandler<SVGPathElement>;
60
- class?: string;
61
- style?: string;
62
- cursor: import("../types/index.js").ConstantAccessor<import("csstype").Property.Cursor, Datum>;
63
- }> & {
64
- data: Datum[];
65
- x?: ChannelAccessor<Datum>;
66
- y?: ChannelAccessor<Datum>;
67
- /**
68
- * the window size (the window transform's k option), an integer; defaults to 20
69
- */
70
- n?: number;
71
- /**
72
- * the band radius, a number representing a multiple of standard deviations; defaults to 2
73
- */
74
- k?: number;
75
- };
3
+ props(): any;
76
4
  events(): {};
77
5
  slots(): {};
78
6
  bindings(): "";
@@ -88,7 +88,7 @@
88
88
  ).slice(1)}
89
89
  <Plot
90
90
  maxWidth="240px"
91
- margins={1}
91
+ margin={1}
92
92
  marginLeft={1}
93
93
  marginRight={1}
94
94
  marginTop={6}
@@ -121,7 +121,7 @@
121
121
 
122
122
  <Plot
123
123
  maxWidth="240px"
124
- margins={1}
124
+ margin={1}
125
125
  marginLeft={10}
126
126
  marginRight={10}
127
127
  marginTop={6}
@@ -1,85 +1,6 @@
1
- import type { DataRecord, ChannelAccessor, ScaledDataRecord, UsedScales } from '../types/index.js';
2
- import type { Snippet } from 'svelte';
1
+ import type { DataRecord } from '../types/index.js';
3
2
  declare class __sveltets_Render<Datum extends DataRecord> {
4
- props(): Partial<{
5
- filter?: import("../types/index.js").ConstantAccessor<boolean, Datum>;
6
- facet?: "auto" | "include" | "exclude";
7
- fx: ChannelAccessor<Datum>;
8
- fy: ChannelAccessor<Datum>;
9
- dx: import("../types/index.js").ConstantAccessor<number, Datum>;
10
- dy: import("../types/index.js").ConstantAccessor<number, Datum>;
11
- fill: ChannelAccessor<Datum>;
12
- fillOpacity: import("../types/index.js").ConstantAccessor<number, Datum>;
13
- sort: {
14
- channel: string;
15
- order?: "ascending" | "descending";
16
- } | ((a: import("../types/index.js").RawValue, b: import("../types/index.js").RawValue) => number) | import("../types/index.js").ConstantAccessor<import("../types/index.js").RawValue, Datum>;
17
- stroke: ChannelAccessor<Datum>;
18
- strokeWidth: import("../types/index.js").ConstantAccessor<number, Datum>;
19
- strokeOpacity: import("../types/index.js").ConstantAccessor<number, Datum>;
20
- strokeLinejoin: import("../types/index.js").ConstantAccessor<import("csstype").Property.StrokeLinejoin, Datum>;
21
- strokeLinecap: import("../types/index.js").ConstantAccessor<import("csstype").Property.StrokeLinecap, Datum>;
22
- strokeMiterlimit: import("../types/index.js").ConstantAccessor<number, Datum>;
23
- opacity: ChannelAccessor<Datum>;
24
- strokeDasharray: import("../types/index.js").ConstantAccessor<string, Datum>;
25
- strokeDashoffset: import("../types/index.js").ConstantAccessor<number, Datum>;
26
- mixBlendMode: import("../types/index.js").ConstantAccessor<import("csstype").Property.MixBlendMode, Datum>;
27
- clipPath: string;
28
- imageFilter: import("../types/index.js").ConstantAccessor<string, Datum>;
29
- shapeRendering: import("../types/index.js").ConstantAccessor<import("csstype").Property.ShapeRendering, Datum>;
30
- paintOrder: import("../types/index.js").ConstantAccessor<string, Datum>;
31
- onclick?: import("svelte/elements").MouseEventHandler<SVGPathElement>;
32
- ondblclick?: import("svelte/elements").MouseEventHandler<SVGPathElement>;
33
- onmouseup?: import("svelte/elements").MouseEventHandler<SVGPathElement>;
34
- onmousedown?: import("svelte/elements").MouseEventHandler<SVGPathElement>;
35
- onmouseenter?: import("svelte/elements").MouseEventHandler<SVGPathElement>;
36
- onmousemove?: import("svelte/elements").MouseEventHandler<SVGPathElement>;
37
- onmouseleave?: import("svelte/elements").MouseEventHandler<SVGPathElement>;
38
- onmouseout?: import("svelte/elements").MouseEventHandler<SVGPathElement>;
39
- onmouseover?: import("svelte/elements").MouseEventHandler<SVGPathElement>;
40
- onpointercancel?: import("svelte/elements").MouseEventHandler<SVGPathElement>;
41
- onpointerdown?: import("svelte/elements").MouseEventHandler<SVGPathElement>;
42
- onpointerup?: import("svelte/elements").MouseEventHandler<SVGPathElement>;
43
- onpointerenter?: import("svelte/elements").MouseEventHandler<SVGPathElement>;
44
- onpointerleave?: import("svelte/elements").MouseEventHandler<SVGPathElement>;
45
- onpointermove?: import("svelte/elements").MouseEventHandler<SVGPathElement>;
46
- onpointerover?: import("svelte/elements").MouseEventHandler<SVGPathElement>;
47
- onpointerout?: import("svelte/elements").MouseEventHandler<SVGPathElement>;
48
- ondrag?: import("svelte/elements").MouseEventHandler<SVGPathElement>;
49
- ondrop?: import("svelte/elements").MouseEventHandler<SVGPathElement>;
50
- ondragstart?: import("svelte/elements").MouseEventHandler<SVGPathElement>;
51
- ondragenter?: import("svelte/elements").MouseEventHandler<SVGPathElement>;
52
- ondragleave?: import("svelte/elements").MouseEventHandler<SVGPathElement>;
53
- ondragover?: import("svelte/elements").MouseEventHandler<SVGPathElement>;
54
- ondragend?: import("svelte/elements").MouseEventHandler<SVGPathElement>;
55
- ontouchstart?: import("svelte/elements").MouseEventHandler<SVGPathElement>;
56
- ontouchmove?: import("svelte/elements").MouseEventHandler<SVGPathElement>;
57
- ontouchend?: import("svelte/elements").MouseEventHandler<SVGPathElement>;
58
- ontouchcancel?: import("svelte/elements").MouseEventHandler<SVGPathElement>;
59
- oncontextmenu?: import("svelte/elements").MouseEventHandler<SVGPathElement>;
60
- onwheel?: import("svelte/elements").MouseEventHandler<SVGPathElement>;
61
- class?: string;
62
- style?: string;
63
- cursor: import("../types/index.js").ConstantAccessor<import("csstype").Property.Cursor, Datum>;
64
- }> & {
65
- data?: Datum[] | undefined;
66
- x?: ChannelAccessor<Datum>;
67
- x1?: ChannelAccessor<Datum>;
68
- x2?: ChannelAccessor<Datum>;
69
- y?: ChannelAccessor<Datum>;
70
- y1?: ChannelAccessor<Datum>;
71
- y2?: ChannelAccessor<Datum>;
72
- r?: ChannelAccessor<Datum>;
73
- mark?: Snippet<[{
74
- record: ScaledDataRecord<Datum>;
75
- index: number;
76
- usedScales: UsedScales;
77
- }]> | undefined;
78
- marks?: Snippet<[{
79
- records: ScaledDataRecord<Datum>[];
80
- usedScales: UsedScales;
81
- }]> | undefined;
82
- };
3
+ props(): any;
83
4
  events(): {};
84
5
  slots(): {};
85
6
  bindings(): "";