svelteplot 0.4.5-pr-209.2 → 0.4.5-pr-208.3

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 (68) hide show
  1. package/dist/Mark.svelte +87 -73
  2. package/dist/Mark.svelte.d.ts +37 -34
  3. package/dist/helpers/scales.d.ts +1 -1
  4. package/dist/helpers/scales.js +21 -10
  5. package/dist/marks/Area.svelte.d.ts +37 -34
  6. package/dist/marks/AreaX.svelte.d.ts +36 -34
  7. package/dist/marks/AreaY.svelte.d.ts +36 -34
  8. package/dist/marks/Arrow.svelte.d.ts +37 -34
  9. package/dist/marks/AxisX.svelte.d.ts +37 -34
  10. package/dist/marks/AxisY.svelte.d.ts +37 -34
  11. package/dist/marks/BarX.svelte.d.ts +37 -34
  12. package/dist/marks/BarY.svelte.d.ts +37 -34
  13. package/dist/marks/Cell.svelte.d.ts +37 -34
  14. package/dist/marks/Dot.svelte +1 -1
  15. package/dist/marks/Dot.svelte.d.ts +37 -34
  16. package/dist/marks/DotX.svelte.d.ts +37 -34
  17. package/dist/marks/DotY.svelte.d.ts +37 -34
  18. package/dist/marks/Geo.svelte.d.ts +37 -34
  19. package/dist/marks/GridX.svelte.d.ts +37 -34
  20. package/dist/marks/GridY.svelte.d.ts +37 -34
  21. package/dist/marks/Line.svelte.d.ts +37 -34
  22. package/dist/marks/LineX.svelte.d.ts +36 -34
  23. package/dist/marks/LineY.svelte.d.ts +36 -34
  24. package/dist/marks/Link.svelte.d.ts +37 -34
  25. package/dist/marks/Rect.svelte.d.ts +37 -34
  26. package/dist/marks/RuleX.svelte.d.ts +37 -34
  27. package/dist/marks/RuleY.svelte.d.ts +37 -34
  28. package/dist/marks/Spike.svelte.d.ts +36 -34
  29. package/dist/marks/Text.svelte.d.ts +37 -34
  30. package/dist/marks/TickX.svelte.d.ts +37 -34
  31. package/dist/marks/TickY.svelte.d.ts +37 -34
  32. package/dist/marks/Vector.svelte.d.ts +37 -34
  33. package/dist/marks/helpers/Regression.svelte +1 -1
  34. package/dist/regression/exponential.d.ts +17 -0
  35. package/dist/regression/exponential.js +56 -0
  36. package/dist/regression/index.d.ts +10 -0
  37. package/dist/regression/index.js +10 -0
  38. package/dist/regression/linear.d.ts +17 -0
  39. package/dist/regression/linear.js +59 -0
  40. package/dist/regression/loess.d.ts +14 -0
  41. package/dist/regression/loess.js +122 -0
  42. package/dist/regression/logarithmic.d.ts +20 -0
  43. package/dist/regression/logarithmic.js +60 -0
  44. package/dist/regression/polynomial.d.ts +21 -0
  45. package/dist/regression/polynomial.js +160 -0
  46. package/dist/regression/power.d.ts +18 -0
  47. package/dist/regression/power.js +56 -0
  48. package/dist/regression/quadratic.d.ts +19 -0
  49. package/dist/regression/quadratic.js +70 -0
  50. package/dist/regression/types.d.ts +4 -0
  51. package/dist/regression/types.js +1 -0
  52. package/dist/regression/utils/determination.d.ts +6 -0
  53. package/dist/regression/utils/determination.js +16 -0
  54. package/dist/regression/utils/geometry.d.ts +9 -0
  55. package/dist/regression/utils/geometry.js +12 -0
  56. package/dist/regression/utils/interpose.d.ts +6 -0
  57. package/dist/regression/utils/interpose.js +37 -0
  58. package/dist/regression/utils/median.d.ts +4 -0
  59. package/dist/regression/utils/median.js +8 -0
  60. package/dist/regression/utils/ols.d.ts +6 -0
  61. package/dist/regression/utils/ols.js +9 -0
  62. package/dist/regression/utils/points.d.ts +11 -0
  63. package/dist/regression/utils/points.js +45 -0
  64. package/dist/transforms/dodge.d.ts +17 -0
  65. package/dist/transforms/dodge.js +128 -0
  66. package/dist/types/mark.d.ts +37 -34
  67. package/dist/types/scale.d.ts +6 -0
  68. package/package.json +3 -2
package/dist/Mark.svelte CHANGED
@@ -41,6 +41,7 @@
41
41
  import { testFilter, isValid } from './helpers/index.js';
42
42
  import { resolveChannel, resolveProp } from './helpers/resolve.js';
43
43
  import { RENAME } from './transforms/rename.js';
44
+ import { dodgeX, dodgeY } from './transforms/dodge.js';
44
45
 
45
46
  let {
46
47
  data = [],
@@ -207,85 +208,98 @@
207
208
  * elements to the scales
208
209
  */
209
210
  const scaledData = $derived(
210
- resolvedData.flatMap((row) => {
211
- const out: ScaledDataRecord<Datum> = {
212
- datum: row.datum,
213
- index: row[INDEX],
214
- valid: true
215
- };
216
- // compute dx/dy
217
- out.dx = Number(resolveProp<number>(options.dx, out.datum, 0));
218
- out.dy = Number(resolveProp<number>(options.dy, out.datum, 0));
219
-
220
- // special handling if there's a projection, e.g. a line mark
221
- if (plot.scales.projection && mark.type !== 'geo') {
222
- for (const suffix of ['', '1', '2']) {
223
- if (
224
- options?.[`x${suffix}`] !== undefined &&
225
- options?.[`y${suffix}`] !== undefined
226
- ) {
227
- // we have two-dimensional accessors
228
- // for the x and y channels
229
- const [x, y] =
230
- mark.type === 'line'
231
- ? [row.x, row.y] // line paths are projected later
232
- : projectXY(
233
- plot.scales,
234
- row.x,
235
- row.y,
236
- usedScales.x,
237
- usedScales.y,
238
- suffix
239
- );
240
-
241
- out[`x${suffix}`] = x;
242
- out[`y${suffix}`] = y;
243
- out.valid =
244
- out.valid &&
245
- isValid(row.x) &&
246
- isValid(row.y) &&
247
- isValid(x) &&
248
- isValid(y);
211
+ dodge(
212
+ resolvedData.flatMap((row) => {
213
+ const out: ScaledDataRecord<Datum> = {
214
+ datum: row.datum,
215
+ index: row[INDEX],
216
+ valid: true
217
+ };
218
+ // compute dx/dy
219
+ out.dx = Number(resolveProp<number>(options.dx, out.datum, 0));
220
+ out.dy = Number(resolveProp<number>(options.dy, out.datum, 0));
221
+
222
+ // special handling if there's a projection, e.g. a line mark
223
+ if (plot.scales.projection && mark.type !== 'geo') {
224
+ for (const suffix of ['', '1', '2']) {
225
+ if (
226
+ options?.[`x${suffix}`] !== undefined &&
227
+ options?.[`y${suffix}`] !== undefined
228
+ ) {
229
+ // we have two-dimensional accessors
230
+ // for the x and y channels
231
+ const [x, y] =
232
+ mark.type === 'line'
233
+ ? [row.x, row.y] // line paths are projected later
234
+ : projectXY(
235
+ plot.scales,
236
+ row.x,
237
+ row.y,
238
+ usedScales.x,
239
+ usedScales.y,
240
+ suffix
241
+ );
242
+
243
+ out[`x${suffix}`] = x;
244
+ out[`y${suffix}`] = y;
245
+ out.valid =
246
+ out.valid &&
247
+ isValid(row.x) &&
248
+ isValid(row.y) &&
249
+ isValid(x) &&
250
+ isValid(y);
251
+ }
249
252
  }
250
253
  }
251
- }
252
254
 
253
- // iterate over all scaled channels
254
- for (const [channel, scale] of Object.entries(CHANNEL_SCALE) as [
255
- ScaledChannelName,
256
- ScaleName
257
- ][]) {
258
- // check if the mark has defined an accessor for this channel
259
- if (options?.[channel] != null && out[channel] === undefined) {
260
- // resolve value
261
- const value = row[channel];
262
- // if this channel was renamed, use the original channel for scaling
263
- const origChannel = options?.[RENAME]?.[channel] || channel;
264
- const scaled = usedScales[channel]
265
- ? scale === 'x'
266
- ? projectX(origChannel as 'x' | 'x1' | 'x2', plot.scales, value)
267
- : scale === 'y'
268
- ? projectY(origChannel as 'y' | 'y1' | 'y2', plot.scales, value)
269
- : scale === 'color' && !isValid(value)
270
- ? plot.options.color.unknown
271
- : plot.scales[scale].fn(value)
272
- : value;
273
-
274
- out.valid = out.valid && (scale === 'color' || isValid(value));
275
-
276
- // apply dx/dy transform
277
- out[channel] =
278
- Number.isFinite(scaled) && (scale === 'x' || scale === 'y')
279
- ? scaled + (scale === 'x' ? out.dx : out.dy)
280
- : scaled;
281
- } else if (defaults[channel]) {
282
- out[channel] = defaults[channel];
255
+ // iterate over all scaled channels
256
+ for (const [channel, scale] of Object.entries(CHANNEL_SCALE) as [
257
+ ScaledChannelName,
258
+ ScaleName
259
+ ][]) {
260
+ // check if the mark has defined an accessor for this channel
261
+ if (options?.[channel] != null && out[channel] === undefined) {
262
+ // resolve value
263
+ const value = row[channel];
264
+ // if this channel was renamed, use the original channel for scaling
265
+ const origChannel = options?.[RENAME]?.[channel] || channel;
266
+ const scaled = usedScales[channel]
267
+ ? scale === 'x'
268
+ ? projectX(origChannel as 'x' | 'x1' | 'x2', plot.scales, value)
269
+ : scale === 'y'
270
+ ? projectY(origChannel as 'y' | 'y1' | 'y2', plot.scales, value)
271
+ : scale === 'color' && !isValid(value)
272
+ ? plot.options.color.unknown
273
+ : plot.scales[scale].fn(value)
274
+ : value;
275
+
276
+ out.valid = out.valid && (scale === 'color' || isValid(value));
277
+
278
+ // apply dx/dy transform
279
+ out[channel] =
280
+ Number.isFinite(scaled) && (scale === 'x' || scale === 'y')
281
+ ? scaled + (scale === 'x' ? out.dx : out.dy)
282
+ : scaled;
283
+ } else if (defaults[channel]) {
284
+ out[channel] = defaults[channel];
285
+ }
283
286
  }
284
- }
285
287
 
286
- return [out];
287
- })
288
+ return [out];
289
+ }),
290
+ options
291
+ )
288
292
  );
293
+
294
+ function dodge<T>(data: ScaledDataRecord<Datum>[], options: BaseMarkProps<T>) {
295
+ if (options.dodgeX) {
296
+ return dodgeX({ data, ...options }, plot);
297
+ }
298
+ if (options.dodgeY) {
299
+ return dodgeY({ data, ...options }, plot);
300
+ }
301
+ return data;
302
+ }
289
303
  </script>
290
304
 
291
305
  {#if errors.length}
@@ -1,14 +1,17 @@
1
1
  import { type Snippet } from 'svelte';
2
+ import { CHANNEL_SCALE } from './constants.js';
2
3
  import type { ScaledChannelName, MarkType, DataRecord, ChannelAccessor, ScaleName, RawValue, ScaledDataRecord, ScaleType } from './types/index.js';
3
4
  import { getUsedScales } from './helpers/scales.js';
4
5
  declare class __sveltets_Render<Datum extends DataRecord> {
5
6
  props(): Partial<Partial<{
6
- filter?: import("./types/index.js").ConstantAccessor<boolean, Datum>;
7
- facet?: "auto" | "include" | "exclude";
7
+ filter: import("./types/index.js").ConstantAccessor<boolean, Datum>;
8
+ facet: "auto" | "include" | "exclude";
8
9
  fx: ChannelAccessor<Datum>;
9
10
  fy: ChannelAccessor<Datum>;
10
11
  dx: import("./types/index.js").ConstantAccessor<number, Datum>;
11
12
  dy: import("./types/index.js").ConstantAccessor<number, Datum>;
13
+ dodgeX: CHANNEL_SCALE;
14
+ dodgeY: CHANNEL_SCALE;
12
15
  fill: ChannelAccessor<Datum>;
13
16
  fillOpacity: import("./types/index.js").ConstantAccessor<number, Datum>;
14
17
  sort: {
@@ -29,38 +32,38 @@ declare class __sveltets_Render<Datum extends DataRecord> {
29
32
  imageFilter: import("./types/index.js").ConstantAccessor<string, Datum>;
30
33
  shapeRendering: import("./types/index.js").ConstantAccessor<import("csstype").Property.ShapeRendering, Datum>;
31
34
  paintOrder: import("./types/index.js").ConstantAccessor<string, Datum>;
32
- onclick?: import("svelte/elements.js").MouseEventHandler<SVGPathElement>;
33
- ondblclick?: import("svelte/elements.js").MouseEventHandler<SVGPathElement>;
34
- onmouseup?: import("svelte/elements.js").MouseEventHandler<SVGPathElement>;
35
- onmousedown?: import("svelte/elements.js").MouseEventHandler<SVGPathElement>;
36
- onmouseenter?: import("svelte/elements.js").MouseEventHandler<SVGPathElement>;
37
- onmousemove?: import("svelte/elements.js").MouseEventHandler<SVGPathElement>;
38
- onmouseleave?: import("svelte/elements.js").MouseEventHandler<SVGPathElement>;
39
- onmouseout?: import("svelte/elements.js").MouseEventHandler<SVGPathElement>;
40
- onmouseover?: import("svelte/elements.js").MouseEventHandler<SVGPathElement>;
41
- onpointercancel?: import("svelte/elements.js").MouseEventHandler<SVGPathElement>;
42
- onpointerdown?: import("svelte/elements.js").MouseEventHandler<SVGPathElement>;
43
- onpointerup?: import("svelte/elements.js").MouseEventHandler<SVGPathElement>;
44
- onpointerenter?: import("svelte/elements.js").MouseEventHandler<SVGPathElement>;
45
- onpointerleave?: import("svelte/elements.js").MouseEventHandler<SVGPathElement>;
46
- onpointermove?: import("svelte/elements.js").MouseEventHandler<SVGPathElement>;
47
- onpointerover?: import("svelte/elements.js").MouseEventHandler<SVGPathElement>;
48
- onpointerout?: import("svelte/elements.js").MouseEventHandler<SVGPathElement>;
49
- ondrag?: import("svelte/elements.js").MouseEventHandler<SVGPathElement>;
50
- ondrop?: import("svelte/elements.js").MouseEventHandler<SVGPathElement>;
51
- ondragstart?: import("svelte/elements.js").MouseEventHandler<SVGPathElement>;
52
- ondragenter?: import("svelte/elements.js").MouseEventHandler<SVGPathElement>;
53
- ondragleave?: import("svelte/elements.js").MouseEventHandler<SVGPathElement>;
54
- ondragover?: import("svelte/elements.js").MouseEventHandler<SVGPathElement>;
55
- ondragend?: import("svelte/elements.js").MouseEventHandler<SVGPathElement>;
56
- ontouchstart?: import("svelte/elements.js").MouseEventHandler<SVGPathElement>;
57
- ontouchmove?: import("svelte/elements.js").MouseEventHandler<SVGPathElement>;
58
- ontouchend?: import("svelte/elements.js").MouseEventHandler<SVGPathElement>;
59
- ontouchcancel?: import("svelte/elements.js").MouseEventHandler<SVGPathElement>;
60
- oncontextmenu?: import("svelte/elements.js").MouseEventHandler<SVGPathElement>;
61
- onwheel?: import("svelte/elements.js").MouseEventHandler<SVGPathElement>;
62
- class?: string;
63
- style?: string;
35
+ onclick: import("svelte/elements.js").MouseEventHandler<SVGPathElement>;
36
+ ondblclick: import("svelte/elements.js").MouseEventHandler<SVGPathElement>;
37
+ onmouseup: import("svelte/elements.js").MouseEventHandler<SVGPathElement>;
38
+ onmousedown: import("svelte/elements.js").MouseEventHandler<SVGPathElement>;
39
+ onmouseenter: import("svelte/elements.js").MouseEventHandler<SVGPathElement>;
40
+ onmousemove: import("svelte/elements.js").MouseEventHandler<SVGPathElement>;
41
+ onmouseleave: import("svelte/elements.js").MouseEventHandler<SVGPathElement>;
42
+ onmouseout: import("svelte/elements.js").MouseEventHandler<SVGPathElement>;
43
+ onmouseover: import("svelte/elements.js").MouseEventHandler<SVGPathElement>;
44
+ onpointercancel: import("svelte/elements.js").MouseEventHandler<SVGPathElement>;
45
+ onpointerdown: import("svelte/elements.js").MouseEventHandler<SVGPathElement>;
46
+ onpointerup: import("svelte/elements.js").MouseEventHandler<SVGPathElement>;
47
+ onpointerenter: import("svelte/elements.js").MouseEventHandler<SVGPathElement>;
48
+ onpointerleave: import("svelte/elements.js").MouseEventHandler<SVGPathElement>;
49
+ onpointermove: import("svelte/elements.js").MouseEventHandler<SVGPathElement>;
50
+ onpointerover: import("svelte/elements.js").MouseEventHandler<SVGPathElement>;
51
+ onpointerout: import("svelte/elements.js").MouseEventHandler<SVGPathElement>;
52
+ ondrag: import("svelte/elements.js").MouseEventHandler<SVGPathElement>;
53
+ ondrop: import("svelte/elements.js").MouseEventHandler<SVGPathElement>;
54
+ ondragstart: import("svelte/elements.js").MouseEventHandler<SVGPathElement>;
55
+ ondragenter: import("svelte/elements.js").MouseEventHandler<SVGPathElement>;
56
+ ondragleave: import("svelte/elements.js").MouseEventHandler<SVGPathElement>;
57
+ ondragover: import("svelte/elements.js").MouseEventHandler<SVGPathElement>;
58
+ ondragend: import("svelte/elements.js").MouseEventHandler<SVGPathElement>;
59
+ ontouchstart: import("svelte/elements.js").MouseEventHandler<SVGPathElement>;
60
+ ontouchmove: import("svelte/elements.js").MouseEventHandler<SVGPathElement>;
61
+ ontouchend: import("svelte/elements.js").MouseEventHandler<SVGPathElement>;
62
+ ontouchcancel: import("svelte/elements.js").MouseEventHandler<SVGPathElement>;
63
+ oncontextmenu: import("svelte/elements.js").MouseEventHandler<SVGPathElement>;
64
+ onwheel: import("svelte/elements.js").MouseEventHandler<SVGPathElement>;
65
+ class: string;
66
+ style: string;
64
67
  cursor: import("./types/index.js").ConstantAccessor<import("csstype").Property.Cursor, Datum>;
65
68
  }>> & {
66
69
  data?: Datum[] | undefined;
@@ -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,14 +1,17 @@
1
1
  import { type CurveFactory } from 'd3-shape';
2
+ import callWithProps from '../helpers/callWithProps.js';
2
3
  import type { CurveName, DataRecord, ConstantAccessor, ChannelAccessor, LinkableMarkProps, RawValue } from '../types/index.js';
3
4
  import type { StackOptions } from '../transforms/stack.js';
4
5
  declare class __sveltets_Render<Datum extends DataRecord> {
5
6
  props(): Partial<{
6
- filter?: ConstantAccessor<boolean, Datum>;
7
- facet?: "auto" | "include" | "exclude";
7
+ filter: ConstantAccessor<boolean, Datum>;
8
+ facet: "auto" | "include" | "exclude";
8
9
  fx: ChannelAccessor<Datum>;
9
10
  fy: ChannelAccessor<Datum>;
10
11
  dx: ConstantAccessor<number, Datum>;
11
12
  dy: ConstantAccessor<number, Datum>;
13
+ dodgeX: callWithProps;
14
+ dodgeY: callWithProps;
12
15
  fill: ChannelAccessor<Datum>;
13
16
  fillOpacity: ConstantAccessor<number, Datum>;
14
17
  sort: {
@@ -29,38 +32,38 @@ declare class __sveltets_Render<Datum extends DataRecord> {
29
32
  imageFilter: ConstantAccessor<string, Datum>;
30
33
  shapeRendering: ConstantAccessor<import("csstype").Property.ShapeRendering, Datum>;
31
34
  paintOrder: ConstantAccessor<string, Datum>;
32
- onclick?: import("svelte/elements").MouseEventHandler<SVGPathElement>;
33
- ondblclick?: import("svelte/elements").MouseEventHandler<SVGPathElement>;
34
- onmouseup?: import("svelte/elements").MouseEventHandler<SVGPathElement>;
35
- onmousedown?: import("svelte/elements").MouseEventHandler<SVGPathElement>;
36
- onmouseenter?: import("svelte/elements").MouseEventHandler<SVGPathElement>;
37
- onmousemove?: import("svelte/elements").MouseEventHandler<SVGPathElement>;
38
- onmouseleave?: import("svelte/elements").MouseEventHandler<SVGPathElement>;
39
- onmouseout?: import("svelte/elements").MouseEventHandler<SVGPathElement>;
40
- onmouseover?: import("svelte/elements").MouseEventHandler<SVGPathElement>;
41
- onpointercancel?: import("svelte/elements").MouseEventHandler<SVGPathElement>;
42
- onpointerdown?: import("svelte/elements").MouseEventHandler<SVGPathElement>;
43
- onpointerup?: import("svelte/elements").MouseEventHandler<SVGPathElement>;
44
- onpointerenter?: import("svelte/elements").MouseEventHandler<SVGPathElement>;
45
- onpointerleave?: import("svelte/elements").MouseEventHandler<SVGPathElement>;
46
- onpointermove?: import("svelte/elements").MouseEventHandler<SVGPathElement>;
47
- onpointerover?: import("svelte/elements").MouseEventHandler<SVGPathElement>;
48
- onpointerout?: import("svelte/elements").MouseEventHandler<SVGPathElement>;
49
- ondrag?: import("svelte/elements").MouseEventHandler<SVGPathElement>;
50
- ondrop?: import("svelte/elements").MouseEventHandler<SVGPathElement>;
51
- ondragstart?: import("svelte/elements").MouseEventHandler<SVGPathElement>;
52
- ondragenter?: import("svelte/elements").MouseEventHandler<SVGPathElement>;
53
- ondragleave?: import("svelte/elements").MouseEventHandler<SVGPathElement>;
54
- ondragover?: import("svelte/elements").MouseEventHandler<SVGPathElement>;
55
- ondragend?: import("svelte/elements").MouseEventHandler<SVGPathElement>;
56
- ontouchstart?: import("svelte/elements").MouseEventHandler<SVGPathElement>;
57
- ontouchmove?: import("svelte/elements").MouseEventHandler<SVGPathElement>;
58
- ontouchend?: import("svelte/elements").MouseEventHandler<SVGPathElement>;
59
- ontouchcancel?: import("svelte/elements").MouseEventHandler<SVGPathElement>;
60
- oncontextmenu?: import("svelte/elements").MouseEventHandler<SVGPathElement>;
61
- onwheel?: import("svelte/elements").MouseEventHandler<SVGPathElement>;
62
- class?: string;
63
- style?: string;
35
+ onclick: import("svelte/elements").MouseEventHandler<SVGPathElement>;
36
+ ondblclick: import("svelte/elements").MouseEventHandler<SVGPathElement>;
37
+ onmouseup: import("svelte/elements").MouseEventHandler<SVGPathElement>;
38
+ onmousedown: import("svelte/elements").MouseEventHandler<SVGPathElement>;
39
+ onmouseenter: import("svelte/elements").MouseEventHandler<SVGPathElement>;
40
+ onmousemove: import("svelte/elements").MouseEventHandler<SVGPathElement>;
41
+ onmouseleave: import("svelte/elements").MouseEventHandler<SVGPathElement>;
42
+ onmouseout: import("svelte/elements").MouseEventHandler<SVGPathElement>;
43
+ onmouseover: import("svelte/elements").MouseEventHandler<SVGPathElement>;
44
+ onpointercancel: import("svelte/elements").MouseEventHandler<SVGPathElement>;
45
+ onpointerdown: import("svelte/elements").MouseEventHandler<SVGPathElement>;
46
+ onpointerup: import("svelte/elements").MouseEventHandler<SVGPathElement>;
47
+ onpointerenter: import("svelte/elements").MouseEventHandler<SVGPathElement>;
48
+ onpointerleave: import("svelte/elements").MouseEventHandler<SVGPathElement>;
49
+ onpointermove: import("svelte/elements").MouseEventHandler<SVGPathElement>;
50
+ onpointerover: import("svelte/elements").MouseEventHandler<SVGPathElement>;
51
+ onpointerout: import("svelte/elements").MouseEventHandler<SVGPathElement>;
52
+ ondrag: import("svelte/elements").MouseEventHandler<SVGPathElement>;
53
+ ondrop: import("svelte/elements").MouseEventHandler<SVGPathElement>;
54
+ ondragstart: import("svelte/elements").MouseEventHandler<SVGPathElement>;
55
+ ondragenter: import("svelte/elements").MouseEventHandler<SVGPathElement>;
56
+ ondragleave: import("svelte/elements").MouseEventHandler<SVGPathElement>;
57
+ ondragover: import("svelte/elements").MouseEventHandler<SVGPathElement>;
58
+ ondragend: import("svelte/elements").MouseEventHandler<SVGPathElement>;
59
+ ontouchstart: import("svelte/elements").MouseEventHandler<SVGPathElement>;
60
+ ontouchmove: import("svelte/elements").MouseEventHandler<SVGPathElement>;
61
+ ontouchend: import("svelte/elements").MouseEventHandler<SVGPathElement>;
62
+ ontouchcancel: import("svelte/elements").MouseEventHandler<SVGPathElement>;
63
+ oncontextmenu: import("svelte/elements").MouseEventHandler<SVGPathElement>;
64
+ onwheel: import("svelte/elements").MouseEventHandler<SVGPathElement>;
65
+ class: string;
66
+ style: string;
64
67
  cursor: ConstantAccessor<import("csstype").Property.Cursor, Datum>;
65
68
  }> & LinkableMarkProps<Datum> & {
66
69
  data: Datum[];
@@ -2,12 +2,14 @@ import { renameChannels } from '../transforms/rename.js';
2
2
  import type { ChannelAccessor, DataRow } from '../types/index.js';
3
3
  declare class __sveltets_Render<Datum extends DataRow> {
4
4
  props(): Omit<Partial<{
5
- filter?: import("../types/index.js").ConstantAccessor<boolean, Record<string | symbol, import("../types/data").RawValue>>;
6
- facet?: "auto" | "include" | "exclude";
5
+ filter: import("../types/index.js").ConstantAccessor<boolean, Record<string | symbol, import("../types/data").RawValue>>;
6
+ facet: "auto" | "include" | "exclude";
7
7
  fx: ChannelAccessor<Record<string | symbol, import("../types/data").RawValue>>;
8
8
  fy: ChannelAccessor<Record<string | symbol, import("../types/data").RawValue>>;
9
9
  dx: import("../types/index.js").ConstantAccessor<number, Record<string | symbol, import("../types/data").RawValue>>;
10
10
  dy: import("../types/index.js").ConstantAccessor<number, Record<string | symbol, import("../types/data").RawValue>>;
11
+ dodgeX: renameChannels;
12
+ dodgeY: renameChannels;
11
13
  fill: ChannelAccessor<Record<string | symbol, import("../types/data").RawValue>>;
12
14
  fillOpacity: import("../types/index.js").ConstantAccessor<number, Record<string | symbol, import("../types/data").RawValue>>;
13
15
  sort: {
@@ -28,38 +30,38 @@ declare class __sveltets_Render<Datum extends DataRow> {
28
30
  imageFilter: import("../types/index.js").ConstantAccessor<string, Record<string | symbol, import("../types/data").RawValue>>;
29
31
  shapeRendering: import("../types/index.js").ConstantAccessor<import("csstype").Property.ShapeRendering, Record<string | symbol, import("../types/data").RawValue>>;
30
32
  paintOrder: import("../types/index.js").ConstantAccessor<string, Record<string | symbol, import("../types/data").RawValue>>;
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;
33
+ onclick: import("svelte/elements").MouseEventHandler<SVGPathElement>;
34
+ ondblclick: import("svelte/elements").MouseEventHandler<SVGPathElement>;
35
+ onmouseup: import("svelte/elements").MouseEventHandler<SVGPathElement>;
36
+ onmousedown: import("svelte/elements").MouseEventHandler<SVGPathElement>;
37
+ onmouseenter: import("svelte/elements").MouseEventHandler<SVGPathElement>;
38
+ onmousemove: import("svelte/elements").MouseEventHandler<SVGPathElement>;
39
+ onmouseleave: import("svelte/elements").MouseEventHandler<SVGPathElement>;
40
+ onmouseout: import("svelte/elements").MouseEventHandler<SVGPathElement>;
41
+ onmouseover: import("svelte/elements").MouseEventHandler<SVGPathElement>;
42
+ onpointercancel: import("svelte/elements").MouseEventHandler<SVGPathElement>;
43
+ onpointerdown: import("svelte/elements").MouseEventHandler<SVGPathElement>;
44
+ onpointerup: import("svelte/elements").MouseEventHandler<SVGPathElement>;
45
+ onpointerenter: import("svelte/elements").MouseEventHandler<SVGPathElement>;
46
+ onpointerleave: import("svelte/elements").MouseEventHandler<SVGPathElement>;
47
+ onpointermove: import("svelte/elements").MouseEventHandler<SVGPathElement>;
48
+ onpointerover: import("svelte/elements").MouseEventHandler<SVGPathElement>;
49
+ onpointerout: import("svelte/elements").MouseEventHandler<SVGPathElement>;
50
+ ondrag: import("svelte/elements").MouseEventHandler<SVGPathElement>;
51
+ ondrop: import("svelte/elements").MouseEventHandler<SVGPathElement>;
52
+ ondragstart: import("svelte/elements").MouseEventHandler<SVGPathElement>;
53
+ ondragenter: import("svelte/elements").MouseEventHandler<SVGPathElement>;
54
+ ondragleave: import("svelte/elements").MouseEventHandler<SVGPathElement>;
55
+ ondragover: import("svelte/elements").MouseEventHandler<SVGPathElement>;
56
+ ondragend: import("svelte/elements").MouseEventHandler<SVGPathElement>;
57
+ ontouchstart: import("svelte/elements").MouseEventHandler<SVGPathElement>;
58
+ ontouchmove: import("svelte/elements").MouseEventHandler<SVGPathElement>;
59
+ ontouchend: import("svelte/elements").MouseEventHandler<SVGPathElement>;
60
+ ontouchcancel: import("svelte/elements").MouseEventHandler<SVGPathElement>;
61
+ oncontextmenu: import("svelte/elements").MouseEventHandler<SVGPathElement>;
62
+ onwheel: import("svelte/elements").MouseEventHandler<SVGPathElement>;
63
+ class: string;
64
+ style: string;
63
65
  cursor: import("../types/index.js").ConstantAccessor<import("csstype").Property.Cursor, Record<string | symbol, import("../types/data").RawValue>>;
64
66
  }> & import("../types/mark").LinkableMarkProps<Record<string | symbol, import("../types/data").RawValue>> & {
65
67
  data: Record<string | symbol, import("../types/data").RawValue>[];