@fjader/svelte 0.2.2 → 0.2.4
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 +2 -0
- package/dist/components/axes/AxisBottom.svelte +23 -6
- package/dist/components/axes/AxisBottom.svelte.d.ts +10 -0
- package/dist/components/axes/AxisLeft.svelte +77 -8
- package/dist/components/axes/AxisLeft.svelte.d.ts +17 -0
- package/dist/components/axes/BandAxisTicks.svelte +64 -25
- package/dist/components/axes/BandAxisTicks.svelte.d.ts +5 -5
- package/dist/components/axes/axis-title.d.ts +30 -0
- package/dist/components/axes/axis-title.js +77 -0
- package/dist/components/charts/ChartCell.svelte +1 -1
- package/dist/components/charts/ChartContainer.svelte +12 -3
- package/dist/components/charts/ChartContainer.svelte.d.ts +7 -0
- package/dist/components/guides/legend/ContinuousColorLegend.svelte +9 -2
- package/dist/components/guides/legend/OrdinalColorLegend.svelte +96 -35
- package/dist/components/marks/AreaMarkX.svelte +21 -6
- package/dist/components/marks/AreaMarkY.svelte +21 -6
- package/dist/components/marks/BarMarkX.svelte +16 -1
- package/dist/components/marks/BarMarkY.svelte +16 -1
- package/dist/components/marks/DotsMark.svelte +5 -0
- package/dist/components/marks/LineMark.svelte +8 -1
- package/dist/components/marks/ParallelCoordinatesMark.svelte +10 -0
- package/dist/components/marks/ParallelCoordinatesMark.svelte.d.ts +5 -0
- package/dist/components/marks/RectMark.svelte +5 -0
- package/dist/components/marks/RectXMark.svelte +5 -0
- package/dist/components/marks/RectYMark.svelte +5 -0
- package/dist/components/marks/RuleMarkX.svelte +12 -2
- package/dist/components/marks/RuleMarkY.svelte +12 -2
- package/dist/components/marks/TextMark.svelte +76 -13
- package/dist/components/marks/lifecycle/MarkLifecycleV2.svelte.d.ts +21 -2
- package/dist/components/marks/lifecycle/MarkLifecycleV2.svelte.js +300 -42
- package/dist/components/marks/lifecycle/domain-queries.d.ts +3 -1
- package/dist/components/marks/lifecycle/domain-queries.js +22 -15
- package/dist/components/marks/lifecycle/domain-registration.js +2 -6
- package/dist/components/marks/lifecycle/other-rows.svelte.d.ts +104 -0
- package/dist/components/marks/lifecycle/other-rows.svelte.js +193 -0
- package/dist/components/marks/lifecycle/other-split.d.ts +80 -0
- package/dist/components/marks/lifecycle/other-split.js +112 -0
- package/dist/components/marks/lifecycle/query-builder.d.ts +26 -1
- package/dist/components/marks/lifecycle/query-builder.js +25 -5
- package/dist/components/marks/lifecycle/transform-scale-key.d.ts +16 -0
- package/dist/components/marks/lifecycle/transform-scale-key.js +27 -0
- package/dist/components/marks/utils/area-outline.d.ts +24 -0
- package/dist/components/marks/utils/area-outline.js +10 -0
- package/dist/components/marks/utils/reactive-config.d.ts +1 -1
- package/dist/components/marks/utils/reactive-config.js +9 -0
- package/dist/components/marks/utils/tooltip-helpers.d.ts +4 -1
- package/dist/components/marks/utils/tooltip-helpers.js +2 -1
- package/dist/components/rendering/Areas.svelte +30 -6
- package/dist/components/rendering/Areas.svelte.d.ts +2 -0
- package/dist/components/rendering/BaseGPURenderer.svelte.d.ts +3 -1
- package/dist/components/rendering/BaseGPURenderer.svelte.js +8 -3
- package/dist/components/rendering/Dots.svelte +24 -3
- package/dist/components/rendering/Dots.svelte.d.ts +2 -0
- package/dist/components/rendering/GridLine.svelte +2 -1
- package/dist/components/rendering/Lines.svelte +49 -7
- package/dist/components/rendering/Lines.svelte.d.ts +9 -0
- package/dist/components/rendering/ParallelLines.svelte +26 -7
- package/dist/components/rendering/ParallelLines.svelte.d.ts +2 -0
- package/dist/components/rendering/Rects.svelte +129 -20
- package/dist/components/rendering/Rects.svelte.d.ts +9 -0
- package/dist/components/rendering/RuleX.svelte +20 -5
- package/dist/components/rendering/RuleX.svelte.d.ts +2 -0
- package/dist/components/rendering/RuleY.svelte +20 -5
- package/dist/components/rendering/RuleY.svelte.d.ts +2 -0
- package/dist/components/rendering/activity-reads.d.ts +111 -0
- package/dist/components/rendering/activity-reads.js +154 -0
- package/dist/components/rendering/uniform-sizes.d.ts +26 -0
- package/dist/components/rendering/uniform-sizes.js +28 -0
- package/dist/config/ChartConfig.svelte.d.ts +5 -1
- package/dist/gpu/ColorScaleShaderLib.d.ts +13 -1
- package/dist/gpu/ColorScaleShaderLib.js +56 -5
- package/dist/gpu/GPUCoordinator.svelte.d.ts +8 -0
- package/dist/gpu/GPUCoordinator.svelte.js +68 -32
- package/dist/gpu/MorphedChannels.d.ts +6 -32
- package/dist/gpu/MorphedChannels.js +45 -3
- package/dist/gpu/ResolveShader.d.ts +2 -2
- package/dist/gpu/ResolveShader.js +2 -2
- package/dist/gpu/ScaleTemplateSystem.d.ts +19 -0
- package/dist/gpu/ScaleTemplateSystem.js +111 -11
- package/dist/gpu/SizeScaleShaderLib.d.ts +4 -4
- package/dist/gpu/SizeScaleShaderLib.js +4 -4
- package/dist/gpu/identity-slot-packing.d.ts +157 -40
- package/dist/gpu/identity-slot-packing.js +262 -62
- package/dist/gpu/tracked-scales.d.ts +14 -0
- package/dist/gpu/tracked-scales.js +18 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +4 -0
- package/dist/interactors/BandLabelToggle.svelte +5 -9
- package/dist/interactors/BandLabelToggle.svelte.d.ts +3 -3
- package/dist/interactors/DerivedInterval1D.svelte +26 -54
- package/dist/interactors/Interval1D.svelte +8 -2
- package/dist/interactors/Interval2D.svelte +8 -2
- package/dist/interactors/ParallelAxisSource.svelte +14 -5
- package/dist/interactors/ParallelAxisSource.svelte.d.ts +2 -1
- package/dist/interactors/ParallelBrushes.svelte +8 -9
- package/dist/interactors/ParallelBrushes.svelte.d.ts +3 -3
- package/dist/interactors/Toggle.svelte +48 -38
- package/dist/interactors/Toggle.svelte.d.ts +4 -3
- package/dist/interactors/Tooltip.svelte +140 -42
- package/dist/interactors/TooltipManager.svelte.d.ts +20 -5
- package/dist/interactors/TooltipManager.svelte.js +40 -10
- package/dist/interactors/other-tooltip.d.ts +16 -0
- package/dist/interactors/other-tooltip.js +22 -0
- package/dist/interactors/relay-clauses.d.ts +23 -0
- package/dist/interactors/relay-clauses.js +60 -0
- package/dist/query-engine/CrossfilterSelection.svelte.d.ts +88 -15
- package/dist/query-engine/CrossfilterSelection.svelte.js +94 -20
- package/dist/query-engine/FieldActivity.svelte.d.ts +128 -0
- package/dist/query-engine/FieldActivity.svelte.js +378 -0
- package/dist/query-engine/FilterGroup.svelte.d.ts +76 -30
- package/dist/query-engine/FilterGroup.svelte.js +223 -124
- package/dist/query-engine/FilterGroupRegistry.svelte.d.ts +73 -3
- package/dist/query-engine/FilterGroupRegistry.svelte.js +161 -12
- package/dist/query-engine/MarkHandle.svelte.d.ts +9 -1
- package/dist/query-engine/MarkHandle.svelte.js +12 -2
- package/dist/query-engine/QueryEngine.d.ts +52 -16
- package/dist/query-engine/QueryEngine.js +116 -34
- package/dist/query-engine/categorical-identity.d.ts +114 -27
- package/dist/query-engine/categorical-identity.js +225 -51
- package/dist/query-engine/index.d.ts +2 -1
- package/dist/query-engine/index.js +1 -0
- package/dist/query-engine/preagg/Preagg.d.ts +1 -1
- package/dist/query-engine/preagg/Preagg.js +11 -9
- package/dist/query-engine/preagg/plan.d.ts +14 -5
- package/dist/query-engine/preagg/plan.js +44 -18
- package/dist/query-engine/toggle-predicate.d.ts +21 -0
- package/dist/query-engine/toggle-predicate.js +41 -2
- package/dist/scales/ActivityTable.d.ts +103 -0
- package/dist/scales/ActivityTable.js +220 -0
- package/dist/scales/BandScaleState.svelte.d.ts +41 -15
- package/dist/scales/BandScaleState.svelte.js +78 -36
- package/dist/scales/ChartScales.svelte.d.ts +2 -2
- package/dist/scales/ColorScaleState.svelte.d.ts +36 -8
- package/dist/scales/ColorScaleState.svelte.js +118 -24
- package/dist/scales/DomainResolver.d.ts +2 -0
- package/dist/scales/DomainResolver.js +15 -8
- package/dist/scales/ScaleRegistry.svelte.d.ts +9 -0
- package/dist/scales/ScaleRegistry.svelte.js +22 -1
- package/dist/scales/TimeScaleState.svelte.js +7 -1
- package/dist/spec/index.js +1 -0
- package/dist/spec/types.d.ts +4 -0
- package/dist/theme.css +5 -4
- package/dist/transforms/TransformCompiler.d.ts +37 -2
- package/dist/transforms/TransformCompiler.js +44 -1
- package/dist/transforms/index.d.ts +27 -0
- package/dist/transforms/index.js +127 -19
- package/dist/types.d.ts +71 -0
- package/package.json +3 -2
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
+
import { ruleHasExtent } from '../rendering/activity-reads';
|
|
2
3
|
import { getContext, onDestroy, untrack } from 'svelte';
|
|
3
4
|
import { MarkLifecycleV2 } from './lifecycle/MarkLifecycleV2.svelte';
|
|
4
5
|
import { RuleX, GridLine } from '../rendering';
|
|
@@ -34,6 +35,8 @@
|
|
|
34
35
|
let {
|
|
35
36
|
table = undefined,
|
|
36
37
|
selection = undefined,
|
|
38
|
+
selectionResponse = undefined,
|
|
39
|
+
nulls = undefined,
|
|
37
40
|
x,
|
|
38
41
|
y: yShorthand = undefined,
|
|
39
42
|
y1: y1Prop = undefined,
|
|
@@ -93,7 +96,7 @@
|
|
|
93
96
|
return undefined;
|
|
94
97
|
});
|
|
95
98
|
|
|
96
|
-
const hasExtent = $derived(y1
|
|
99
|
+
const hasExtent = $derived(ruleHasExtent(y1, y2));
|
|
97
100
|
|
|
98
101
|
let setup = $state<MarkLifecycleV2 | null>(null);
|
|
99
102
|
|
|
@@ -121,6 +124,8 @@
|
|
|
121
124
|
opacity: () => opacity,
|
|
122
125
|
transforms: () => transforms,
|
|
123
126
|
selection: () => selection,
|
|
127
|
+
selectionResponse: () => selectionResponse,
|
|
128
|
+
nulls: () => nulls,
|
|
124
129
|
limit: () => limit,
|
|
125
130
|
sort: () => sort,
|
|
126
131
|
domain: () => domain,
|
|
@@ -174,7 +179,11 @@
|
|
|
174
179
|
...(hasExtent && { y1: entry.y1, y2: entry.y2 })
|
|
175
180
|
}),
|
|
176
181
|
// When y shorthand is used, include 0 in domain
|
|
177
|
-
zeroBaseline: yShorthand !== undefined ? { y: true } : null
|
|
182
|
+
zeroBaseline: yShorthand !== undefined ? { y: true } : null,
|
|
183
|
+
// The value the renderer's y0Data is built from: routing must agree.
|
|
184
|
+
ruleExtent: hasExtent,
|
|
185
|
+
// Coloured by stroke: the lifecycle requests that channel's identity.
|
|
186
|
+
colorChannel: 'stroke'
|
|
178
187
|
};
|
|
179
188
|
});
|
|
180
189
|
|
|
@@ -301,6 +310,7 @@
|
|
|
301
310
|
alphaData={opacityData}
|
|
302
311
|
colorMode={markColor.colorMode}
|
|
303
312
|
colorScaleIndex={markColor.colorScaleIndex}
|
|
313
|
+
groupIndex={setup?.groupIndex ?? 0}
|
|
304
314
|
constantColor={markColor.constantColor}
|
|
305
315
|
{strokeWidth}
|
|
306
316
|
facetData={setup?.facetData}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
+
import { ruleHasExtent } from '../rendering/activity-reads';
|
|
2
3
|
import { getContext, onDestroy, untrack } from 'svelte';
|
|
3
4
|
import { MarkLifecycleV2 } from './lifecycle/MarkLifecycleV2.svelte';
|
|
4
5
|
import { RuleY, GridLine } from '../rendering';
|
|
@@ -34,6 +35,8 @@
|
|
|
34
35
|
let {
|
|
35
36
|
table = undefined,
|
|
36
37
|
selection = undefined,
|
|
38
|
+
selectionResponse = undefined,
|
|
39
|
+
nulls = undefined,
|
|
37
40
|
y,
|
|
38
41
|
x: xShorthand = undefined,
|
|
39
42
|
x1: x1Prop = undefined,
|
|
@@ -92,7 +95,7 @@
|
|
|
92
95
|
return undefined;
|
|
93
96
|
});
|
|
94
97
|
|
|
95
|
-
const hasExtent = $derived(x1
|
|
98
|
+
const hasExtent = $derived(ruleHasExtent(x1, x2));
|
|
96
99
|
|
|
97
100
|
let setup = $state<MarkLifecycleV2 | null>(null);
|
|
98
101
|
|
|
@@ -119,6 +122,8 @@
|
|
|
119
122
|
opacity: () => opacity,
|
|
120
123
|
transforms: () => transforms,
|
|
121
124
|
selection: () => selection,
|
|
125
|
+
selectionResponse: () => selectionResponse,
|
|
126
|
+
nulls: () => nulls,
|
|
122
127
|
limit: () => limit,
|
|
123
128
|
sort: () => sort,
|
|
124
129
|
domain: () => domain,
|
|
@@ -170,7 +175,11 @@
|
|
|
170
175
|
y: entry.y,
|
|
171
176
|
...(hasExtent && { x1: entry.x1, x2: entry.x2 })
|
|
172
177
|
}),
|
|
173
|
-
zeroBaseline: xShorthand !== undefined ? { x: true } : null
|
|
178
|
+
zeroBaseline: xShorthand !== undefined ? { x: true } : null,
|
|
179
|
+
// The value the renderer's x0Data is built from: routing must agree.
|
|
180
|
+
ruleExtent: hasExtent,
|
|
181
|
+
// Coloured by stroke: the lifecycle requests that channel's identity.
|
|
182
|
+
colorChannel: 'stroke'
|
|
174
183
|
};
|
|
175
184
|
});
|
|
176
185
|
|
|
@@ -297,6 +306,7 @@
|
|
|
297
306
|
alphaData={opacityData}
|
|
298
307
|
colorMode={markColor.colorMode}
|
|
299
308
|
colorScaleIndex={markColor.colorScaleIndex}
|
|
309
|
+
groupIndex={setup?.groupIndex ?? 0}
|
|
300
310
|
constantColor={markColor.constantColor}
|
|
301
311
|
{strokeWidth}
|
|
302
312
|
facetData={setup?.facetData}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
+
import { NO_GROUP } from '../rendering/activity-reads';
|
|
2
3
|
import { getContext, onDestroy, untrack } from 'svelte';
|
|
3
4
|
import { MarkLifecycleV2 } from './lifecycle/MarkLifecycleV2.svelte';
|
|
4
5
|
import { SCALE_PRIORITIES } from '../../scales/ScalePriorities';
|
|
@@ -41,6 +42,8 @@
|
|
|
41
42
|
let {
|
|
42
43
|
table,
|
|
43
44
|
selection = undefined,
|
|
45
|
+
selectionResponse = undefined,
|
|
46
|
+
nulls = undefined,
|
|
44
47
|
x,
|
|
45
48
|
y,
|
|
46
49
|
text,
|
|
@@ -126,6 +129,12 @@
|
|
|
126
129
|
get sort() {
|
|
127
130
|
return sort;
|
|
128
131
|
},
|
|
132
|
+
get selectionResponse() {
|
|
133
|
+
return selectionResponse;
|
|
134
|
+
},
|
|
135
|
+
get nulls() {
|
|
136
|
+
return nulls;
|
|
137
|
+
},
|
|
129
138
|
get limit() {
|
|
130
139
|
return limit;
|
|
131
140
|
},
|
|
@@ -203,18 +212,22 @@
|
|
|
203
212
|
|
|
204
213
|
// --- Color Resolution (pre-resolved once, not per-label) ---
|
|
205
214
|
|
|
206
|
-
|
|
215
|
+
/** The raw fill channel, once per data change: colours and dimming both read it. */
|
|
216
|
+
const fillRaw = $derived.by(() => {
|
|
207
217
|
if (!fill) return null;
|
|
208
218
|
if (typeof fill === 'string' && isColorConstant(fill)) return null;
|
|
209
219
|
if (!markColor.scaleState || !instanceCount) return null;
|
|
210
|
-
|
|
211
|
-
const raw = resolveChannel({
|
|
220
|
+
return resolveChannel({
|
|
212
221
|
value: fill,
|
|
213
222
|
channel: 'fill',
|
|
214
223
|
dataAccessor: setup?.data,
|
|
215
224
|
instanceCount
|
|
216
225
|
});
|
|
217
|
-
|
|
226
|
+
});
|
|
227
|
+
|
|
228
|
+
const colorCSSValues = $derived.by(() => {
|
|
229
|
+
const raw = fillRaw;
|
|
230
|
+
if (!raw || !markColor.scaleState) return null;
|
|
218
231
|
|
|
219
232
|
const scale = markColor.scaleState;
|
|
220
233
|
const colors = new Array(instanceCount);
|
|
@@ -253,6 +266,60 @@
|
|
|
253
266
|
return result;
|
|
254
267
|
});
|
|
255
268
|
|
|
269
|
+
// --- Selection dimming ---
|
|
270
|
+
//
|
|
271
|
+
// A label dims with the bars it labels: by its band axes and its ordinal
|
|
272
|
+
// colour, in its own filter group, the fields activity-reads.ts lists for
|
|
273
|
+
// text. Routing reads the same list, so a categorical selection on one of
|
|
274
|
+
// these fields dims the labels instead of filtering them away.
|
|
275
|
+
|
|
276
|
+
/**
|
|
277
|
+
* Per-label dimming sources, resolved once per data change, not per frame.
|
|
278
|
+
* Each is a field's identity key and the label's dim ids on it: a scale has an
|
|
279
|
+
* identity key only while its channel carries ids, so the raw column is the
|
|
280
|
+
* ids, and reading the fade by id is what reaches an Other bucket.
|
|
281
|
+
*/
|
|
282
|
+
const dimming = $derived.by(() => {
|
|
283
|
+
// A 'filter' mark (NO_GROUP) never dims, as its GPU marks do not.
|
|
284
|
+
if (!setup || !filterGroups || setup.groupIndex === NO_GROUP) return null;
|
|
285
|
+
const groups = [setup.groupIndex];
|
|
286
|
+
const sources: Array<{ key: string; ids: ArrayLike<unknown> }> = [];
|
|
287
|
+
for (const axis of ['x', 'y'] as const) {
|
|
288
|
+
const type = chartContext.scaleTypes?.[axis];
|
|
289
|
+
if (type !== 'band' && type !== 'point') continue;
|
|
290
|
+
const band = chartContext[`${axis}ScaleState`] as BandScaleState | null;
|
|
291
|
+
const raw = axis === 'x' ? xRaw : yRaw;
|
|
292
|
+
// Identity keys only, as routing reads them: a field without identity
|
|
293
|
+
// filters the labels, so they do not dim by it too.
|
|
294
|
+
const key = band?.identityKey;
|
|
295
|
+
if (!key || !raw) continue;
|
|
296
|
+
sources.push({ key, ids: raw as ArrayLike<unknown> });
|
|
297
|
+
}
|
|
298
|
+
const color = markColor.scaleState;
|
|
299
|
+
const raw = fillRaw;
|
|
300
|
+
const colorKey = color?.isOrdinal ? color.identityKey : null;
|
|
301
|
+
if (colorKey && raw) sources.push({ key: colorKey, ids: raw as ArrayLike<unknown> });
|
|
302
|
+
return sources.length ? { groups, sources } : null;
|
|
303
|
+
});
|
|
304
|
+
|
|
305
|
+
/** How visible label `idx` is now: the least visible of its categories. */
|
|
306
|
+
function labelOpacity(idx: number): number {
|
|
307
|
+
const d = dimming;
|
|
308
|
+
if (!d) return 1;
|
|
309
|
+
let opacity = 1;
|
|
310
|
+
for (const source of d.sources) {
|
|
311
|
+
const raw = source.ids[idx];
|
|
312
|
+
// An id reads its fade by id. Anything else (a string from a channel
|
|
313
|
+
// that never carried ids, a null) is a value, read as one: never coerced
|
|
314
|
+
// to a number, where a string becomes NaN and null becomes category 0.
|
|
315
|
+
const selected = Number.isInteger(raw)
|
|
316
|
+
? filterGroups.opacityOfId(source.key, d.groups, raw as number)
|
|
317
|
+
: filterGroups.opacityOfValue(source.key, d.groups, raw);
|
|
318
|
+
opacity = Math.min(opacity, selected);
|
|
319
|
+
}
|
|
320
|
+
return opacity;
|
|
321
|
+
}
|
|
322
|
+
|
|
256
323
|
// --- Animation-aware positioning ---
|
|
257
324
|
|
|
258
325
|
let useFadeMode = $derived(labelItems.length > FADE_THRESHOLD);
|
|
@@ -324,17 +391,12 @@
|
|
|
324
391
|
// range: a label off the left edge, or below the axis, where the shader
|
|
325
392
|
// discards the bar it belongs to. The GPU states this discard explicitly
|
|
326
393
|
// rather than leaving it to the scissor rect, and so does this.
|
|
327
|
-
const slotted = (
|
|
328
|
-
band: BandScaleState,
|
|
329
|
-
raw: string | number,
|
|
330
|
-
range: number,
|
|
331
|
-
axis: 'x' | 'y'
|
|
332
|
-
) => {
|
|
394
|
+
const slotted = (band: BandScaleState, raw: string | number, range: number) => {
|
|
333
395
|
const key = bandSlotKey(band, raw);
|
|
334
396
|
if (key == null) return null;
|
|
335
397
|
// Asked once and handed on: tickPosition would look it up again.
|
|
336
398
|
const slot = band.tickSlot(key);
|
|
337
|
-
return slot < 0 ? null : band.slotPosition(slot, range
|
|
399
|
+
return slot < 0 ? null : band.slotPosition(slot, range);
|
|
338
400
|
};
|
|
339
401
|
|
|
340
402
|
const newPos = new Array(items.length);
|
|
@@ -343,13 +405,13 @@
|
|
|
343
405
|
let px, py;
|
|
344
406
|
|
|
345
407
|
if (xBand) {
|
|
346
|
-
px = slotted(xBand, xRaw[dataIdx], rangeX
|
|
408
|
+
px = slotted(xBand, xRaw[dataIdx], rangeX);
|
|
347
409
|
} else {
|
|
348
410
|
px = xScale(xRaw[dataIdx]);
|
|
349
411
|
}
|
|
350
412
|
|
|
351
413
|
if (yBand) {
|
|
352
|
-
py = slotted(yBand, yRaw[dataIdx], rangeY
|
|
414
|
+
py = slotted(yBand, yRaw[dataIdx], rangeY);
|
|
353
415
|
} else {
|
|
354
416
|
py = yScale(yRaw[dataIdx]);
|
|
355
417
|
}
|
|
@@ -427,6 +489,7 @@
|
|
|
427
489
|
{#if pos}
|
|
428
490
|
<text
|
|
429
491
|
fill={item.color}
|
|
492
|
+
fill-opacity={labelOpacity(item.idx)}
|
|
430
493
|
font-size="{fontSize}px"
|
|
431
494
|
font-weight={fontWeight}
|
|
432
495
|
font-family={fontFamily}
|
|
@@ -11,20 +11,23 @@
|
|
|
11
11
|
* → setupComplete = true
|
|
12
12
|
*
|
|
13
13
|
* Registration: watches #resolvedQueryParts, registers with engine.
|
|
14
|
-
* Engine handles filter-driven re-queries via
|
|
14
|
+
* Engine handles filter-driven re-queries via onClauseChange() and
|
|
15
|
+
* onFilterChange().
|
|
15
16
|
*
|
|
16
17
|
* Params: watches sort/limit on ReactiveConfig.
|
|
17
18
|
* Changes trigger re-query for this mark only, no teardown.
|
|
18
19
|
*/
|
|
19
20
|
import type { ScaleRequirement } from '../../../scales/ScalePriorities';
|
|
20
21
|
import type { DataAccessor } from '../../../data/DataAccessor';
|
|
21
|
-
import type { FieldRef, NormalizedSortConfig, Transform, ChartContext } from '../../../types';
|
|
22
|
+
import type { FieldRef, NormalizedSortConfig, Transform, ChartContext, NullsResponse } from '../../../types';
|
|
22
23
|
import type { ColorScaleState } from '../../../scales/ColorScaleState.svelte';
|
|
23
24
|
import type { SizeScaleState } from '../../../scales/SizeScaleState.svelte';
|
|
24
25
|
import type { QueryEngine } from '../../../query-engine/QueryEngine';
|
|
25
26
|
import type { FilterGroup } from '../../../query-engine/FilterGroup.svelte';
|
|
27
|
+
import { type SelectionResponse } from '../../rendering/activity-reads';
|
|
26
28
|
import type { MarkLODSurface } from '../../../lod/rung-types';
|
|
27
29
|
import type { GPUCoordinator } from '../../../gpu/GPUCoordinator.svelte';
|
|
30
|
+
import { OtherRows } from './other-rows.svelte';
|
|
28
31
|
export interface MarkLifecycleV2Config {
|
|
29
32
|
markType: string;
|
|
30
33
|
supportedScaleTypes: {
|
|
@@ -63,6 +66,12 @@ export interface MarkLifecycleV2Config {
|
|
|
63
66
|
x?: boolean;
|
|
64
67
|
y?: boolean;
|
|
65
68
|
};
|
|
69
|
+
/**
|
|
70
|
+
* A rule's: whether it spans an extent on its cross axis (RuleX with
|
|
71
|
+
* y1/y2, RuleY with x1/x2, constants included). Decides whether it reads
|
|
72
|
+
* that axis's selection activity.
|
|
73
|
+
*/
|
|
74
|
+
ruleExtent?: boolean;
|
|
66
75
|
passiveScales?: boolean;
|
|
67
76
|
parallelMode?: boolean;
|
|
68
77
|
parallelColumns?: string[];
|
|
@@ -84,6 +93,9 @@ export interface ReactiveConfig {
|
|
|
84
93
|
};
|
|
85
94
|
readonly fitDomain: 'x' | 'y' | boolean | undefined;
|
|
86
95
|
readonly tip: (unknown | '*')[] | false | undefined;
|
|
96
|
+
readonly selectionResponse: SelectionResponse | undefined;
|
|
97
|
+
readonly nulls: NullsResponse | undefined;
|
|
98
|
+
readonly contributeDomain: boolean | undefined;
|
|
87
99
|
}
|
|
88
100
|
export declare class MarkLifecycleV2 {
|
|
89
101
|
#private;
|
|
@@ -92,6 +104,8 @@ export declare class MarkLifecycleV2 {
|
|
|
92
104
|
gpuCoordinator?: GPUCoordinator | null;
|
|
93
105
|
onMarkLOD?: ((surface: MarkLODSurface | null) => void) | null;
|
|
94
106
|
});
|
|
107
|
+
/** What this mark's Other rows hold, and what is done with it. */
|
|
108
|
+
readonly otherRows: OtherRows;
|
|
95
109
|
/**
|
|
96
110
|
* The axis whose rows are one per category, in category order — or null.
|
|
97
111
|
*
|
|
@@ -125,6 +139,11 @@ export declare class MarkLifecycleV2 {
|
|
|
125
139
|
get tooltipTableName(): string;
|
|
126
140
|
get tooltipEnabled(): boolean;
|
|
127
141
|
get channelFieldMap(): Record<string, string>;
|
|
142
|
+
/**
|
|
143
|
+
* The page-wide index of this mark's filter group. Its renderer stores it in
|
|
144
|
+
* MarkConstants to read its group's run of each field's activity block.
|
|
145
|
+
*/
|
|
146
|
+
get groupIndex(): number;
|
|
128
147
|
get dataVersion(): number;
|
|
129
148
|
get hasCategoryReducingTransforms(): boolean;
|
|
130
149
|
data: DataAccessor | null;
|