react-cheminfo 0.22.0 → 0.23.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 +13 -3
- package/lib/overlay/core/index.d.ts +2 -2
- package/lib/overlay/core/index.d.ts.map +1 -1
- package/lib/overlay/core/index.js +1 -1
- package/lib/overlay/core/index.js.map +1 -1
- package/lib/overlay/core/overlayMarks.d.ts +20 -5
- package/lib/overlay/core/overlayMarks.d.ts.map +1 -1
- package/lib/overlay/core/overlayMarks.js +31 -5
- package/lib/overlay/core/overlayMarks.js.map +1 -1
- package/lib/overlay/ui/OverlayLegendMark.js +5 -0
- package/lib/overlay/ui/OverlayLegendMark.js.map +1 -1
- package/lib/projection/core/index.d.ts +4 -4
- package/lib/projection/core/index.d.ts.map +1 -1
- package/lib/projection/core/index.js +2 -2
- package/lib/projection/core/index.js.map +1 -1
- package/lib/projection/core/projectionCopy.d.ts +2 -0
- package/lib/projection/core/projectionCopy.d.ts.map +1 -1
- package/lib/projection/core/projectionCopy.js +1 -0
- package/lib/projection/core/projectionCopy.js.map +1 -1
- package/lib/projection/core/projectionGroupings.d.ts +44 -0
- package/lib/projection/core/projectionGroupings.d.ts.map +1 -0
- package/lib/projection/core/projectionGroupings.js +132 -0
- package/lib/projection/core/projectionGroupings.js.map +1 -0
- package/lib/projection/core/projectionOptions.d.ts +16 -6
- package/lib/projection/core/projectionOptions.d.ts.map +1 -1
- package/lib/projection/core/projectionOptions.js +7 -1
- package/lib/projection/core/projectionOptions.js.map +1 -1
- package/lib/projection/core/projectionPanelWords.d.ts +6 -0
- package/lib/projection/core/projectionPanelWords.d.ts.map +1 -1
- package/lib/projection/core/projectionPanelWords.js +4 -0
- package/lib/projection/core/projectionPanelWords.js.map +1 -1
- package/lib/projection/core/projectionSamples.d.ts +63 -32
- package/lib/projection/core/projectionSamples.d.ts.map +1 -1
- package/lib/projection/core/projectionSamples.js +1 -80
- package/lib/projection/core/projectionSamples.js.map +1 -1
- package/lib/projection/core/projectionStrings.d.ts +2 -0
- package/lib/projection/core/projectionStrings.d.ts.map +1 -1
- package/lib/projection/core/projectionStrings.js +10 -1
- package/lib/projection/core/projectionStrings.js.map +1 -1
- package/lib/projection/core/resolveProjectionOptions.d.ts +8 -3
- package/lib/projection/core/resolveProjectionOptions.d.ts.map +1 -1
- package/lib/projection/core/resolveProjectionOptions.js +58 -5
- package/lib/projection/core/resolveProjectionOptions.js.map +1 -1
- package/lib/projection/ui/ProjectionBar.d.ts +1 -1
- package/lib/projection/ui/ProjectionBar.d.ts.map +1 -1
- package/lib/projection/ui/ProjectionBar.js +3 -1
- package/lib/projection/ui/ProjectionBar.js.map +1 -1
- package/lib/projection/ui/ProjectionGroupingPickers.d.ts +38 -0
- package/lib/projection/ui/ProjectionGroupingPickers.d.ts.map +1 -0
- package/lib/projection/ui/ProjectionGroupingPickers.js +33 -0
- package/lib/projection/ui/ProjectionGroupingPickers.js.map +1 -0
- package/lib/projection/ui/ProjectionMapControls.d.ts +6 -7
- package/lib/projection/ui/ProjectionMapControls.d.ts.map +1 -1
- package/lib/projection/ui/ProjectionMapControls.js +11 -9
- package/lib/projection/ui/ProjectionMapControls.js.map +1 -1
- package/lib/projection/ui/ProjectionMapLegend.d.ts.map +1 -1
- package/lib/projection/ui/ProjectionMapLegend.js +1 -1
- package/lib/projection/ui/ProjectionMapLegend.js.map +1 -1
- package/lib/projection/ui/ProjectionMapMore.d.ts +2 -2
- package/lib/projection/ui/ProjectionMapMore.d.ts.map +1 -1
- package/lib/projection/ui/ProjectionMapMore.js +7 -5
- package/lib/projection/ui/ProjectionMapMore.js.map +1 -1
- package/lib/projection/ui/ProjectionMapTab.d.ts +15 -6
- package/lib/projection/ui/ProjectionMapTab.d.ts.map +1 -1
- package/lib/projection/ui/ProjectionMapTab.js +11 -7
- package/lib/projection/ui/ProjectionMapTab.js.map +1 -1
- package/lib/projection/ui/ProjectionPairsMore.d.ts +3 -7
- package/lib/projection/ui/ProjectionPairsMore.d.ts.map +1 -1
- package/lib/projection/ui/ProjectionPairsMore.js +4 -5
- package/lib/projection/ui/ProjectionPairsMore.js.map +1 -1
- package/lib/projection/ui/ProjectionPairsTab.d.ts.map +1 -1
- package/lib/projection/ui/ProjectionPairsTab.js +2 -2
- package/lib/projection/ui/ProjectionPairsTab.js.map +1 -1
- package/lib/projection/ui/ProjectionPanel.d.ts +1 -1
- package/lib/projection/ui/ProjectionPanel.d.ts.map +1 -1
- package/lib/projection/ui/ProjectionPanel.js +1 -1
- package/lib/projection/ui/ProjectionPanel.js.map +1 -1
- package/lib/projection/ui/ProjectionReadout.d.ts +7 -1
- package/lib/projection/ui/ProjectionReadout.d.ts.map +1 -1
- package/lib/projection/ui/ProjectionReadout.js +19 -7
- package/lib/projection/ui/ProjectionReadout.js.map +1 -1
- package/lib/projection/ui/ProjectionSpaceControls.d.ts +3 -5
- package/lib/projection/ui/ProjectionSpaceControls.d.ts.map +1 -1
- package/lib/projection/ui/ProjectionSpaceControls.js +9 -7
- package/lib/projection/ui/ProjectionSpaceControls.js.map +1 -1
- package/lib/projection/ui/ProjectionSpaceMore.d.ts +2 -2
- package/lib/projection/ui/ProjectionSpaceMore.d.ts.map +1 -1
- package/lib/projection/ui/ProjectionSpaceMore.js +5 -4
- package/lib/projection/ui/ProjectionSpaceMore.js.map +1 -1
- package/lib/projection/ui/ProjectionSpaceTab.d.ts +11 -3
- package/lib/projection/ui/ProjectionSpaceTab.d.ts.map +1 -1
- package/lib/projection/ui/ProjectionSpaceTab.js +7 -4
- package/lib/projection/ui/ProjectionSpaceTab.js.map +1 -1
- package/lib/projection/ui/ProjectionViewer.d.ts.map +1 -1
- package/lib/projection/ui/ProjectionViewer.js +1 -0
- package/lib/projection/ui/ProjectionViewer.js.map +1 -1
- package/lib/projection/ui/projectionBarReadings.d.ts +4 -1
- package/lib/projection/ui/projectionBarReadings.d.ts.map +1 -1
- package/lib/projection/ui/projectionBarReadings.js +14 -4
- package/lib/projection/ui/projectionBarReadings.js.map +1 -1
- package/lib/projection/ui/projectionBarSlots.d.ts +4 -2
- package/lib/projection/ui/projectionBarSlots.d.ts.map +1 -1
- package/lib/projection/ui/projectionBarSlots.js +3 -7
- package/lib/projection/ui/projectionBarSlots.js.map +1 -1
- package/lib/projection/ui/projectionMapChoices.d.ts +31 -6
- package/lib/projection/ui/projectionMapChoices.d.ts.map +1 -1
- package/lib/projection/ui/projectionMapChoices.js +58 -9
- package/lib/projection/ui/projectionMapChoices.js.map +1 -1
- package/lib/projection/ui/projectionMapChrome.d.ts +3 -9
- package/lib/projection/ui/projectionMapChrome.d.ts.map +1 -1
- package/lib/projection/ui/projectionMapChrome.js +41 -27
- package/lib/projection/ui/projectionMapChrome.js.map +1 -1
- package/lib/projection/ui/projectionMapCorner.d.ts +25 -0
- package/lib/projection/ui/projectionMapCorner.d.ts.map +1 -0
- package/lib/projection/ui/projectionMapCorner.js +46 -0
- package/lib/projection/ui/projectionMapCorner.js.map +1 -0
- package/lib/projection/ui/projectionMapModel.d.ts +9 -18
- package/lib/projection/ui/projectionMapModel.d.ts.map +1 -1
- package/lib/projection/ui/projectionMapModel.js +14 -39
- package/lib/projection/ui/projectionMapModel.js.map +1 -1
- package/lib/projection/ui/projectionMapView.d.ts +3 -1
- package/lib/projection/ui/projectionMapView.d.ts.map +1 -1
- package/lib/projection/ui/projectionMapView.js +9 -4
- package/lib/projection/ui/projectionMapView.js.map +1 -1
- package/lib/projection/ui/projectionSelectionSentence.d.ts +10 -0
- package/lib/projection/ui/projectionSelectionSentence.d.ts.map +1 -0
- package/lib/projection/ui/projectionSelectionSentence.js +18 -0
- package/lib/projection/ui/projectionSelectionSentence.js.map +1 -0
- package/lib/projection/ui/projectionStateApi.d.ts +47 -0
- package/lib/projection/ui/projectionStateApi.d.ts.map +1 -0
- package/lib/projection/ui/projectionStateApi.js +9 -0
- package/lib/projection/ui/projectionStateApi.js.map +1 -0
- package/lib/projection/ui/projectionTabModels.js +1 -1
- package/lib/projection/ui/projectionTabModels.js.map +1 -1
- package/lib/projection/ui/useProjectionState.d.ts +1 -29
- package/lib/projection/ui/useProjectionState.d.ts.map +1 -1
- package/lib/projection/ui/useProjectionState.js +13 -5
- package/lib/projection/ui/useProjectionState.js.map +1 -1
- package/lib/scatter/core/index.d.ts +1 -0
- package/lib/scatter/core/index.d.ts.map +1 -1
- package/lib/scatter/core/index.js +1 -0
- package/lib/scatter/core/index.js.map +1 -1
- package/lib/scatter/core/pointShape.d.ts +18 -0
- package/lib/scatter/core/pointShape.d.ts.map +1 -0
- package/lib/scatter/core/pointShape.js +70 -0
- package/lib/scatter/core/pointShape.js.map +1 -0
- package/lib/scatter/ui/ScatterPlot.d.ts.map +1 -1
- package/lib/scatter/ui/ScatterPlot.js +3 -2
- package/lib/scatter/ui/ScatterPlot.js.map +1 -1
- package/lib/scatter/ui/ScatterPointLayer.d.ts +14 -1
- package/lib/scatter/ui/ScatterPointLayer.d.ts.map +1 -1
- package/lib/scatter/ui/ScatterPointLayer.js +15 -3
- package/lib/scatter/ui/ScatterPointLayer.js.map +1 -1
- package/lib/scatter/ui/scatterFigureProps.d.ts +13 -0
- package/lib/scatter/ui/scatterFigureProps.d.ts.map +1 -1
- package/lib/scatter/ui/scatterMarkGlyph.d.ts +2 -1
- package/lib/scatter/ui/scatterMarkGlyph.d.ts.map +1 -1
- package/lib/scatter/ui/scatterMarkGlyph.js +7 -1
- package/lib/scatter/ui/scatterMarkGlyph.js.map +1 -1
- package/lib/scatter3d/ui/ScatterCloud.d.ts.map +1 -1
- package/lib/scatter3d/ui/ScatterCloud.js +2 -1
- package/lib/scatter3d/ui/ScatterCloud.js.map +1 -1
- package/package.json +1 -1
- package/src/overlay/core/index.ts +6 -2
- package/src/overlay/core/overlayMarks.ts +51 -6
- package/src/overlay/ui/OverlayLegendMark.tsx +5 -0
- package/src/projection/core/index.ts +11 -3
- package/src/projection/core/projectionCopy.ts +3 -0
- package/src/projection/core/projectionGroupings.ts +174 -0
- package/src/projection/core/projectionOptions.ts +18 -7
- package/src/projection/core/projectionPanelWords.ts +10 -0
- package/src/projection/core/projectionSamples.ts +62 -120
- package/src/projection/core/projectionStrings.ts +12 -1
- package/src/projection/core/resolveProjectionOptions.ts +66 -4
- package/src/projection/ui/ProjectionBar.tsx +4 -2
- package/src/projection/ui/ProjectionGroupingPickers.tsx +91 -0
- package/src/projection/ui/ProjectionMapControls.tsx +29 -32
- package/src/projection/ui/ProjectionMapLegend.tsx +1 -1
- package/src/projection/ui/ProjectionMapMore.tsx +14 -4
- package/src/projection/ui/ProjectionMapTab.tsx +27 -9
- package/src/projection/ui/ProjectionPairsMore.tsx +12 -21
- package/src/projection/ui/ProjectionPairsTab.tsx +5 -2
- package/src/projection/ui/ProjectionPanel.tsx +7 -3
- package/src/projection/ui/ProjectionReadout.tsx +28 -8
- package/src/projection/ui/ProjectionSpaceControls.tsx +20 -27
- package/src/projection/ui/ProjectionSpaceMore.tsx +12 -3
- package/src/projection/ui/ProjectionSpaceTab.tsx +23 -6
- package/src/projection/ui/ProjectionViewer.tsx +1 -0
- package/src/projection/ui/projectionBarReadings.ts +24 -8
- package/src/projection/ui/projectionBarSlots.tsx +10 -9
- package/src/projection/ui/projectionMapChoices.ts +71 -14
- package/src/projection/ui/projectionMapChrome.ts +55 -30
- package/src/projection/ui/projectionMapCorner.ts +67 -0
- package/src/projection/ui/projectionMapModel.ts +20 -59
- package/src/projection/ui/projectionMapView.ts +15 -8
- package/src/projection/ui/projectionSelectionSentence.ts +22 -0
- package/src/projection/ui/projectionStateApi.ts +57 -0
- package/src/projection/ui/projectionTabModels.ts +1 -1
- package/src/projection/ui/useProjectionState.ts +33 -37
- package/src/scatter/core/index.ts +1 -0
- package/src/scatter/core/pointShape.ts +80 -0
- package/src/scatter/ui/ScatterPlot.tsx +4 -1
- package/src/scatter/ui/ScatterPointLayer.tsx +39 -11
- package/src/scatter/ui/scatterFigureProps.ts +13 -0
- package/src/scatter/ui/scatterMarkGlyph.tsx +9 -1
- package/src/scatter3d/ui/ScatterCloud.tsx +3 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* What the map's
|
|
2
|
+
* What the map's settings offer, in the lengths the bar needs.
|
|
3
3
|
*
|
|
4
4
|
* The same choices are written twice — once as bare shares on a value menu
|
|
5
5
|
* whose own heading already says what they are shares of, and once as whole
|
|
@@ -8,14 +8,39 @@
|
|
|
8
8
|
*/
|
|
9
9
|
import type { OverlayOption } from '../../overlay/ui/OverlayRow.tsx';
|
|
10
10
|
import type { ProjectionCopy } from '../core/projectionCopy.ts';
|
|
11
|
-
import type {
|
|
11
|
+
import type { ProjectionOptions } from '../core/projectionOptions.ts';
|
|
12
|
+
import type { ProjectionGrouping } from '../core/projectionSamples.ts';
|
|
12
13
|
/**
|
|
13
|
-
* What the colour may stand for.
|
|
14
|
-
* @param
|
|
14
|
+
* What the colour may stand for: each grouping the samples carry, or nothing.
|
|
15
|
+
* @param groupings - The groupings the samples carry.
|
|
15
16
|
* @param uncoloured - What "the colour stands for nothing" reads.
|
|
16
|
-
* @returns The
|
|
17
|
+
* @returns The choices, in the order the groupings were handed in.
|
|
17
18
|
*/
|
|
18
|
-
export declare function projectionColourChoices(
|
|
19
|
+
export declare function projectionColourChoices(groupings: readonly ProjectionGrouping[], uncoloured: string): readonly OverlayOption[];
|
|
20
|
+
/**
|
|
21
|
+
* What the shape may stand for: each grouping the samples carry, or nothing.
|
|
22
|
+
*
|
|
23
|
+
* A grouping the colour already stands for is kept in the list but greyed, as
|
|
24
|
+
* is one of more groups than there are shapes, so the reader sees why it cannot
|
|
25
|
+
* be picked rather than wondering where it went.
|
|
26
|
+
* @param groupings - The groupings the samples carry.
|
|
27
|
+
* @param options - What the figure is showing, whose colour is taken.
|
|
28
|
+
* @param rows - How many rows there are, which is what a grouping is cut over.
|
|
29
|
+
* @param copy - The words the viewer writes.
|
|
30
|
+
* @returns The choices, in the order the groupings were handed in.
|
|
31
|
+
*/
|
|
32
|
+
export declare function projectionShapeChoices(groupings: readonly ProjectionGrouping[], options: ProjectionOptions, rows: number, copy: ProjectionCopy): readonly OverlayOption[];
|
|
33
|
+
/**
|
|
34
|
+
* What changes when the colour is given to another grouping.
|
|
35
|
+
*
|
|
36
|
+
* A grouping drawn as the shape that is picked for the colour swaps places
|
|
37
|
+
* with it rather than being dropped, so the reader never loses one of the two
|
|
38
|
+
* groupings they were comparing by trading them round.
|
|
39
|
+
* @param options - What the figure is showing.
|
|
40
|
+
* @param colorBy - The grouping picked for the colour.
|
|
41
|
+
* @returns The options that change.
|
|
42
|
+
*/
|
|
43
|
+
export declare function projectionColourPatch(options: ProjectionOptions, colorBy: string): Partial<ProjectionOptions>;
|
|
19
44
|
/**
|
|
20
45
|
* How large the outlines may be, written as bare shares.
|
|
21
46
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"projectionMapChoices.d.ts","sourceRoot":"","sources":["../../../src/projection/ui/projectionMapChoices.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iCAAiC,CAAC;AACrE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;
|
|
1
|
+
{"version":3,"file":"projectionMapChoices.d.ts","sourceRoot":"","sources":["../../../src/projection/ui/projectionMapChoices.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iCAAiC,CAAC;AACrE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAEhE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAC;AAEtE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,8BAA8B,CAAC;AAQvE;;;;;GAKG;AACH,wBAAgB,uBAAuB,CACrC,SAAS,EAAE,SAAS,kBAAkB,EAAE,EACxC,UAAU,EAAE,MAAM,GACjB,SAAS,aAAa,EAAE,CAK1B;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,sBAAsB,CACpC,SAAS,EAAE,SAAS,kBAAkB,EAAE,EACxC,OAAO,EAAE,iBAAiB,EAC1B,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,cAAc,GACnB,SAAS,aAAa,EAAE,CAmB1B;AAED;;;;;;;;;GASG;AACH,wBAAgB,qBAAqB,CACnC,OAAO,EAAE,iBAAiB,EAC1B,OAAO,EAAE,MAAM,GACd,OAAO,CAAC,iBAAiB,CAAC,CAI5B;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,wBAAwB,CACtC,OAAO,EAAE,iBAAiB,EAC1B,IAAI,EAAE,cAAc,GACnB,SAAS,aAAa,EAAE,CAW1B"}
|
|
@@ -1,23 +1,72 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* What the map's
|
|
2
|
+
* What the map's settings offer, in the lengths the bar needs.
|
|
3
3
|
*
|
|
4
4
|
* The same choices are written twice — once as bare shares on a value menu
|
|
5
5
|
* whose own heading already says what they are shares of, and once as whole
|
|
6
6
|
* sentences in the panel a reader opens with room to read them — so both are
|
|
7
7
|
* built here and neither file spells the other's list for itself.
|
|
8
8
|
*/
|
|
9
|
+
import { resolveProjectionShapes } from "../core/projectionGroupings.js";
|
|
10
|
+
import { NO_GROUPING } from "../core/projectionOptions.js";
|
|
9
11
|
import { ellipseChoices, ellipseCoverageText, ellipseSize, } from "./projectionEllipse.js";
|
|
10
12
|
/**
|
|
11
|
-
* What the colour may stand for.
|
|
12
|
-
* @param
|
|
13
|
+
* What the colour may stand for: each grouping the samples carry, or nothing.
|
|
14
|
+
* @param groupings - The groupings the samples carry.
|
|
13
15
|
* @param uncoloured - What "the colour stands for nothing" reads.
|
|
14
|
-
* @returns The
|
|
16
|
+
* @returns The choices, in the order the groupings were handed in.
|
|
15
17
|
*/
|
|
16
|
-
export function projectionColourChoices(
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
{ value:
|
|
20
|
-
|
|
18
|
+
export function projectionColourChoices(groupings, uncoloured) {
|
|
19
|
+
const choices = [];
|
|
20
|
+
for (const { id, label } of groupings)
|
|
21
|
+
choices.push({ value: id, label });
|
|
22
|
+
choices.push({ value: NO_GROUPING, label: uncoloured });
|
|
23
|
+
return choices;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* What the shape may stand for: each grouping the samples carry, or nothing.
|
|
27
|
+
*
|
|
28
|
+
* A grouping the colour already stands for is kept in the list but greyed, as
|
|
29
|
+
* is one of more groups than there are shapes, so the reader sees why it cannot
|
|
30
|
+
* be picked rather than wondering where it went.
|
|
31
|
+
* @param groupings - The groupings the samples carry.
|
|
32
|
+
* @param options - What the figure is showing, whose colour is taken.
|
|
33
|
+
* @param rows - How many rows there are, which is what a grouping is cut over.
|
|
34
|
+
* @param copy - The words the viewer writes.
|
|
35
|
+
* @returns The choices, in the order the groupings were handed in.
|
|
36
|
+
*/
|
|
37
|
+
export function projectionShapeChoices(groupings, options, rows, copy) {
|
|
38
|
+
const choices = [];
|
|
39
|
+
for (const grouping of groupings) {
|
|
40
|
+
const { id, label } = grouping;
|
|
41
|
+
const reason = id === options.colorBy
|
|
42
|
+
? copy.reason.shapeIsColour
|
|
43
|
+
: resolveProjectionShapes(grouping, rows) === null
|
|
44
|
+
? copy.reason.tooManyShapes
|
|
45
|
+
: undefined;
|
|
46
|
+
choices.push({
|
|
47
|
+
value: id,
|
|
48
|
+
label,
|
|
49
|
+
disabled: reason !== undefined,
|
|
50
|
+
title: reason,
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
choices.push({ value: NO_GROUPING, label: copy.bar.unshaped });
|
|
54
|
+
return choices;
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* What changes when the colour is given to another grouping.
|
|
58
|
+
*
|
|
59
|
+
* A grouping drawn as the shape that is picked for the colour swaps places
|
|
60
|
+
* with it rather than being dropped, so the reader never loses one of the two
|
|
61
|
+
* groupings they were comparing by trading them round.
|
|
62
|
+
* @param options - What the figure is showing.
|
|
63
|
+
* @param colorBy - The grouping picked for the colour.
|
|
64
|
+
* @returns The options that change.
|
|
65
|
+
*/
|
|
66
|
+
export function projectionColourPatch(options, colorBy) {
|
|
67
|
+
return colorBy !== NO_GROUPING && colorBy === options.shapeBy
|
|
68
|
+
? { colorBy, shapeBy: options.colorBy }
|
|
69
|
+
: { colorBy };
|
|
21
70
|
}
|
|
22
71
|
/**
|
|
23
72
|
* How large the outlines may be, written as bare shares.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"projectionMapChoices.js","sourceRoot":"","sources":["../../../src/projection/ui/projectionMapChoices.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;
|
|
1
|
+
{"version":3,"file":"projectionMapChoices.js","sourceRoot":"","sources":["../../../src/projection/ui/projectionMapChoices.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAIH,OAAO,EAAE,uBAAuB,EAAE,MAAM,gCAAgC,CAAC;AAEzE,OAAO,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAG3D,OAAO,EACL,cAAc,EACd,mBAAmB,EACnB,WAAW,GACZ,MAAM,wBAAwB,CAAC;AAEhC;;;;;GAKG;AACH,MAAM,UAAU,uBAAuB,CACrC,SAAwC,EACxC,UAAkB;IAElB,MAAM,OAAO,GAAoB,EAAE,CAAC;IACpC,KAAK,MAAM,EAAE,EAAE,EAAE,KAAK,EAAE,IAAI,SAAS;QAAE,OAAO,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,KAAK,EAAE,CAAC,CAAC;IAC1E,OAAO,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,WAAW,EAAE,KAAK,EAAE,UAAU,EAAE,CAAC,CAAC;IACxD,OAAO,OAAO,CAAC;AACjB,CAAC;AAED;;;;;;;;;;;GAWG;AACH,MAAM,UAAU,sBAAsB,CACpC,SAAwC,EACxC,OAA0B,EAC1B,IAAY,EACZ,IAAoB;IAEpB,MAAM,OAAO,GAAoB,EAAE,CAAC;IACpC,KAA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AC;QAC7D,OAAO,CAAC,IAAI,CAAC;YACX,KAAK,EAAE,MAAM,CAAC,KAAK;YACnB,KAAK,EAAE,KAAK,KAAK,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC,CAAC,KAAK;YACjD,KAAK,EAAE,MAAM,CAAC,KAAK;SACpB,CAAC,CAAC;IACL,CAAC;IACD,OAAO,OAAO,CAAC;AACjB,CAAC"}
|
|
@@ -11,7 +11,7 @@ import type { OverlayLegendEntry } from '../../overlay/ui/OverlayLegend.tsx';
|
|
|
11
11
|
import type { EllipseSize } from '../../scatter/core/confidenceEllipse.ts';
|
|
12
12
|
import type { ProjectionCopy } from '../core/projectionCopy.ts';
|
|
13
13
|
import type { ProjectionMarker } from '../core/projectionResult.ts';
|
|
14
|
-
import type { ResolvedProjectionGroups } from '../core/projectionSamples.ts';
|
|
14
|
+
import type { ResolvedProjectionGroups, ResolvedProjectionShapes } from '../core/projectionSamples.ts';
|
|
15
15
|
/** What the map's chrome is built from. */
|
|
16
16
|
interface ProjectionMapChromeInput {
|
|
17
17
|
/** The words the map writes, already merged over the defaults. */
|
|
@@ -20,6 +20,8 @@ interface ProjectionMapChromeInput {
|
|
|
20
20
|
groups: ResolvedProjectionGroups;
|
|
21
21
|
/** Whether colour stands for the group at all. */
|
|
22
22
|
colored: boolean;
|
|
23
|
+
/** The grouping the dots are shaped by, or `null` while they are all discs. */
|
|
24
|
+
shapes: ResolvedProjectionShapes | null;
|
|
23
25
|
/** How large the group outlines are, or `null` for none. */
|
|
24
26
|
ellipse: EllipseSize | null;
|
|
25
27
|
/** How many samples a group needs before it is outlined at all. */
|
|
@@ -70,13 +72,5 @@ export interface ProjectionMapChrome {
|
|
|
70
72
|
* @returns The legend's title and entries, and the standing caption.
|
|
71
73
|
*/
|
|
72
74
|
export declare function projectionMapChrome(input: ProjectionMapChromeInput): ProjectionMapChrome;
|
|
73
|
-
/**
|
|
74
|
-
* The sentence reporting what a gesture picked out.
|
|
75
|
-
* @param copy - The words the map writes.
|
|
76
|
-
* @param count - How many samples are selected.
|
|
77
|
-
* @param total - How many there are in all.
|
|
78
|
-
* @returns The sentence.
|
|
79
|
-
*/
|
|
80
|
-
export declare function projectionSelectionSentence(copy: ProjectionCopy, count: number, total: number): string;
|
|
81
75
|
export {};
|
|
82
76
|
//# sourceMappingURL=projectionMapChrome.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"projectionMapChrome.d.ts","sourceRoot":"","sources":["../../../src/projection/ui/projectionMapChrome.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;
|
|
1
|
+
{"version":3,"file":"projectionMapChrome.d.ts","sourceRoot":"","sources":["../../../src/projection/ui/projectionMapChrome.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,oCAAoC,CAAC;AAC7E,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yCAAyC,CAAC;AAE3E,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAChE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AACpE,OAAO,KAAK,EACV,wBAAwB,EACxB,wBAAwB,EACzB,MAAM,8BAA8B,CAAC;AAKtC,2CAA2C;AAC3C,UAAU,wBAAwB;IAChC,kEAAkE;IAClE,IAAI,EAAE,cAAc,CAAC;IACrB,0CAA0C;IAC1C,MAAM,EAAE,wBAAwB,CAAC;IACjC,kDAAkD;IAClD,OAAO,EAAE,OAAO,CAAC;IACjB,+EAA+E;IAC/E,MAAM,EAAE,wBAAwB,GAAG,IAAI,CAAC;IACxC,4DAA4D;IAC5D,OAAO,EAAE,WAAW,GAAG,IAAI,CAAC;IAC5B,mEAAmE;IACnE,aAAa,EAAE,MAAM,CAAC;IACtB,2DAA2D;IAC3D,cAAc,EAAE,OAAO,CAAC;IACxB,iDAAiD;IACjD,OAAO,EAAE,SAAS,gBAAgB,EAAE,CAAC;IACrC,sDAAsD;IACtD,WAAW,EAAE,MAAM,CAAC;IACpB,sCAAsC;IACtC,KAAK,EAAE,MAAM,CAAC;IACd;;;;;;OAMG;IACH,MAAM,CAAC,EAAE,KAAK,GAAG,OAAO,CAAC;CAC1B;AAED,sDAAsD;AACtD,MAAM,WAAW,mBAAmB;IAClC;;;;;;;OAOG;IACH,KAAK,EAAE,MAAM,CAAC;IACd,2DAA2D;IAC3D,OAAO,EAAE,kBAAkB,EAAE,CAAC;IAC9B,wDAAwD;IACxD,OAAO,EAAE,MAAM,CAAC;CACjB;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,mBAAmB,CACjC,KAAK,EAAE,wBAAwB,GAC9B,mBAAmB,CAuDrB"}
|
|
@@ -7,7 +7,6 @@
|
|
|
7
7
|
* only way a promise like "this outline covers 95 % of the group" stays
|
|
8
8
|
* honest as the controls around it change.
|
|
9
9
|
*/
|
|
10
|
-
import { formatInteger } from "../../format/core/numbers.js";
|
|
11
10
|
import { fillCopy } from "../core/fillCopy.js";
|
|
12
11
|
import { ellipseCoverageText } from "./projectionEllipse.js";
|
|
13
12
|
import { UNGROUPED_INK } from "./projectionMapModel.js";
|
|
@@ -25,6 +24,7 @@ import { UNGROUPED_INK } from "./projectionMapModel.js";
|
|
|
25
24
|
*/
|
|
26
25
|
export function projectionMapChrome(input) {
|
|
27
26
|
const { copy, groups, colored, ellipse, showGroupMeans, markers } = input;
|
|
27
|
+
const { shapes } = input;
|
|
28
28
|
const { minimumPoints, fittedCount, total, figure = 'map' } = input;
|
|
29
29
|
const entries = [];
|
|
30
30
|
const skipped = [];
|
|
@@ -51,6 +51,7 @@ export function projectionMapChrome(input) {
|
|
|
51
51
|
});
|
|
52
52
|
}
|
|
53
53
|
}
|
|
54
|
+
appendShapeEntries(entries, shapes);
|
|
54
55
|
appendMarkerEntries(entries, markers, groups);
|
|
55
56
|
const hollow = fittedCount < total;
|
|
56
57
|
if (hollow) {
|
|
@@ -62,43 +63,54 @@ export function projectionMapChrome(input) {
|
|
|
62
63
|
});
|
|
63
64
|
}
|
|
64
65
|
return {
|
|
65
|
-
title: legendTitle(copy, groups, colored),
|
|
66
|
+
title: legendTitle(copy, groups, colored, shapes),
|
|
66
67
|
entries,
|
|
67
68
|
caption: captionFor(copy, groups, colored, ellipse, skipped, hollow, figure),
|
|
68
69
|
};
|
|
69
70
|
}
|
|
70
71
|
/**
|
|
71
|
-
* The sentence
|
|
72
|
-
*
|
|
73
|
-
* @param count - How many samples are selected.
|
|
74
|
-
* @param total - How many there are in all.
|
|
75
|
-
* @returns The sentence.
|
|
76
|
-
*/
|
|
77
|
-
export function projectionSelectionSentence(copy, count, total) {
|
|
78
|
-
if (count === 0)
|
|
79
|
-
return copy.sentence.selectionNone;
|
|
80
|
-
return fillCopy(copy.sentence.selection, {
|
|
81
|
-
count: formatInteger(count),
|
|
82
|
-
total: formatInteger(total),
|
|
83
|
-
});
|
|
84
|
-
}
|
|
85
|
-
/**
|
|
86
|
-
* The sentence over the legend.
|
|
72
|
+
* The sentence over the legend, naming what the colour and the shape stand
|
|
73
|
+
* for.
|
|
87
74
|
*
|
|
88
|
-
* When
|
|
89
|
-
* names the shape channel: a legend naming no encoding at all is the one
|
|
90
|
-
* this title exists to prevent, and it is not fixed by leaving
|
|
75
|
+
* When neither stands for a grouping the entries left are all marks, so the
|
|
76
|
+
* title names the shape channel: a legend naming no encoding at all is the one
|
|
77
|
+
* fault this title exists to prevent, and it is not fixed by leaving it out.
|
|
91
78
|
* @param copy - The words the map writes.
|
|
92
79
|
* @param groups - The groups as the map colours them.
|
|
93
80
|
* @param colored - Whether colour stands for the group at all.
|
|
81
|
+
* @param shapes - The grouping the dots are shaped by, or `null`.
|
|
94
82
|
* @returns The title.
|
|
95
83
|
*/
|
|
96
|
-
function legendTitle(copy, groups, colored) {
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
84
|
+
function legendTitle(copy, groups, colored, shapes) {
|
|
85
|
+
const parts = [];
|
|
86
|
+
if (colored && groups.entries.length > 0) {
|
|
87
|
+
parts.push(fillCopy(copy.legend.mapNoEllipse, {
|
|
88
|
+
groups: groups.label.toLowerCase(),
|
|
89
|
+
}));
|
|
90
|
+
}
|
|
91
|
+
if (shapes !== null) {
|
|
92
|
+
parts.push(fillCopy(copy.legend.shapedBy, { shapes: shapes.label.toLowerCase() }));
|
|
93
|
+
}
|
|
94
|
+
return parts.length === 0 ? copy.legend.shapes : parts.join(' ');
|
|
95
|
+
}
|
|
96
|
+
/**
|
|
97
|
+
* One entry per shape, drawn in the muted ink: a colour on a shape's entry
|
|
98
|
+
* would claim a group of the colour grouping it does not stand for.
|
|
99
|
+
* @param entries - The legend, appended to in place.
|
|
100
|
+
* @param shapes - The grouping the dots are shaped by, or `null`.
|
|
101
|
+
*/
|
|
102
|
+
function appendShapeEntries(entries, shapes) {
|
|
103
|
+
if (shapes === null)
|
|
104
|
+
return;
|
|
105
|
+
for (const entry of shapes.entries) {
|
|
106
|
+
entries.push({
|
|
107
|
+
id: `shape-${entry.id}`,
|
|
108
|
+
label: entry.label,
|
|
109
|
+
color: SHAPE_INK,
|
|
110
|
+
shape: entry.shape,
|
|
111
|
+
count: entry.count,
|
|
112
|
+
});
|
|
113
|
+
}
|
|
102
114
|
}
|
|
103
115
|
function captionFor(copy, groups, colored, ellipse, skipped, hollow, figure) {
|
|
104
116
|
const solid = figure === 'space';
|
|
@@ -134,4 +146,6 @@ function appendMarkerEntries(entries, markers, groups) {
|
|
|
134
146
|
});
|
|
135
147
|
}
|
|
136
148
|
}
|
|
149
|
+
/** The ink a shape's entry is drawn in, the one the key uses for marks that name no colour. */
|
|
150
|
+
const SHAPE_INK = 'var(--text-muted)';
|
|
137
151
|
//# sourceMappingURL=projectionMapChrome.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"projectionMapChrome.js","sourceRoot":"","sources":["../../../src/projection/ui/projectionMapChrome.ts"],"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C;AACH,CAAC;AAED,+FAA+F;AAC/F,MAAM,SAAS,GAAG,mBAAmB,CAAC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Which corner of the map the floating key takes.
|
|
3
|
+
*
|
|
4
|
+
* It is a module of its own because it is the one piece of the map that has to
|
|
5
|
+
* know where the dots fall before anything is drawn over them, and it is all
|
|
6
|
+
* arithmetic that can be checked without rendering anything.
|
|
7
|
+
*/
|
|
8
|
+
import type { OverlayCorner } from '../../overlay/core/overlayPlacement.ts';
|
|
9
|
+
import type { ProjectionMapCloud } from './projectionMapModel.ts';
|
|
10
|
+
/**
|
|
11
|
+
* The corner of the map with the fewest dots under it.
|
|
12
|
+
*
|
|
13
|
+
* All four are offered. The chrome that asks is laid out inside the plot
|
|
14
|
+
* rectangle rather than over the figure's box, so no corner of it costs the
|
|
15
|
+
* reader an axis label, and the only thing left to weigh is how many samples
|
|
16
|
+
* each one would cover.
|
|
17
|
+
* @param cloud - Where every sample sits, in data units.
|
|
18
|
+
* @param xDomain - The range the horizontal axis covers.
|
|
19
|
+
* @param yDomain - The range the vertical axis covers.
|
|
20
|
+
* @param width - Width of the plot rectangle, in pixels.
|
|
21
|
+
* @param height - Its height.
|
|
22
|
+
* @returns The corner the card sits in.
|
|
23
|
+
*/
|
|
24
|
+
export declare function projectionMapCorner(cloud: ProjectionMapCloud, xDomain: readonly [number, number], yDomain: readonly [number, number], width: number, height: number): OverlayCorner;
|
|
25
|
+
//# sourceMappingURL=projectionMapCorner.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"projectionMapCorner.d.ts","sourceRoot":"","sources":["../../../src/projection/ui/projectionMapCorner.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,wCAAwC,CAAC;AAE5E,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAElE;;;;;;;;;;;;;GAaG;AACH,wBAAgB,mBAAmB,CACjC,KAAK,EAAE,kBAAkB,EACzB,OAAO,EAAE,SAAS,CAAC,MAAM,EAAE,MAAM,CAAC,EAClC,OAAO,EAAE,SAAS,CAAC,MAAM,EAAE,MAAM,CAAC,EAClC,KAAK,EAAE,MAAM,EACb,MAAM,EAAE,MAAM,GACb,aAAa,CAMf"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Which corner of the map the floating key takes.
|
|
3
|
+
*
|
|
4
|
+
* It is a module of its own because it is the one piece of the map that has to
|
|
5
|
+
* know where the dots fall before anything is drawn over them, and it is all
|
|
6
|
+
* arithmetic that can be checked without rendering anything.
|
|
7
|
+
*/
|
|
8
|
+
import { emptiestCorner } from "../../overlay/core/emptiestCorner.js";
|
|
9
|
+
/**
|
|
10
|
+
* The corner of the map with the fewest dots under it.
|
|
11
|
+
*
|
|
12
|
+
* All four are offered. The chrome that asks is laid out inside the plot
|
|
13
|
+
* rectangle rather than over the figure's box, so no corner of it costs the
|
|
14
|
+
* reader an axis label, and the only thing left to weigh is how many samples
|
|
15
|
+
* each one would cover.
|
|
16
|
+
* @param cloud - Where every sample sits, in data units.
|
|
17
|
+
* @param xDomain - The range the horizontal axis covers.
|
|
18
|
+
* @param yDomain - The range the vertical axis covers.
|
|
19
|
+
* @param width - Width of the plot rectangle, in pixels.
|
|
20
|
+
* @param height - Its height.
|
|
21
|
+
* @returns The corner the card sits in.
|
|
22
|
+
*/
|
|
23
|
+
export function projectionMapCorner(cloud, xDomain, yDomain, width, height) {
|
|
24
|
+
return emptiestCorner(placeAlong(cloud.x, xDomain, width, false), placeAlong(cloud.y, yDomain, height, true), { width, height, cardWidth: CARD_WIDTH, cardHeight: CARD_HEIGHT });
|
|
25
|
+
}
|
|
26
|
+
function placeAlong(values, domain, size, flip) {
|
|
27
|
+
const span = domain[1] - domain[0];
|
|
28
|
+
const factor = span === 0 ? 0 : size / span;
|
|
29
|
+
const pixels = new Float64Array(values.length);
|
|
30
|
+
for (let index = 0; index < values.length; index++) {
|
|
31
|
+
const along = ((values[index] ?? Number.NaN) - domain[0]) * factor;
|
|
32
|
+
pixels[index] = flip ? size - along : along;
|
|
33
|
+
}
|
|
34
|
+
return pixels;
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* How much of the plot the floating key is expected to cover.
|
|
38
|
+
*
|
|
39
|
+
* It is an estimate on purpose — the card has not been laid out when the
|
|
40
|
+
* corner is chosen — and it is the compact key's size rather than the roomier
|
|
41
|
+
* card the overlay domain assumes: a corner counted as three species wide
|
|
42
|
+
* would call a corner busy that the key never reaches.
|
|
43
|
+
*/
|
|
44
|
+
const CARD_WIDTH = 170;
|
|
45
|
+
const CARD_HEIGHT = 84;
|
|
46
|
+
//# sourceMappingURL=projectionMapCorner.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"projectionMapCorner.js","sourceRoot":"","sources":["../../../src/projection/ui/projectionMapCorner.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,cAAc,EAAE,MAAM,sCAAsC,CAAC;AAKtE;;;;;;;;;;;;;GAaG;AACH,MAAM,UAAU,mBAAmB,CACjC,KAAyB,EACzB,OAAkC,EAClC,OAAkC,EAClC,KAAa,EACb,MAAc;IAEd,OAAO,cAAc,CACnB,UAAU,CAAC,KAAK,CAAC,CAAC,EAAE,OAAO,EAAE,KAAK,EAAE,KAAK,CAAC,EAC1C,UAAU,CAAC,KAAK,CAAC,CAAC,EAAE,OAAO,EAAE,MAAM,EAAE,IAAI,CAAC,EAC1C,EAAE,KAAK,EAAE,MAAM,EAAE,SAAS,EAAE,UAAU,EAAE,UAAU,EAAE,WAAW,EAAE,CAClE,CAAC;AACJ,CAAC;AAED,SAAS,UAAU,CACjB,MAAoB,EACpB,MAAiC,EACjC,IAAY,EACZ,IAAa;IAEb,MAAM,IAAI,GAAG,MAAM,CAAC,CAAC,CAAC,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC;IACnC,MAAM,MAAM,GAAG,IAAI,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,GAAG,IAAI,CAAC;IAC5C,MAAM,MAAM,GAAG,IAAI,YAAY,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;IAC/C,KAAK,IAAI,KAAK,GAAG,CAAC,EAAE,KAAK,GAAG,MAAM,CAAC,MAAM,EAAE,KAAK,EAAE,EAAE,CAAC;QACnD,MAAM,KAAK,GAAG,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC,GAAG,MAAM,CAAC;QACnE,MAAM,CAAC,KAAK,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,IAAI,GAAG,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC;IAC9C,CAAC;IACD,OAAO,MAAM,CAAC;AAChB,CAAC;AAED;;;;;;;GAOG;AACH,MAAM,UAAU,GAAG,GAAG,CAAC;AACvB,MAAM,WAAW,GAAG,EAAE,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Where a map's samples land, and
|
|
2
|
+
* Where a map's samples land, and what a plot is handed to draw them.
|
|
3
3
|
*
|
|
4
4
|
* It sits beside the component rather than inside it because a plot has to
|
|
5
5
|
* know where its dots fall before it can decide where its controls may sit,
|
|
@@ -8,11 +8,11 @@
|
|
|
8
8
|
*/
|
|
9
9
|
import type { ChartViewport } from '../../chart/core/chartViewport.ts';
|
|
10
10
|
import type { MatrixLike } from '../../chart/core/matrix.ts';
|
|
11
|
-
import type {
|
|
11
|
+
import type { OverlaySampleShape } from '../../overlay/core/overlayMarks.ts';
|
|
12
12
|
import type { ScatterGroup } from '../../scatter/ui/scatterFigureProps.ts';
|
|
13
13
|
import type { ScatterMarker } from '../../scatter/ui/scatterPlotProps.ts';
|
|
14
14
|
import type { ProjectionMarker, ProjectionResult } from '../core/projectionResult.ts';
|
|
15
|
-
import type { ResolvedProjectionGroups } from '../core/projectionSamples.ts';
|
|
15
|
+
import type { ResolvedProjectionGroups, ResolvedProjectionShapes } from '../core/projectionSamples.ts';
|
|
16
16
|
/** Where every sample sits on the map, in the embedding's own units. */
|
|
17
17
|
export interface ProjectionMapCloud {
|
|
18
18
|
/** Horizontal coordinate of every sample, in row order. */
|
|
@@ -70,21 +70,6 @@ export declare function projectionMapDomain(scores: MatrixLike, column: number,
|
|
|
70
70
|
* @returns The frame, in the embedding's own units.
|
|
71
71
|
*/
|
|
72
72
|
export declare function projectionMapViewport(scores: MatrixLike, xColumn: number, yColumn: number, rows?: readonly number[], padding?: number): ChartViewport;
|
|
73
|
-
/**
|
|
74
|
-
* The corner of the map with the fewest dots under it.
|
|
75
|
-
*
|
|
76
|
-
* All four are offered. The chrome that asks is laid out inside the plot
|
|
77
|
-
* rectangle rather than over the figure's box, so no corner of it costs the
|
|
78
|
-
* reader an axis label, and the only thing left to weigh is how many samples
|
|
79
|
-
* each one would cover.
|
|
80
|
-
* @param cloud - Where every sample sits, in data units.
|
|
81
|
-
* @param xDomain - The range the horizontal axis covers.
|
|
82
|
-
* @param yDomain - The range the vertical axis covers.
|
|
83
|
-
* @param width - Width of the plot rectangle, in pixels.
|
|
84
|
-
* @param height - Its height.
|
|
85
|
-
* @returns The corner the card sits in.
|
|
86
|
-
*/
|
|
87
|
-
export declare function projectionMapCorner(cloud: ProjectionMapCloud, xDomain: readonly [number, number], yDomain: readonly [number, number], width: number, height: number): OverlayCorner;
|
|
88
73
|
/**
|
|
89
74
|
* The reference points of a result, placed on the two axes the map draws.
|
|
90
75
|
* @param markers - The reference points, in the embedding's own units.
|
|
@@ -100,6 +85,12 @@ export declare function projectionMapMarkers(markers: readonly ProjectionMarker[
|
|
|
100
85
|
* @returns One entry per group, in the order they are coloured.
|
|
101
86
|
*/
|
|
102
87
|
export declare function projectionScatterGroups(groups: ResolvedProjectionGroups): ScatterGroup[];
|
|
88
|
+
/**
|
|
89
|
+
* The shapes in the order a plot names them by index.
|
|
90
|
+
* @param shapes - The grouping the dots are shaped by, or `null`.
|
|
91
|
+
* @returns One shape per group, or nothing while every dot is a disc.
|
|
92
|
+
*/
|
|
93
|
+
export declare function projectionScatterShapes(shapes: ResolvedProjectionShapes | null): OverlaySampleShape[] | undefined;
|
|
103
94
|
/**
|
|
104
95
|
* What one axis of the map is called.
|
|
105
96
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"projectionMapModel.d.ts","sourceRoot":"","sources":["../../../src/projection/ui/projectionMapModel.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAOH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,mCAAmC,CAAC;AACvE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;
|
|
1
|
+
{"version":3,"file":"projectionMapModel.d.ts","sourceRoot":"","sources":["../../../src/projection/ui/projectionMapModel.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAOH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,mCAAmC,CAAC;AACvE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;AAC7D,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,oCAAoC,CAAC;AAC7E,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,wCAAwC,CAAC;AAC3E,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,sCAAsC,CAAC;AAC1E,OAAO,KAAK,EACV,gBAAgB,EAChB,gBAAgB,EACjB,MAAM,6BAA6B,CAAC;AACrC,OAAO,KAAK,EACV,wBAAwB,EACxB,wBAAwB,EACzB,MAAM,8BAA8B,CAAC;AAEtC,wEAAwE;AACxE,MAAM,WAAW,kBAAkB;IACjC,2DAA2D;IAC3D,CAAC,EAAE,YAAY,CAAC;IAChB,8DAA8D;IAC9D,CAAC,EAAE,YAAY,CAAC;CACjB;AAED;;;;;GAKG;AACH,eAAO,MAAM,aAAa,sBAAsB,CAAC;AAEjD;;;GAGG;AACH,eAAO,MAAM,sBAAsB,IAAI,CAAC;AAExC;;;;;;;;;;GAUG;AACH,wBAAgB,kBAAkB,CAChC,MAAM,EAAE,UAAU,EAClB,OAAO,EAAE,MAAM,EACf,OAAO,EAAE,MAAM,GACd,kBAAkB,CASpB;AAED;;;;;;;;;GASG;AACH,wBAAgB,mBAAmB,CACjC,MAAM,EAAE,UAAU,EAClB,MAAM,EAAE,MAAM,EACd,IAAI,CAAC,EAAE,SAAS,MAAM,EAAE,GACvB,SAAS,CAAC,MAAM,EAAE,MAAM,CAAC,CAI3B;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,qBAAqB,CACnC,MAAM,EAAE,UAAU,EAClB,OAAO,EAAE,MAAM,EACf,OAAO,EAAE,MAAM,EACf,IAAI,CAAC,EAAE,SAAS,MAAM,EAAE,EACxB,OAAO,SAAiB,GACvB,aAAa,CAKf;AAED;;;;;;;GAOG;AACH,wBAAgB,oBAAoB,CAClC,OAAO,EAAE,SAAS,gBAAgB,EAAE,EACpC,MAAM,EAAE,wBAAwB,EAChC,OAAO,EAAE,MAAM,EACf,OAAO,EAAE,MAAM,GACd,aAAa,EAAE,CAejB;AAED;;;;GAIG;AACH,wBAAgB,uBAAuB,CACrC,MAAM,EAAE,wBAAwB,GAC/B,YAAY,EAAE,CAMhB;AAED;;;;GAIG;AACH,wBAAgB,uBAAuB,CACrC,MAAM,EAAE,wBAAwB,GAAG,IAAI,GACtC,kBAAkB,EAAE,GAAG,SAAS,CAKlC;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,mBAAmB,CACjC,MAAM,EAAE,gBAAgB,EACxB,KAAK,EAAE,MAAM,GACZ,MAAM,GAAG,SAAS,CAIpB"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Where a map's samples land, and
|
|
2
|
+
* Where a map's samples land, and what a plot is handed to draw them.
|
|
3
3
|
*
|
|
4
4
|
* It sits beside the component rather than inside it because a plot has to
|
|
5
5
|
* know where its dots fall before it can decide where its controls may sit,
|
|
@@ -8,7 +8,6 @@
|
|
|
8
8
|
*/
|
|
9
9
|
import { chartColumnExtent, chartPadExtent, } from "../../chart/core/chartExtent.js";
|
|
10
10
|
import { chartAxisTitle } from "../../chart/core/chartLabels.js";
|
|
11
|
-
import { emptiestCorner } from "../../overlay/core/emptiestCorner.js";
|
|
12
11
|
/**
|
|
13
12
|
* A dot, a marker or an average that stands for no group at all.
|
|
14
13
|
*
|
|
@@ -77,23 +76,6 @@ export function projectionMapViewport(scores, xColumn, yColumn, rows, padding =
|
|
|
77
76
|
y: withRoom(projectionMapDomain(scores, yColumn, rows), padding),
|
|
78
77
|
};
|
|
79
78
|
}
|
|
80
|
-
/**
|
|
81
|
-
* The corner of the map with the fewest dots under it.
|
|
82
|
-
*
|
|
83
|
-
* All four are offered. The chrome that asks is laid out inside the plot
|
|
84
|
-
* rectangle rather than over the figure's box, so no corner of it costs the
|
|
85
|
-
* reader an axis label, and the only thing left to weigh is how many samples
|
|
86
|
-
* each one would cover.
|
|
87
|
-
* @param cloud - Where every sample sits, in data units.
|
|
88
|
-
* @param xDomain - The range the horizontal axis covers.
|
|
89
|
-
* @param yDomain - The range the vertical axis covers.
|
|
90
|
-
* @param width - Width of the plot rectangle, in pixels.
|
|
91
|
-
* @param height - Its height.
|
|
92
|
-
* @returns The corner the card sits in.
|
|
93
|
-
*/
|
|
94
|
-
export function projectionMapCorner(cloud, xDomain, yDomain, width, height) {
|
|
95
|
-
return emptiestCorner(placeAlong(cloud.x, xDomain, width, false), placeAlong(cloud.y, yDomain, height, true), { width, height, cardWidth: CARD_WIDTH, cardHeight: CARD_HEIGHT });
|
|
96
|
-
}
|
|
97
79
|
/**
|
|
98
80
|
* The reference points of a result, placed on the two axes the map draws.
|
|
99
81
|
* @param markers - The reference points, in the embedding's own units.
|
|
@@ -131,6 +113,19 @@ export function projectionScatterGroups(groups) {
|
|
|
131
113
|
}
|
|
132
114
|
return plotted;
|
|
133
115
|
}
|
|
116
|
+
/**
|
|
117
|
+
* The shapes in the order a plot names them by index.
|
|
118
|
+
* @param shapes - The grouping the dots are shaped by, or `null`.
|
|
119
|
+
* @returns One shape per group, or nothing while every dot is a disc.
|
|
120
|
+
*/
|
|
121
|
+
export function projectionScatterShapes(shapes) {
|
|
122
|
+
if (shapes === null)
|
|
123
|
+
return undefined;
|
|
124
|
+
const list = [];
|
|
125
|
+
for (const entry of shapes.entries)
|
|
126
|
+
list.push(entry.shape);
|
|
127
|
+
return list;
|
|
128
|
+
}
|
|
134
129
|
/**
|
|
135
130
|
* What one axis of the map is called.
|
|
136
131
|
*
|
|
@@ -152,26 +147,6 @@ function withRoom(domain, padding) {
|
|
|
152
147
|
const extent = chartPadExtent({ min: domain[0], max: domain[1] }, padding);
|
|
153
148
|
return [extent.min, extent.max];
|
|
154
149
|
}
|
|
155
|
-
function placeAlong(values, domain, size, flip) {
|
|
156
|
-
const span = domain[1] - domain[0];
|
|
157
|
-
const factor = span === 0 ? 0 : size / span;
|
|
158
|
-
const pixels = new Float64Array(values.length);
|
|
159
|
-
for (let index = 0; index < values.length; index++) {
|
|
160
|
-
const along = ((values[index] ?? Number.NaN) - domain[0]) * factor;
|
|
161
|
-
pixels[index] = flip ? size - along : along;
|
|
162
|
-
}
|
|
163
|
-
return pixels;
|
|
164
|
-
}
|
|
165
|
-
/**
|
|
166
|
-
* How much of the plot the floating key is expected to cover.
|
|
167
|
-
*
|
|
168
|
-
* It is an estimate on purpose — the card has not been laid out when the
|
|
169
|
-
* corner is chosen — and it is the compact key's size rather than the roomier
|
|
170
|
-
* card the overlay domain assumes: a corner counted as three species wide
|
|
171
|
-
* would call a corner busy that the key never reaches.
|
|
172
|
-
*/
|
|
173
|
-
const CARD_WIDTH = 170;
|
|
174
|
-
const CARD_HEIGHT = 84;
|
|
175
150
|
/** Room left around a framed selection, as a share of its own span. */
|
|
176
151
|
const SELECTION_ROOM = 0.1;
|
|
177
152
|
//# sourceMappingURL=projectionMapModel.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"projectionMapModel.js","sourceRoot":"","sources":["../../../src/projection/ui/projectionMapModel.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EACL,iBAAiB,EACjB,cAAc,GACf,MAAM,iCAAiC,CAAC;AACzC,OAAO,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAC;
|
|
1
|
+
{"version":3,"file":"projectionMapModel.js","sourceRoot":"","sources":["../../../src/projection/ui/projectionMapModel.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EACL,iBAAiB,EACjB,cAAc,GACf,MAAM,iCAAiC,CAAC;AACzC,OAAO,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAC;AAuBjE;;;;;GAKG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG,mBAAmB,CAAC;AAEjD;;;GAGG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC,CAAC;AAExC;;;;;;;;;;GAUG;AACH,MAAM,UAAU,kBAAkB,CAChC,MAAkB,EAClB,OAAe,EACf,OAAe;IAEf,MAAM,KAAK,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,MAAM,CAAC,IAAI,CAAC,CAAC;IACvC,MAAM,CAAC,GAAG,IAAI,YAAY,CAAC,KAAK,CAAC,CAAC;IAClC,MAAM,CAAC,GAAG,IAAI,YAAY,CAAC,KAAK,CAAC,CAAC;IAClC,KAAK,IAAI,GAAG,GAAG,CAAC,EAAE,GAAG,GAAG,KAAK,EAAE,GAAG,EAAE,EAAE,CAAC;QACrC,CAAC,CAAC,GAAG,CAAC,GAAG,MAAM,CAAC,GAAG,CAAC,GAAG,EAAE,OAAO,CAAC,CAAC;QAClC,CAAC,CAAC,GAAG,CAAC,GAAG,MAAM,CAAC,GAAG,CAAC,GAAG,EAAE,OAAO,CAAC,CAAC;IACpC,CAAC;IACD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AAS,QAAQ,CACf,MAAiC,EACjC,OAAe;IAEf,MAAM,MAAM,GAAG,cAAc,CAAC,EAAE,GAAG,EAAE,MAAM,CAAC,CAAC,CAAC,EAAE,GAAG,EAAE,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,OAAO,CAAC,CAAC;IAC3E,OAAO,CAAC,MAAM,CAAC,GAAG,EAAE,MAAM,CAAC,GAAG,CAAC,CAAC;AAClC,CAAC;AAED,uEAAuE;AACvE,MAAM,cAAc,GAAG,GAAG,CAAC"}
|
|
@@ -14,7 +14,7 @@ import type { OrbitCamera } from '../../scatter3d/core/orbitCamera.ts';
|
|
|
14
14
|
import type { ProjectionCopy } from '../core/projectionCopy.ts';
|
|
15
15
|
import type { ProjectionOptions } from '../core/projectionOptions.ts';
|
|
16
16
|
import type { ProjectionResult } from '../core/projectionResult.ts';
|
|
17
|
-
import type { ResolvedProjectionGroups } from '../core/projectionSamples.ts';
|
|
17
|
+
import type { ResolvedProjectionGroups, ResolvedProjectionShapes } from '../core/projectionSamples.ts';
|
|
18
18
|
import type { SelectionReport } from './ProjectionMapCaption.tsx';
|
|
19
19
|
import type { ProjectionMapChrome } from './projectionMapChrome.ts';
|
|
20
20
|
/** What {@link useProjectionMapView} needs. */
|
|
@@ -25,6 +25,8 @@ interface ProjectionMapViewInput {
|
|
|
25
25
|
copy: ProjectionCopy;
|
|
26
26
|
/** The groups as every figure of this viewer draws them. */
|
|
27
27
|
groups: ResolvedProjectionGroups;
|
|
28
|
+
/** The grouping the dots are shaped by, or `null` while they are all discs. */
|
|
29
|
+
shapes: ResolvedProjectionShapes | null;
|
|
28
30
|
/** Every option, already made safe against the result. */
|
|
29
31
|
options: ProjectionOptions;
|
|
30
32
|
/** The selected rows, as indices into the score matrix. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"projectionMapView.d.ts","sourceRoot":"","sources":["../../../src/projection/ui/projectionMapView.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAIH,OA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