@genome-spy/core 0.77.0 → 0.79.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/dist/bundle/{browser-KWU9rWZT.js → browser-CETrb2cm.js} +53 -33
- package/dist/bundle/esm-BdLYkz-m.js +248 -0
- package/dist/bundle/esm-BwiDsqSb.js +1367 -0
- package/dist/bundle/esm-CDFd1cjk.js +441 -0
- package/dist/bundle/{esm-CRMf_I9V.js → esm-CTUHLDbv.js} +30 -30
- package/dist/bundle/esm-Cx-EbkOj.js +1221 -0
- package/dist/bundle/esm-DlYGqi79.js +128 -0
- package/dist/bundle/{esm-BygJiwh0.js → esm-k9p3oHkt.js} +133 -158
- package/dist/bundle/{esm-CT3ygiMq.js → esm-zAZJQO6D.js} +226 -212
- package/dist/bundle/index.es.js +14102 -10810
- package/dist/bundle/index.js +109 -95
- package/dist/bundle/{parquetRead-DG_-F5j5.js → parquetRead-Cad1SOVV.js} +473 -399
- package/dist/schema.json +23788 -11049
- package/dist/src/config/axisConfig.d.ts +2 -2
- package/dist/src/config/axisConfig.d.ts.map +1 -1
- package/dist/src/config/axisConfig.js +28 -44
- package/dist/src/config/configLayers.d.ts +45 -0
- package/dist/src/config/configLayers.d.ts.map +1 -0
- package/dist/src/config/configLayers.js +110 -0
- package/dist/src/config/defaultConfig.d.ts.map +1 -1
- package/dist/src/config/defaultConfig.js +8 -1
- package/dist/src/config/defaults/legendDefaults.d.ts +14 -0
- package/dist/src/config/defaults/legendDefaults.d.ts.map +1 -0
- package/dist/src/config/defaults/legendDefaults.js +46 -0
- package/dist/src/config/defaults/titleDefaults.d.ts.map +1 -1
- package/dist/src/config/defaults/titleDefaults.js +26 -18
- package/dist/src/config/legendConfig.d.ts +11 -0
- package/dist/src/config/legendConfig.d.ts.map +1 -0
- package/dist/src/config/legendConfig.js +63 -0
- package/dist/src/config/styleUtils.d.ts +8 -2
- package/dist/src/config/styleUtils.d.ts.map +1 -1
- package/dist/src/config/styleUtils.js +25 -1
- package/dist/src/config/themes.d.ts.map +1 -1
- package/dist/src/config/themes.js +21 -2
- package/dist/src/config/titleConfig.d.ts.map +1 -1
- package/dist/src/config/titleConfig.js +2 -18
- package/dist/src/data/collector.d.ts.map +1 -1
- package/dist/src/data/collector.js +40 -18
- package/dist/src/data/flowInit.d.ts +6 -0
- package/dist/src/data/flowInit.d.ts.map +1 -1
- package/dist/src/data/flowInit.js +1 -1
- package/dist/src/data/flowNode.d.ts +32 -0
- package/dist/src/data/flowNode.d.ts.map +1 -1
- package/dist/src/data/flowNode.js +59 -0
- package/dist/src/data/sources/lazy/bamSource.d.ts +0 -1
- package/dist/src/data/sources/lazy/bamSource.d.ts.map +1 -1
- package/dist/src/data/sources/lazy/bamSource.js +39 -30
- package/dist/src/data/sources/lazy/bigBedSource.d.ts +0 -10
- package/dist/src/data/sources/lazy/bigBedSource.d.ts.map +1 -1
- package/dist/src/data/sources/lazy/bigBedSource.js +127 -62
- package/dist/src/data/sources/lazy/bigWigSource.d.ts +2 -2
- package/dist/src/data/sources/lazy/bigWigSource.d.ts.map +1 -1
- package/dist/src/data/sources/lazy/bigWigSource.js +234 -81
- package/dist/src/data/sources/lazy/gff3Source.d.ts +7 -3
- package/dist/src/data/sources/lazy/gff3Source.d.ts.map +1 -1
- package/dist/src/data/sources/lazy/gff3Source.js +7 -8
- package/dist/src/data/sources/lazy/indexedFastaSource.d.ts +1 -1
- package/dist/src/data/sources/lazy/indexedFastaSource.d.ts.map +1 -1
- package/dist/src/data/sources/lazy/indexedFastaSource.js +28 -19
- package/dist/src/data/sources/lazy/legendEntriesSource.d.ts +24 -0
- package/dist/src/data/sources/lazy/legendEntriesSource.d.ts.map +1 -0
- package/dist/src/data/sources/lazy/legendEntriesSource.js +217 -0
- package/dist/src/data/sources/lazy/legendGradientSource.d.ts +30 -0
- package/dist/src/data/sources/lazy/legendGradientSource.d.ts.map +1 -0
- package/dist/src/data/sources/lazy/legendGradientSource.js +388 -0
- package/dist/src/data/sources/lazy/mockLazySource.d.ts +4 -1
- package/dist/src/data/sources/lazy/mockLazySource.d.ts.map +1 -1
- package/dist/src/data/sources/lazy/mockLazySource.js +49 -4
- package/dist/src/data/sources/lazy/registerCoreLazySources.js +2 -0
- package/dist/src/data/sources/lazy/singleAxisWindowedSource.d.ts.map +1 -1
- package/dist/src/data/sources/lazy/singleAxisWindowedSource.js +3 -4
- package/dist/src/data/sources/lazy/tabixSource.d.ts +9 -4
- package/dist/src/data/sources/lazy/tabixSource.d.ts.map +1 -1
- package/dist/src/data/sources/lazy/tabixSource.js +201 -70
- package/dist/src/data/sources/lazy/tabixTsvSource.d.ts +2 -3
- package/dist/src/data/sources/lazy/tabixTsvSource.d.ts.map +1 -1
- package/dist/src/data/sources/lazy/tabixTsvSource.js +14 -12
- package/dist/src/data/sources/lazy/vcfSource.d.ts +7 -3
- package/dist/src/data/sources/lazy/vcfSource.d.ts.map +1 -1
- package/dist/src/data/sources/lazy/vcfSource.js +7 -8
- package/dist/src/data/sources/urlDescriptor.d.ts +165 -0
- package/dist/src/data/sources/urlDescriptor.d.ts.map +1 -0
- package/dist/src/data/sources/urlDescriptor.js +473 -0
- package/dist/src/data/sources/urlDescriptorController.d.ts +25 -0
- package/dist/src/data/sources/urlDescriptorController.d.ts.map +1 -0
- package/dist/src/data/sources/urlDescriptorController.js +72 -0
- package/dist/src/data/sources/urlDescriptorState.d.ts +47 -0
- package/dist/src/data/sources/urlDescriptorState.d.ts.map +1 -0
- package/dist/src/data/sources/urlDescriptorState.js +129 -0
- package/dist/src/data/sources/urlSource.d.ts.map +1 -1
- package/dist/src/data/sources/urlSource.js +101 -61
- package/dist/src/data/transforms/packLegendLabels.d.ts +21 -0
- package/dist/src/data/transforms/packLegendLabels.d.ts.map +1 -0
- package/dist/src/data/transforms/packLegendLabels.js +189 -0
- package/dist/src/data/transforms/transformFactory.d.ts.map +1 -1
- package/dist/src/data/transforms/transformFactory.js +4 -0
- package/dist/src/data/transforms/truncateText.d.ts +27 -0
- package/dist/src/data/transforms/truncateText.d.ts.map +1 -0
- package/dist/src/data/transforms/truncateText.js +94 -0
- package/dist/src/debug/dataflowDebugSnapshot.d.ts +58 -0
- package/dist/src/debug/dataflowDebugSnapshot.d.ts.map +1 -0
- package/dist/src/debug/dataflowDebugSnapshot.js +159 -0
- package/dist/src/debug/markDebugSnapshot.d.ts +54 -0
- package/dist/src/debug/markDebugSnapshot.d.ts.map +1 -0
- package/dist/src/debug/markDebugSnapshot.js +100 -0
- package/dist/src/debug/paramDebugSnapshot.d.ts +53 -0
- package/dist/src/debug/paramDebugSnapshot.d.ts.map +1 -0
- package/dist/src/debug/paramDebugSnapshot.js +86 -0
- package/dist/src/debug/resolutionDebugSnapshot.d.ts +155 -0
- package/dist/src/debug/resolutionDebugSnapshot.d.ts.map +1 -0
- package/dist/src/debug/resolutionDebugSnapshot.js +291 -0
- package/dist/src/debug/valuePreview.d.ts +9 -0
- package/dist/src/debug/valuePreview.d.ts.map +1 -0
- package/dist/src/debug/valuePreview.js +57 -0
- package/dist/src/debug/viewDebugSnapshot.d.ts +131 -0
- package/dist/src/debug/viewDebugSnapshot.d.ts.map +1 -0
- package/dist/src/debug/viewDebugSnapshot.js +390 -0
- package/dist/src/embedFactory.d.ts.map +1 -1
- package/dist/src/embedFactory.js +6 -1
- package/dist/src/encoder/encoder.d.ts +2 -2
- package/dist/src/encoder/encoder.d.ts.map +1 -1
- package/dist/src/encoder/encoder.js +5 -4
- package/dist/src/fonts/bmFontManager.d.ts +1 -1
- package/dist/src/fonts/bmFontManager.d.ts.map +1 -1
- package/dist/src/fonts/bmFontManager.js +45 -10
- package/dist/src/fonts/textMetrics.d.ts +69 -0
- package/dist/src/fonts/textMetrics.d.ts.map +1 -0
- package/dist/src/fonts/textMetrics.js +73 -0
- package/dist/src/genomeSpy/headlessBootstrap.d.ts.map +1 -1
- package/dist/src/genomeSpy/headlessBootstrap.js +8 -0
- package/dist/src/genomeSpy/interactionController.d.ts +4 -1
- package/dist/src/genomeSpy/interactionController.d.ts.map +1 -1
- package/dist/src/genomeSpy/interactionController.js +57 -13
- package/dist/src/genomeSpy/renderCoordinator.d.ts.map +1 -1
- package/dist/src/genomeSpy/renderCoordinator.js +25 -3
- package/dist/src/genomeSpy/viewDataInit.d.ts +14 -0
- package/dist/src/genomeSpy/viewDataInit.d.ts.map +1 -1
- package/dist/src/genomeSpy/viewDataInit.js +45 -8
- package/dist/src/genomeSpyBase.d.ts +6 -0
- package/dist/src/genomeSpyBase.d.ts.map +1 -1
- package/dist/src/genomeSpyBase.js +25 -4
- package/dist/src/gl/glslScaleGenerator.d.ts +17 -0
- package/dist/src/gl/glslScaleGenerator.d.ts.map +1 -1
- package/dist/src/gl/glslScaleGenerator.js +39 -2
- package/dist/src/gl/includes/common.glsl.js +1 -1
- package/dist/src/gl/vertexRangeIndex.d.ts.map +1 -1
- package/dist/src/gl/vertexRangeIndex.js +4 -2
- package/dist/src/gl/webGLHelper.d.ts +1 -1
- package/dist/src/gl/webGLHelper.d.ts.map +1 -1
- package/dist/src/gl/webGLHelper.js +13 -8
- package/dist/src/marks/__snapshots__/shaderSnapshot.test.js.snap +140 -3
- package/dist/src/marks/mark.d.ts +47 -4
- package/dist/src/marks/mark.d.ts.map +1 -1
- package/dist/src/marks/mark.js +158 -54
- package/dist/src/marks/point.d.ts.map +1 -1
- package/dist/src/marks/point.js +4 -0
- package/dist/src/marks/point.vertex.glsl.js +1 -1
- package/dist/src/marks/text.d.ts +1 -1
- package/dist/src/marks/text.d.ts.map +1 -1
- package/dist/src/marks/text.js +2 -7
- package/dist/src/marks/text.vertex.glsl.js +1 -1
- package/dist/src/paramRuntime/paramUtils.d.ts +43 -9
- package/dist/src/paramRuntime/paramUtils.d.ts.map +1 -1
- package/dist/src/paramRuntime/paramUtils.js +61 -1
- package/dist/src/paramRuntime/viewParamRuntime.d.ts +32 -0
- package/dist/src/paramRuntime/viewParamRuntime.d.ts.map +1 -1
- package/dist/src/paramRuntime/viewParamRuntime.js +63 -0
- package/dist/src/scales/axisResolution.d.ts +35 -0
- package/dist/src/scales/axisResolution.d.ts.map +1 -1
- package/dist/src/scales/axisResolution.js +115 -7
- package/dist/src/scales/domainExpressions.d.ts +21 -0
- package/dist/src/scales/domainExpressions.d.ts.map +1 -0
- package/dist/src/scales/domainExpressions.js +43 -0
- package/dist/src/scales/domainPlanner.d.ts +12 -1
- package/dist/src/scales/domainPlanner.d.ts.map +1 -1
- package/dist/src/scales/domainPlanner.js +55 -36
- package/dist/src/scales/legendResolution.d.ts +83 -0
- package/dist/src/scales/legendResolution.d.ts.map +1 -0
- package/dist/src/scales/legendResolution.js +461 -0
- package/dist/src/scales/scaleInstanceManager.d.ts +1 -0
- package/dist/src/scales/scaleInstanceManager.d.ts.map +1 -1
- package/dist/src/scales/scaleInstanceManager.js +5 -0
- package/dist/src/scales/scalePropsResolver.d.ts +6 -1
- package/dist/src/scales/scalePropsResolver.d.ts.map +1 -1
- package/dist/src/scales/scalePropsResolver.js +35 -10
- package/dist/src/scales/scaleResolution.d.ts +52 -0
- package/dist/src/scales/scaleResolution.d.ts.map +1 -1
- package/dist/src/scales/scaleResolution.js +195 -16
- package/dist/src/scales/scaleRules.d.ts +10 -0
- package/dist/src/scales/scaleRules.d.ts.map +1 -1
- package/dist/src/scales/scaleRules.js +38 -1
- package/dist/src/scales/viewLevelGuideConfig.d.ts +53 -0
- package/dist/src/scales/viewLevelGuideConfig.d.ts.map +1 -0
- package/dist/src/scales/viewLevelGuideConfig.js +224 -0
- package/dist/src/scales/viewLevelScaleConfig.d.ts +45 -0
- package/dist/src/scales/viewLevelScaleConfig.d.ts.map +1 -0
- package/dist/src/scales/viewLevelScaleConfig.js +149 -0
- package/dist/src/spec/axis.d.ts +109 -3
- package/dist/src/spec/channel.d.ts +23 -4
- package/dist/src/spec/config.d.ts +59 -4
- package/dist/src/spec/data.d.ts +177 -17
- package/dist/src/spec/legend.d.ts +246 -0
- package/dist/src/spec/mark.d.ts +16 -4
- package/dist/src/spec/scale.d.ts +19 -6
- package/dist/src/spec/title.d.ts +58 -1
- package/dist/src/spec/transform.d.ts +149 -0
- package/dist/src/spec/view.d.ts +50 -6
- package/dist/src/styles/genome-spy.css +4 -1
- package/dist/src/styles/genome-spy.css.d.ts +1 -1
- package/dist/src/styles/genome-spy.css.d.ts.map +1 -1
- package/dist/src/styles/genome-spy.css.js +4 -1
- package/dist/src/types/embedApi.d.ts +262 -6
- package/dist/src/types/rendering.d.ts +19 -3
- package/dist/src/types/viewContext.d.ts +18 -2
- package/dist/src/utils/arrayUtils.d.ts +11 -0
- package/dist/src/utils/arrayUtils.d.ts.map +1 -1
- package/dist/src/utils/arrayUtils.js +23 -0
- package/dist/src/utils/suspension.d.ts +17 -0
- package/dist/src/utils/suspension.d.ts.map +1 -0
- package/dist/src/utils/suspension.js +41 -0
- package/dist/src/utils/ui/tooltip.d.ts +4 -0
- package/dist/src/utils/ui/tooltip.d.ts.map +1 -1
- package/dist/src/utils/ui/tooltip.js +35 -10
- package/dist/src/view/axisGridView.d.ts.map +1 -1
- package/dist/src/view/axisGridView.js +1 -4
- package/dist/src/view/axisView.d.ts +18 -2
- package/dist/src/view/axisView.d.ts.map +1 -1
- package/dist/src/view/axisView.js +180 -75
- package/dist/src/view/concatView.d.ts +10 -2
- package/dist/src/view/concatView.d.ts.map +1 -1
- package/dist/src/view/concatView.js +46 -9
- package/dist/src/view/containerMutationHelper.d.ts +20 -1
- package/dist/src/view/containerMutationHelper.d.ts.map +1 -1
- package/dist/src/view/containerMutationHelper.js +203 -32
- package/dist/src/view/facetView.d.ts +1 -1
- package/dist/src/view/gridView/gridChild.d.ts +54 -4
- package/dist/src/view/gridView/gridChild.d.ts.map +1 -1
- package/dist/src/view/gridView/gridChild.js +301 -120
- package/dist/src/view/gridView/gridChildLegends.d.ts +57 -0
- package/dist/src/view/gridView/gridChildLegends.d.ts.map +1 -0
- package/dist/src/view/gridView/gridChildLegends.js +503 -0
- package/dist/src/view/gridView/gridView.d.ts +25 -0
- package/dist/src/view/gridView/gridView.d.ts.map +1 -1
- package/dist/src/view/gridView/gridView.js +454 -78
- package/dist/src/view/gridView/legendLayout.d.ts +26 -0
- package/dist/src/view/gridView/legendLayout.d.ts.map +1 -0
- package/dist/src/view/gridView/legendLayout.js +111 -0
- package/dist/src/view/gridView/scrollbar.d.ts.map +1 -1
- package/dist/src/view/gridView/scrollbar.js +1 -4
- package/dist/src/view/gridView/selectionRect.d.ts.map +1 -1
- package/dist/src/view/gridView/selectionRect.js +1 -4
- package/dist/src/view/gridView/separatorView.d.ts.map +1 -1
- package/dist/src/view/gridView/separatorView.js +1 -4
- package/dist/src/view/layerView.d.ts +9 -2
- package/dist/src/view/layerView.d.ts.map +1 -1
- package/dist/src/view/layerView.js +18 -1
- package/dist/src/view/layout/flexLayout.d.ts +20 -4
- package/dist/src/view/layout/flexLayout.d.ts.map +1 -1
- package/dist/src/view/layout/flexLayout.js +331 -31
- package/dist/src/view/layout/rectangle.d.ts +14 -0
- package/dist/src/view/layout/rectangle.d.ts.map +1 -1
- package/dist/src/view/layout/rectangle.js +40 -0
- package/dist/src/view/legend/legendEntries.d.ts +20 -0
- package/dist/src/view/legend/legendEntries.d.ts.map +1 -0
- package/dist/src/view/legend/legendEntries.js +21 -0
- package/dist/src/view/legendView.d.ts +134 -0
- package/dist/src/view/legendView.d.ts.map +1 -0
- package/dist/src/view/legendView.js +1611 -0
- package/dist/src/view/renderingContext/bufferedViewRenderingContext.d.ts.map +1 -1
- package/dist/src/view/renderingContext/bufferedViewRenderingContext.js +26 -4
- package/dist/src/view/renderingContext/clipOptions.d.ts +44 -0
- package/dist/src/view/renderingContext/clipOptions.d.ts.map +1 -0
- package/dist/src/view/renderingContext/clipOptions.js +140 -0
- package/dist/src/view/renderingContext/simpleViewRenderingContext.d.ts.map +1 -1
- package/dist/src/view/renderingContext/simpleViewRenderingContext.js +12 -1
- package/dist/src/view/resolutionPlanner.d.ts +2 -1
- package/dist/src/view/resolutionPlanner.d.ts.map +1 -1
- package/dist/src/view/resolutionPlanner.js +89 -25
- package/dist/src/view/testUtils.d.ts +4 -2
- package/dist/src/view/testUtils.d.ts.map +1 -1
- package/dist/src/view/testUtils.js +29 -7
- package/dist/src/view/titleView.d.ts +37 -0
- package/dist/src/view/titleView.d.ts.map +1 -0
- package/dist/src/view/titleView.js +584 -0
- package/dist/src/view/unitView.d.ts +3 -3
- package/dist/src/view/unitView.d.ts.map +1 -1
- package/dist/src/view/unitView.js +3 -2
- package/dist/src/view/view.d.ts +25 -24
- package/dist/src/view/view.d.ts.map +1 -1
- package/dist/src/view/view.js +121 -16
- package/dist/src/view/viewFactory.d.ts +2 -5
- package/dist/src/view/viewFactory.d.ts.map +1 -1
- package/dist/src/view/viewFactory.js +1 -2
- package/dist/src/view/viewIdentityRegistry.d.ts +37 -0
- package/dist/src/view/viewIdentityRegistry.d.ts.map +1 -0
- package/dist/src/view/viewIdentityRegistry.js +71 -0
- package/dist/src/view/viewMutationAcidTestUtils.d.ts +112 -0
- package/dist/src/view/viewMutationAcidTestUtils.d.ts.map +1 -0
- package/dist/src/view/viewMutationAcidTestUtils.js +234 -0
- package/dist/src/view/viewMutationApi.d.ts +42 -0
- package/dist/src/view/viewMutationApi.d.ts.map +1 -0
- package/dist/src/view/viewMutationApi.js +811 -0
- package/dist/src/view/viewSelectors.d.ts +10 -0
- package/dist/src/view/viewSelectors.d.ts.map +1 -1
- package/dist/src/view/viewSelectors.js +23 -1
- package/package.json +4 -4
- package/dist/bundle/esm-0dYHNV_D.js +0 -121
- package/dist/bundle/esm-C49STiCR.js +0 -1248
- package/dist/bundle/esm-CscjKVDc.js +0 -1426
- package/dist/bundle/esm-CuMSzCHy.js +0 -298
- package/dist/bundle/esm-DMXpJXM4.js +0 -369
- package/dist/src/view/title.d.ts +0 -13
- package/dist/src/view/title.d.ts.map +0 -1
- package/dist/src/view/title.js +0 -154
- /package/dist/bundle/{AbortablePromiseCache-3gHJdF3E.js → AbortablePromiseCache-BTmAcN-t.js} +0 -0
- /package/dist/bundle/{esm-CuVa5T98.js → esm-VvpZ9hsq.js} +0 -0
- /package/dist/bundle/{chunk-DmhlhrBa.js → rolldown-runtime-Dy4uBu1J.js} +0 -0
|
@@ -11,6 +11,8 @@ import {
|
|
|
11
11
|
import { Scale, SchemeParams } from "./scale.js";
|
|
12
12
|
import { Title } from "./title.js";
|
|
13
13
|
import { ViewBackgroundProps } from "./decoration.js";
|
|
14
|
+
import { LegendConfig } from "./legend.js";
|
|
15
|
+
import { Step } from "./view.js";
|
|
14
16
|
|
|
15
17
|
export type BuiltInThemeName =
|
|
16
18
|
| "genomespy"
|
|
@@ -20,7 +22,44 @@ export type BuiltInThemeName =
|
|
|
20
22
|
| "fivethirtyeight"
|
|
21
23
|
| "urbaninstitute";
|
|
22
24
|
|
|
23
|
-
export
|
|
25
|
+
export interface ViewConfig extends ViewBackgroundProps {
|
|
26
|
+
/**
|
|
27
|
+
* The default width when the view has a continuous x scale.
|
|
28
|
+
*
|
|
29
|
+
* __Default value:__ `"container"`
|
|
30
|
+
*/
|
|
31
|
+
continuousWidth?: number;
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* The default width when the view has a discrete x scale or no x scale.
|
|
35
|
+
* This may be a fixed width or a step size for each discrete domain value.
|
|
36
|
+
*
|
|
37
|
+
* __Default value:__ `"container"`
|
|
38
|
+
*/
|
|
39
|
+
discreteWidth?: number | Step;
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* The default height when the view has a continuous y scale.
|
|
43
|
+
*
|
|
44
|
+
* __Default value:__ `"container"`
|
|
45
|
+
*/
|
|
46
|
+
continuousHeight?: number;
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* The default height when the view has a discrete y scale or no y scale.
|
|
50
|
+
* This may be a fixed height or a step size for each discrete domain value.
|
|
51
|
+
*
|
|
52
|
+
* __Default value:__ `"container"`
|
|
53
|
+
*/
|
|
54
|
+
discreteHeight?: number | Step;
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* Default step size for discrete view sizes.
|
|
58
|
+
*
|
|
59
|
+
* __Default value:__ none
|
|
60
|
+
*/
|
|
61
|
+
step?: number;
|
|
62
|
+
}
|
|
24
63
|
|
|
25
64
|
export type MarkConfig = Partial<Omit<MarkPropsBase, "type">>;
|
|
26
65
|
|
|
@@ -137,7 +176,9 @@ type CombinedStyleConfig = MergeProps<
|
|
|
137
176
|
MergeProps<MergeProps<LinkConfig, AxisConfig>, TitleConfig>
|
|
138
177
|
>;
|
|
139
178
|
|
|
140
|
-
export type StyleConfig = Partial<
|
|
179
|
+
export type StyleConfig = Partial<
|
|
180
|
+
MergeProps<CombinedStyleConfig, LegendConfig>
|
|
181
|
+
>;
|
|
141
182
|
|
|
142
183
|
export interface GenomeSpyConfig {
|
|
143
184
|
/**
|
|
@@ -186,6 +227,20 @@ export interface GenomeSpyConfig {
|
|
|
186
227
|
*/
|
|
187
228
|
axis?: AxisConfig;
|
|
188
229
|
|
|
230
|
+
/**
|
|
231
|
+
* Defaults shared by all legends. Set `disable` to `true` to suppress
|
|
232
|
+
* automatic legend creation by default.
|
|
233
|
+
*/
|
|
234
|
+
legend?: LegendConfig;
|
|
235
|
+
|
|
236
|
+
/**
|
|
237
|
+
* Defaults for legends of track-like views that use `index` or `locus`
|
|
238
|
+
* scales on the x channel.
|
|
239
|
+
*
|
|
240
|
+
* __Default value:__ `{ "style": "track-bottom" }`
|
|
241
|
+
*/
|
|
242
|
+
legendTrack?: LegendConfig;
|
|
243
|
+
|
|
189
244
|
/**
|
|
190
245
|
* Defaults for x axes.
|
|
191
246
|
*/
|
|
@@ -257,8 +312,8 @@ export interface GenomeSpyConfig {
|
|
|
257
312
|
title?: TitleConfig;
|
|
258
313
|
|
|
259
314
|
/**
|
|
260
|
-
* Named reusable style buckets that marks, axes, titles, and
|
|
261
|
-
* reference through their `style` properties.
|
|
315
|
+
* Named reusable style buckets that marks, axes, legends, titles, and
|
|
316
|
+
* views can reference through their `style` properties.
|
|
262
317
|
*/
|
|
263
318
|
style?: Record<string, StyleConfig>;
|
|
264
319
|
}
|
package/dist/src/spec/data.d.ts
CHANGED
|
@@ -12,7 +12,13 @@
|
|
|
12
12
|
* Constants and utilities for data.
|
|
13
13
|
*/
|
|
14
14
|
import { Axis } from "./axis.js";
|
|
15
|
-
import {
|
|
15
|
+
import {
|
|
16
|
+
ChannelWithScale,
|
|
17
|
+
FieldName,
|
|
18
|
+
PrimaryPositionalChannel,
|
|
19
|
+
Scalar,
|
|
20
|
+
Type as ChannelType,
|
|
21
|
+
} from "./channel.js";
|
|
16
22
|
import { ExprRef } from "./parameter.js";
|
|
17
23
|
|
|
18
24
|
export type ParseValue =
|
|
@@ -172,14 +178,82 @@ export interface UrlList {
|
|
|
172
178
|
type?: "json" | "csv" | "tsv";
|
|
173
179
|
}
|
|
174
180
|
|
|
181
|
+
export interface UrlTemplate {
|
|
182
|
+
/**
|
|
183
|
+
* URL template. The value from `values` is substituted for the placeholder
|
|
184
|
+
* named by `field`, for example `{sample}`.
|
|
185
|
+
*/
|
|
186
|
+
template: string;
|
|
187
|
+
|
|
188
|
+
/**
|
|
189
|
+
* Values used for template expansion. Duplicate resolved URLs are loaded
|
|
190
|
+
* once. An ExprRef can reference reactive parameters such as
|
|
191
|
+
* `visibleSamples`.
|
|
192
|
+
*/
|
|
193
|
+
values: Scalar[] | ExprRef;
|
|
194
|
+
|
|
195
|
+
/**
|
|
196
|
+
* Field name used as the template placeholder and as the datum field
|
|
197
|
+
* attached to loaded rows.
|
|
198
|
+
*/
|
|
199
|
+
field: FieldName;
|
|
200
|
+
|
|
201
|
+
/**
|
|
202
|
+
* Whether to attach the template value to each loaded datum using `field`
|
|
203
|
+
* as the datum field name. Disable this when the expanded URL identifies
|
|
204
|
+
* only a file partition and the loaded data already contains the relevant
|
|
205
|
+
* identifiers.
|
|
206
|
+
*
|
|
207
|
+
* __Default value:__ `true`
|
|
208
|
+
*/
|
|
209
|
+
attach?: boolean;
|
|
210
|
+
|
|
211
|
+
/**
|
|
212
|
+
* Maximum number of distinct resolved values to load. If the limit is
|
|
213
|
+
* exceeded, the source loads no data.
|
|
214
|
+
*/
|
|
215
|
+
maxValues?: number;
|
|
216
|
+
|
|
217
|
+
/**
|
|
218
|
+
* Behavior when loading an expanded URL fails. The default `"error"`
|
|
219
|
+
* fails the data source. Use `"skip"` when some expanded URLs are expected
|
|
220
|
+
* to be unavailable, for example when data files for some patients have
|
|
221
|
+
* not been generated yet.
|
|
222
|
+
*
|
|
223
|
+
* __Default value:__ `"error"`
|
|
224
|
+
*/
|
|
225
|
+
onLoadError?: "error" | "skip";
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
export interface IndexUrlTemplate {
|
|
229
|
+
/**
|
|
230
|
+
* URL template for index files. Uses the same values and field placeholder
|
|
231
|
+
* as the `url` template.
|
|
232
|
+
*/
|
|
233
|
+
template: string;
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
export type UrlSourceRef = string | string[] | ExprRef | UrlList | UrlTemplate;
|
|
237
|
+
|
|
238
|
+
export type SingleUrlSourceRef = string | ExprRef | UrlTemplate;
|
|
239
|
+
|
|
240
|
+
export type MultiUrlSourceRef = string | string[] | ExprRef | UrlTemplate;
|
|
241
|
+
|
|
242
|
+
export type IndexUrlSourceRef = string | ExprRef | IndexUrlTemplate;
|
|
243
|
+
|
|
175
244
|
export interface UrlData extends DataBase {
|
|
176
245
|
/**
|
|
177
|
-
* An URL
|
|
246
|
+
* An URL, a list of URLs, or a URL expansion definition from which to load
|
|
247
|
+
* the data set.
|
|
248
|
+
*
|
|
249
|
+
* A URL template can expand values from an ExprRef and attach the expanded
|
|
250
|
+
* value as a field to loaded rows.
|
|
251
|
+
*
|
|
178
252
|
* Gzip-compressed resources are decompressed transparently when the URL,
|
|
179
253
|
* MIME type, or payload indicates gzip content. Use the `format.type`
|
|
180
254
|
* property to ensure the loaded data is correctly parsed.
|
|
181
255
|
*/
|
|
182
|
-
url:
|
|
256
|
+
url: UrlSourceRef;
|
|
183
257
|
}
|
|
184
258
|
|
|
185
259
|
export interface InlineData extends DataBase {
|
|
@@ -263,6 +337,9 @@ export interface LazyData {
|
|
|
263
337
|
|
|
264
338
|
export type LazyDataParams =
|
|
265
339
|
| AxisTicksData
|
|
340
|
+
| LegendEntriesData
|
|
341
|
+
| LegendGradientData
|
|
342
|
+
| LegendGradientTicksData
|
|
266
343
|
| AxisGenomeData
|
|
267
344
|
| IndexedFastaData
|
|
268
345
|
| BigWigData
|
|
@@ -312,6 +389,80 @@ export interface AxisTicksData {
|
|
|
312
389
|
channel: PrimaryPositionalChannel;
|
|
313
390
|
}
|
|
314
391
|
|
|
392
|
+
/**
|
|
393
|
+
* Internal data source for generated legend entries.
|
|
394
|
+
*
|
|
395
|
+
* @internal
|
|
396
|
+
*/
|
|
397
|
+
export interface LegendEntriesData {
|
|
398
|
+
type: "legendEntries";
|
|
399
|
+
|
|
400
|
+
/** Which channel's scale domain to use */
|
|
401
|
+
channel: ChannelWithScale;
|
|
402
|
+
|
|
403
|
+
/** The data type of the source channel */
|
|
404
|
+
dataType?: ChannelType;
|
|
405
|
+
|
|
406
|
+
/** D3 number format specifier for labels */
|
|
407
|
+
format?: string;
|
|
408
|
+
|
|
409
|
+
/** Explicit legend values */
|
|
410
|
+
values?: Scalar[];
|
|
411
|
+
|
|
412
|
+
/** Number of representative entries to generate for quantitative scales */
|
|
413
|
+
count?: number;
|
|
414
|
+
|
|
415
|
+
/**
|
|
416
|
+
* Whether size entries should also include the scale output as a stroke
|
|
417
|
+
* width for stroke-based legend symbols.
|
|
418
|
+
*
|
|
419
|
+
* @internal
|
|
420
|
+
*/
|
|
421
|
+
sizeMode?: "area" | "strokeWidth";
|
|
422
|
+
}
|
|
423
|
+
|
|
424
|
+
/**
|
|
425
|
+
* Internal data source for generated gradient legend ramp samples.
|
|
426
|
+
*
|
|
427
|
+
* @internal
|
|
428
|
+
*/
|
|
429
|
+
export interface LegendGradientData {
|
|
430
|
+
type: "legendGradient";
|
|
431
|
+
|
|
432
|
+
/** Which channel's scale domain to use */
|
|
433
|
+
channel: ChannelWithScale;
|
|
434
|
+
|
|
435
|
+
/** Number of ramp samples to generate */
|
|
436
|
+
count?: number;
|
|
437
|
+
|
|
438
|
+
/** D3 number format specifier for labels derived from this source */
|
|
439
|
+
format?: string;
|
|
440
|
+
|
|
441
|
+
/** Explicit tick values derived from this source */
|
|
442
|
+
values?: Scalar[];
|
|
443
|
+
}
|
|
444
|
+
|
|
445
|
+
/**
|
|
446
|
+
* Internal data source for generated gradient legend ticks.
|
|
447
|
+
*
|
|
448
|
+
* @internal
|
|
449
|
+
*/
|
|
450
|
+
export interface LegendGradientTicksData {
|
|
451
|
+
type: "legendGradientTicks";
|
|
452
|
+
|
|
453
|
+
/** Which channel's scale domain to use */
|
|
454
|
+
channel: ChannelWithScale;
|
|
455
|
+
|
|
456
|
+
/** Number of ticks to generate */
|
|
457
|
+
count?: number;
|
|
458
|
+
|
|
459
|
+
/** D3 number format specifier for tick labels */
|
|
460
|
+
format?: string;
|
|
461
|
+
|
|
462
|
+
/** Explicit tick values */
|
|
463
|
+
values?: Scalar[];
|
|
464
|
+
}
|
|
465
|
+
|
|
315
466
|
export interface AxisGenomeData {
|
|
316
467
|
type: "axisGenome";
|
|
317
468
|
|
|
@@ -330,16 +481,18 @@ export interface IndexedFastaData extends DebouncedData {
|
|
|
330
481
|
channel?: PrimaryPositionalChannel;
|
|
331
482
|
|
|
332
483
|
/**
|
|
333
|
-
* URL of the fasta file.
|
|
484
|
+
* URL of the fasta file. URL templates must resolve to one URL.
|
|
334
485
|
*/
|
|
335
|
-
url:
|
|
486
|
+
url: SingleUrlSourceRef;
|
|
336
487
|
|
|
337
488
|
/**
|
|
338
489
|
* URL of the index file.
|
|
490
|
+
* When `url` is a template, this can be an index URL template using the
|
|
491
|
+
* same placeholder and values.
|
|
339
492
|
*
|
|
340
493
|
* __Default value:__ `url` + `".fai"`.
|
|
341
494
|
*/
|
|
342
|
-
indexUrl?:
|
|
495
|
+
indexUrl?: IndexUrlSourceRef;
|
|
343
496
|
|
|
344
497
|
/**
|
|
345
498
|
* Size of each chunk when fetching the fasta file. Data is only fetched
|
|
@@ -361,9 +514,10 @@ export interface BigWigData extends DebouncedData {
|
|
|
361
514
|
channel?: PrimaryPositionalChannel;
|
|
362
515
|
|
|
363
516
|
/**
|
|
364
|
-
* URL of the BigWig file.
|
|
517
|
+
* URL of the BigWig file. URL templates load multiple BigWig files and
|
|
518
|
+
* attach the template field to loaded rows.
|
|
365
519
|
*/
|
|
366
|
-
url:
|
|
520
|
+
url: MultiUrlSourceRef;
|
|
367
521
|
|
|
368
522
|
/**
|
|
369
523
|
* The approximate minimum width of each data bin, in pixels.
|
|
@@ -384,9 +538,10 @@ export interface BigBedData extends DebouncedData {
|
|
|
384
538
|
channel?: PrimaryPositionalChannel;
|
|
385
539
|
|
|
386
540
|
/**
|
|
387
|
-
* URL of the BigBed file.
|
|
541
|
+
* URL of the BigBed file. URL templates load multiple BigBed files and
|
|
542
|
+
* attach the template field to loaded rows.
|
|
388
543
|
*/
|
|
389
|
-
url:
|
|
544
|
+
url: MultiUrlSourceRef;
|
|
390
545
|
|
|
391
546
|
/**
|
|
392
547
|
* Size of each chunk when fetching the BigBed file. Data is only fetched
|
|
@@ -408,16 +563,18 @@ export interface BamData extends DebouncedData {
|
|
|
408
563
|
channel?: PrimaryPositionalChannel;
|
|
409
564
|
|
|
410
565
|
/**
|
|
411
|
-
* URL of the
|
|
566
|
+
* URL of the BAM file. URL templates must resolve to one URL.
|
|
412
567
|
*/
|
|
413
|
-
url:
|
|
568
|
+
url: SingleUrlSourceRef;
|
|
414
569
|
|
|
415
570
|
/**
|
|
416
571
|
* URL of the index file.
|
|
572
|
+
* When `url` is a template, this can be an index URL template using the
|
|
573
|
+
* same placeholder and values.
|
|
417
574
|
*
|
|
418
575
|
* __Default value:__ `url` + `".bai"`.
|
|
419
576
|
*/
|
|
420
|
-
indexUrl?:
|
|
577
|
+
indexUrl?: IndexUrlSourceRef;
|
|
421
578
|
|
|
422
579
|
/**
|
|
423
580
|
* Size of each chunk when fetching the BigBed file. Data is only fetched
|
|
@@ -437,16 +594,19 @@ export interface TabixData extends DebouncedData {
|
|
|
437
594
|
channel?: PrimaryPositionalChannel;
|
|
438
595
|
|
|
439
596
|
/**
|
|
440
|
-
*
|
|
597
|
+
* URL of the bgzip-compressed file. URL templates load multiple files and
|
|
598
|
+
* attach the template field to loaded rows.
|
|
441
599
|
*/
|
|
442
|
-
url:
|
|
600
|
+
url: MultiUrlSourceRef;
|
|
443
601
|
|
|
444
602
|
/**
|
|
445
|
-
*
|
|
603
|
+
* URL of the tabix index file.
|
|
604
|
+
* When `url` is a template, this can be an index URL template using the
|
|
605
|
+
* same placeholder and values.
|
|
446
606
|
*
|
|
447
607
|
* __Default value:__ `url` + `".tbi"`.
|
|
448
608
|
*/
|
|
449
|
-
indexUrl?:
|
|
609
|
+
indexUrl?: IndexUrlSourceRef;
|
|
450
610
|
|
|
451
611
|
/**
|
|
452
612
|
* Add a `chr` (boolean) or custom (string) prefix to the chromosome names
|
|
@@ -0,0 +1,246 @@
|
|
|
1
|
+
import { Align, Baseline, FontStyle, FontWeight } from "./font.js";
|
|
2
|
+
import { ExprRef } from "./parameter.js";
|
|
3
|
+
|
|
4
|
+
export type LegendOrient =
|
|
5
|
+
| "left"
|
|
6
|
+
| "right"
|
|
7
|
+
| "top"
|
|
8
|
+
| "bottom"
|
|
9
|
+
| "top-left"
|
|
10
|
+
| "top-right"
|
|
11
|
+
| "bottom-left"
|
|
12
|
+
| "bottom-right";
|
|
13
|
+
|
|
14
|
+
export type LegendDirection = "vertical" | "horizontal";
|
|
15
|
+
|
|
16
|
+
export type LegendTitleOrient = "top" | "bottom" | "left" | "right";
|
|
17
|
+
|
|
18
|
+
// TODO: Consider adding more Vega/Vega-Lite legend properties when concrete
|
|
19
|
+
// use cases appear. Known gaps include tick controls (`tickCount`,
|
|
20
|
+
// `tickMinStep`), explicit legend `type`, gradient sizing/styling knobs
|
|
21
|
+
// (`gradientLength`, `gradientThickness`, `gradientOpacity`,
|
|
22
|
+
// `gradientStrokeColor`, `gradientStrokeWidth`), label overlap controls, and
|
|
23
|
+
// symbol override properties such as `symbolFillColor`, `symbolStrokeColor`,
|
|
24
|
+
// `symbolOpacity`, and `symbolLimit`.
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* Legend properties. The initial legend surface is adapted from Vega:
|
|
28
|
+
* https://github.com/vega/vega/
|
|
29
|
+
*/
|
|
30
|
+
export interface Legend {
|
|
31
|
+
/**
|
|
32
|
+
* Named style reference or references resolved from `config.style`. If an
|
|
33
|
+
* array is provided, later styles override earlier ones. Set to `null` to
|
|
34
|
+
* reset inherited legend styles.
|
|
35
|
+
*/
|
|
36
|
+
style?: string | string[] | null;
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* Title text for the legend. If `null`, the title is removed.
|
|
40
|
+
*/
|
|
41
|
+
title?: string | null;
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* The plot side or inside corner where the legend is placed. Side legends
|
|
45
|
+
* are placed outside the plot area. Corner legends are placed inside the
|
|
46
|
+
* plot area.
|
|
47
|
+
*/
|
|
48
|
+
orient?: LegendOrient | ExprRef;
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* The direction in which legend entries are laid out.
|
|
52
|
+
*/
|
|
53
|
+
direction?: LegendDirection;
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* External gap in pixels between the legend and the plot edge.
|
|
57
|
+
*/
|
|
58
|
+
offset?: number;
|
|
59
|
+
|
|
60
|
+
/**
|
|
61
|
+
* Internal padding in pixels around the legend content and background.
|
|
62
|
+
*/
|
|
63
|
+
padding?: number;
|
|
64
|
+
|
|
65
|
+
/**
|
|
66
|
+
* The number of columns in which to arrange symbol legend entries.
|
|
67
|
+
*/
|
|
68
|
+
columns?: number;
|
|
69
|
+
|
|
70
|
+
/**
|
|
71
|
+
* Explicit values to show in the legend. For discrete symbol legends, the
|
|
72
|
+
* values define an ordered subset of entries. For quantitative symbol and
|
|
73
|
+
* gradient legends, the values define the shown representative values or
|
|
74
|
+
* ticks.
|
|
75
|
+
*/
|
|
76
|
+
values?: (string | number | boolean)[];
|
|
77
|
+
|
|
78
|
+
/**
|
|
79
|
+
* Maximum label text width in pixels.
|
|
80
|
+
*/
|
|
81
|
+
labelLimit?: number;
|
|
82
|
+
|
|
83
|
+
/**
|
|
84
|
+
* Fill color of the legend background.
|
|
85
|
+
*/
|
|
86
|
+
backgroundFill?: string;
|
|
87
|
+
|
|
88
|
+
/**
|
|
89
|
+
* Opacity of the legend background fill.
|
|
90
|
+
*/
|
|
91
|
+
backgroundFillOpacity?: number;
|
|
92
|
+
|
|
93
|
+
/**
|
|
94
|
+
* Stroke color of the legend background.
|
|
95
|
+
*/
|
|
96
|
+
backgroundStroke?: string;
|
|
97
|
+
|
|
98
|
+
/**
|
|
99
|
+
* Stroke width of the legend background border.
|
|
100
|
+
*/
|
|
101
|
+
backgroundStrokeWidth?: number;
|
|
102
|
+
|
|
103
|
+
/**
|
|
104
|
+
* Opacity of the legend background stroke.
|
|
105
|
+
*/
|
|
106
|
+
backgroundStrokeOpacity?: number;
|
|
107
|
+
|
|
108
|
+
/**
|
|
109
|
+
* Symbol size in pixels squared.
|
|
110
|
+
*/
|
|
111
|
+
symbolSize?: number;
|
|
112
|
+
|
|
113
|
+
/**
|
|
114
|
+
* Symbol shape.
|
|
115
|
+
*/
|
|
116
|
+
symbolType?: string;
|
|
117
|
+
|
|
118
|
+
/**
|
|
119
|
+
* The side of the legend on which to place the title.
|
|
120
|
+
*/
|
|
121
|
+
titleOrient?: LegendTitleOrient;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
/**
|
|
125
|
+
* Legend defaults. The initial legend surface is adapted from Vega:
|
|
126
|
+
* https://github.com/vega/vega/
|
|
127
|
+
*/
|
|
128
|
+
export interface LegendConfig extends Legend {
|
|
129
|
+
/**
|
|
130
|
+
* Disable automatic legend creation. Use `legend: null` on an encoding
|
|
131
|
+
* channel to remove that channel's legend.
|
|
132
|
+
*
|
|
133
|
+
* __Default value:__ `false`
|
|
134
|
+
*/
|
|
135
|
+
disable?: boolean | ExprRef;
|
|
136
|
+
|
|
137
|
+
/**
|
|
138
|
+
* Spacing in pixels between legends collected into the same legend region.
|
|
139
|
+
*/
|
|
140
|
+
spacing?: number;
|
|
141
|
+
|
|
142
|
+
/**
|
|
143
|
+
* Padding between legend rows in pixels.
|
|
144
|
+
*/
|
|
145
|
+
rowPadding?: number;
|
|
146
|
+
|
|
147
|
+
/**
|
|
148
|
+
* Padding between legend columns in pixels.
|
|
149
|
+
*/
|
|
150
|
+
columnPadding?: number;
|
|
151
|
+
|
|
152
|
+
/**
|
|
153
|
+
* Horizontal alignment of legend labels.
|
|
154
|
+
*/
|
|
155
|
+
labelAlign?: Align;
|
|
156
|
+
|
|
157
|
+
/**
|
|
158
|
+
* Baseline alignment of legend labels.
|
|
159
|
+
*/
|
|
160
|
+
labelBaseline?: Baseline;
|
|
161
|
+
|
|
162
|
+
/**
|
|
163
|
+
* Legend label color.
|
|
164
|
+
*/
|
|
165
|
+
labelColor?: string;
|
|
166
|
+
|
|
167
|
+
/**
|
|
168
|
+
* Legend label font.
|
|
169
|
+
*/
|
|
170
|
+
labelFont?: string;
|
|
171
|
+
|
|
172
|
+
/**
|
|
173
|
+
* Legend label font size in pixels.
|
|
174
|
+
*/
|
|
175
|
+
labelFontSize?: number;
|
|
176
|
+
|
|
177
|
+
/**
|
|
178
|
+
* Legend label font style.
|
|
179
|
+
*/
|
|
180
|
+
labelFontStyle?: FontStyle;
|
|
181
|
+
|
|
182
|
+
/**
|
|
183
|
+
* Legend label font weight.
|
|
184
|
+
*/
|
|
185
|
+
labelFontWeight?: FontWeight;
|
|
186
|
+
|
|
187
|
+
/**
|
|
188
|
+
* Offset between legend symbols and labels in pixels.
|
|
189
|
+
*/
|
|
190
|
+
labelOffset?: number;
|
|
191
|
+
|
|
192
|
+
/**
|
|
193
|
+
* Offset applied to legend symbols in pixels.
|
|
194
|
+
*/
|
|
195
|
+
symbolOffset?: number;
|
|
196
|
+
|
|
197
|
+
/**
|
|
198
|
+
* Legend symbol stroke width in pixels.
|
|
199
|
+
*/
|
|
200
|
+
symbolStrokeWidth?: number;
|
|
201
|
+
|
|
202
|
+
/**
|
|
203
|
+
* Base fill color for legend symbols when the legend does not encode fill.
|
|
204
|
+
*/
|
|
205
|
+
symbolBaseFillColor?: string;
|
|
206
|
+
|
|
207
|
+
/**
|
|
208
|
+
* Base stroke color for legend symbols when the legend does not encode stroke.
|
|
209
|
+
*/
|
|
210
|
+
symbolBaseStrokeColor?: string;
|
|
211
|
+
|
|
212
|
+
/**
|
|
213
|
+
* Legend title color.
|
|
214
|
+
*/
|
|
215
|
+
titleColor?: string;
|
|
216
|
+
|
|
217
|
+
/**
|
|
218
|
+
* Legend title font.
|
|
219
|
+
*/
|
|
220
|
+
titleFont?: string;
|
|
221
|
+
|
|
222
|
+
/**
|
|
223
|
+
* Legend title font size in pixels.
|
|
224
|
+
*/
|
|
225
|
+
titleFontSize?: number;
|
|
226
|
+
|
|
227
|
+
/**
|
|
228
|
+
* Legend title font style.
|
|
229
|
+
*/
|
|
230
|
+
titleFontStyle?: FontStyle;
|
|
231
|
+
|
|
232
|
+
/**
|
|
233
|
+
* Legend title font weight.
|
|
234
|
+
*/
|
|
235
|
+
titleFontWeight?: FontWeight;
|
|
236
|
+
|
|
237
|
+
/**
|
|
238
|
+
* Maximum title text width in pixels.
|
|
239
|
+
*/
|
|
240
|
+
titleLimit?: number;
|
|
241
|
+
|
|
242
|
+
/**
|
|
243
|
+
* Padding in pixels between the legend title and the legend body.
|
|
244
|
+
*/
|
|
245
|
+
titlePadding?: number;
|
|
246
|
+
}
|
package/dist/src/spec/mark.d.ts
CHANGED
|
@@ -45,10 +45,14 @@ export interface MarkPropsBase {
|
|
|
45
45
|
opacity?: number | ExprRef;
|
|
46
46
|
|
|
47
47
|
/**
|
|
48
|
-
*
|
|
49
|
-
*
|
|
48
|
+
* Controls whether the mark is clipped to the UnitView's rectangle. The
|
|
49
|
+
* values `"x"` and `"y"` clip only in the corresponding screen-space
|
|
50
|
+
* direction. Inherited clipping from parent containers still applies unless
|
|
51
|
+
* `"never"` is used.
|
|
52
|
+
*
|
|
53
|
+
* __Default value:__ the direction of zoomable positional scales
|
|
50
54
|
*/
|
|
51
|
-
clip?: boolean | "never";
|
|
55
|
+
clip?: boolean | "x" | "y" | "never";
|
|
52
56
|
|
|
53
57
|
/**
|
|
54
58
|
* Offsets of the `x` and `x2` coordinates in pixels. The offset is applied
|
|
@@ -84,9 +88,17 @@ export interface MarkPropsBase {
|
|
|
84
88
|
*/
|
|
85
89
|
buildIndex?: boolean;
|
|
86
90
|
|
|
91
|
+
/**
|
|
92
|
+
* Hide point-like mark instances whose anchor falls outside the inherited
|
|
93
|
+
* visible range in the given screen-space direction.
|
|
94
|
+
*
|
|
95
|
+
* @internal
|
|
96
|
+
*/
|
|
97
|
+
cullByVisibleRange?: boolean | "x" | "y";
|
|
98
|
+
|
|
87
99
|
/**
|
|
88
100
|
* Tooltip handler. If `null`, no tooltip is shown. If string, specifies
|
|
89
|
-
* the [tooltip handler](https://genomespy.app/docs/api/#custom-tooltip-handlers)
|
|
101
|
+
* the [tooltip handler](https://genomespy.app/docs/api/embed-options/#custom-tooltip-handlers)
|
|
90
102
|
* to use.
|
|
91
103
|
*/
|
|
92
104
|
tooltip?: Tooltip;
|