@milaboratories/miplots4 1.2.0 → 1.2.2
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/bubble/BubbleSettingsImpl.d.ts +3 -0
- package/dist/bubble/BubbleSettingsImpl.d.ts.map +1 -1
- package/dist/bubble/BubbleSettingsImpl.js +4 -1
- package/dist/bubble/BubbleSettingsImpl.js.map +1 -1
- package/dist/bubble/ChartRenderer.d.ts +2 -12
- package/dist/bubble/ChartRenderer.d.ts.map +1 -1
- package/dist/bubble/ChartRenderer.js +13 -13
- package/dist/bubble/ChartRenderer.js.map +1 -1
- package/dist/bubble/getGroupedCellsData.d.ts +1 -1
- package/dist/bubble/getGroupedCellsData.d.ts.map +1 -1
- package/dist/bubble/getGroupedCellsData.js +20 -14
- package/dist/bubble/getGroupedCellsData.js.map +1 -1
- package/dist/bubble/index.d.ts.map +1 -1
- package/dist/bubble/index.js +6 -10
- package/dist/bubble/index.js.map +1 -1
- package/dist/common/ContinuousGrid.d.ts.map +1 -1
- package/dist/common/ContinuousGrid.js +90 -56
- package/dist/common/ContinuousGrid.js.map +1 -1
- package/dist/heatmap/ChartRenderer.d.ts +2 -12
- package/dist/heatmap/ChartRenderer.d.ts.map +1 -1
- package/dist/heatmap/ChartRenderer.js +26 -26
- package/dist/heatmap/ChartRenderer.js.map +1 -1
- package/dist/heatmap/HeatmapSettingsImpl.d.ts +3 -0
- package/dist/heatmap/HeatmapSettingsImpl.d.ts.map +1 -1
- package/dist/heatmap/HeatmapSettingsImpl.js +5 -2
- package/dist/heatmap/HeatmapSettingsImpl.js.map +1 -1
- package/dist/heatmap/fillCellsData.d.ts +6 -1
- package/dist/heatmap/fillCellsData.d.ts.map +1 -1
- package/dist/heatmap/fillCellsData.js +135 -96
- package/dist/heatmap/fillCellsData.js.map +1 -1
- package/dist/heatmap/getCells.d.ts +4 -1
- package/dist/heatmap/getCells.d.ts.map +1 -1
- package/dist/heatmap/getCells.js +19 -16
- package/dist/heatmap/getCells.js.map +1 -1
- package/dist/heatmap/index.d.ts.map +1 -1
- package/dist/heatmap/index.js +32 -34
- package/dist/heatmap/index.js.map +1 -1
- package/dist/histogram/ChartRenderer.d.ts.map +1 -1
- package/dist/histogram/ChartRenderer.js +6 -0
- package/dist/histogram/ChartRenderer.js.map +1 -1
- package/dist/histogram/HistogramSettingsImpl.d.ts +5 -1
- package/dist/histogram/HistogramSettingsImpl.d.ts.map +1 -1
- package/dist/histogram/HistogramSettingsImpl.js.map +1 -1
- package/dist/scatterplot/components/Grid.d.ts.map +1 -1
- package/dist/scatterplot/components/Grid.js +109 -71
- package/dist/scatterplot/components/Grid.js.map +1 -1
- package/dist/types/bubble.d.ts +97 -8
- package/dist/types/bubble.d.ts.map +1 -1
- package/dist/types/bubble.js +3 -0
- package/dist/types/bubble.js.map +1 -1
- package/dist/types/common.d.ts +62 -6
- package/dist/types/common.d.ts.map +1 -1
- package/dist/types/common.js +15 -6
- package/dist/types/common.js.map +1 -1
- package/dist/types/dendro.d.ts +6 -6
- package/dist/types/discrete.d.ts +41 -13
- package/dist/types/discrete.d.ts.map +1 -1
- package/dist/types/heatmap.d.ts +93 -4
- package/dist/types/heatmap.d.ts.map +1 -1
- package/dist/types/heatmap.js +3 -0
- package/dist/types/heatmap.js.map +1 -1
- package/dist/types/histogram.d.ts +59 -10
- package/dist/types/histogram.d.ts.map +1 -1
- package/dist/types/histogram.js +60 -66
- package/dist/types/histogram.js.map +1 -1
- package/dist/types/scatterplot-umap.d.ts +74 -18
- package/dist/types/scatterplot-umap.d.ts.map +1 -1
- package/dist/types/scatterplot.d.ts +74 -18
- package/dist/types/scatterplot.d.ts.map +1 -1
- package/dist/types/selection.d.ts +8 -8
- package/dist/utils/getChartEdgeSides.d.ts +1 -1
- package/dist/utils/intersect.d.ts +2 -0
- package/dist/utils/intersect.d.ts.map +1 -0
- package/dist/utils/intersect.js +8 -0
- package/dist/utils/intersect.js.map +1 -0
- package/dist/utils/significantLinesStyle.d.ts +8 -0
- package/dist/utils/significantLinesStyle.d.ts.map +1 -0
- package/dist/utils/significantLinesStyle.js +12 -0
- package/dist/utils/significantLinesStyle.js.map +1 -0
- package/package.json +1 -1
|
@@ -51,8 +51,10 @@ export declare class HeatmapSettingsImpl implements SettingsInterface {
|
|
|
51
51
|
};
|
|
52
52
|
readonly xColumn: ColumnName;
|
|
53
53
|
readonly xGroupBy: ColumnName[];
|
|
54
|
+
readonly xSortBy: ColumnName[];
|
|
54
55
|
readonly yColumn: ColumnName;
|
|
55
56
|
readonly yGroupBy: ColumnName[];
|
|
57
|
+
readonly ySortBy: ColumnName[];
|
|
56
58
|
readonly valueColumn: ColumnName;
|
|
57
59
|
readonly facetBy: ColumnName[];
|
|
58
60
|
readonly normalization: {
|
|
@@ -131,6 +133,7 @@ export declare class HeatmapSettingsImpl implements SettingsInterface {
|
|
|
131
133
|
readonly dendrogramY: HeatmapDendrogramSettingsY | null;
|
|
132
134
|
readonly inheritedDendrogramAes: Record<string, AesRecord> | null;
|
|
133
135
|
readonly NAValueAs: number | null;
|
|
136
|
+
readonly transform: 'log' | null;
|
|
134
137
|
readonly showEmptyRows: boolean;
|
|
135
138
|
readonly showEmptyColumns: boolean;
|
|
136
139
|
readonly cellsRenderingMode: 'canvas' | 'svg' | null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HeatmapSettingsImpl.d.ts","sourceRoot":"","sources":["../../src/heatmap/HeatmapSettingsImpl.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACR,SAAS,EACT,iBAAiB,EACjB,UAAU,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,eAAe,EAClE,cAAc,EAAE,SAAS,EAAE,sBAAsB,EAAE,mBAAmB,EAAE,UAAU,EAClF,iBAAiB,EACjB,aAAa,EAChB,MAAM,UAAU,CAAC;AAuBlB,MAAM,WAAW,yBAAyB;IACtC,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,kBAAkB,CAAC;IAC7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K,GAAG,IAAI,CAAC;gBAEzC,QAAQ,EAAE,eAAe;CA0JxC"}
|
|
@@ -24,8 +24,10 @@ var r = {
|
|
|
24
24
|
facetSettings;
|
|
25
25
|
xColumn;
|
|
26
26
|
xGroupBy;
|
|
27
|
+
xSortBy;
|
|
27
28
|
yColumn;
|
|
28
29
|
yGroupBy;
|
|
30
|
+
ySortBy;
|
|
29
31
|
valueColumn;
|
|
30
32
|
facetBy;
|
|
31
33
|
normalization;
|
|
@@ -38,11 +40,12 @@ var r = {
|
|
|
38
40
|
dendrogramY;
|
|
39
41
|
inheritedDendrogramAes;
|
|
40
42
|
NAValueAs;
|
|
43
|
+
transform;
|
|
41
44
|
showEmptyRows;
|
|
42
45
|
showEmptyColumns;
|
|
43
46
|
cellsRenderingMode;
|
|
44
47
|
constructor(e) {
|
|
45
|
-
if (t.parse(e), this.id = n.uniqueId("settings"), this.xColumn = e.xColumn, this.xGroupBy = e.xGroupBy ?? [], this.yColumn = e.yColumn, this.yGroupBy = e.yGroupBy ?? [], this.valueColumn = e.valueColumn, this.facetBy = e.facetBy ?? [], this.chartSettings = {
|
|
48
|
+
if (t.parse(e), this.id = n.uniqueId("settings"), this.xColumn = e.xColumn, this.xGroupBy = e.xGroupBy ?? [], this.xSortBy = e.xSortBy ?? [], this.yColumn = e.yColumn, this.yGroupBy = e.yGroupBy ?? [], this.ySortBy = e.ySortBy ?? [], this.valueColumn = e.valueColumn, this.facetBy = e.facetBy ?? [], this.chartSettings = {
|
|
46
49
|
title: {
|
|
47
50
|
position: "left",
|
|
48
51
|
show: !0,
|
|
@@ -99,7 +102,7 @@ var r = {
|
|
|
99
102
|
sharedY: !0,
|
|
100
103
|
order: e.facetSettings?.order ?? null,
|
|
101
104
|
...e.facetSettings
|
|
102
|
-
}, this.chartSettings.size.cellWidth && this.facetBy.length > 0 && (this.facetSettings.sharedX = !0), this.chartSettings.size.cellHeight && this.facetBy.length > 0 && (this.facetSettings.sharedY = !0), this.keysOrder = e.keysOrder ?? {}, this.normalization = this.chartSettings.valueType === "continuous" ? e.normalization ?? null : null, this.NAValueAs = e.NAValueAs ?? null, this.showEmptyRows = e.showEmptyRows ?? !1, this.showEmptyColumns = e.showEmptyColumns ?? !1, this.aes = {
|
|
105
|
+
}, this.chartSettings.size.cellWidth && this.facetBy.length > 0 && (this.facetSettings.sharedX = !0), this.chartSettings.size.cellHeight && this.facetBy.length > 0 && (this.facetSettings.sharedY = !0), this.keysOrder = e.keysOrder ?? {}, this.normalization = this.chartSettings.valueType === "continuous" ? e.normalization ?? null : null, this.transform = this.chartSettings.valueType === "continuous" ? e.transform ?? null : null, this.NAValueAs = e.NAValueAs ?? null, this.showEmptyRows = e.showEmptyRows ?? !1, this.showEmptyColumns = e.showEmptyColumns ?? !1, this.aes = {
|
|
103
106
|
colorsList: e.aes?.colorsList ?? [
|
|
104
107
|
"black",
|
|
105
108
|
"white",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HeatmapSettingsImpl.js","names":[],"sources":["../../src/heatmap/HeatmapSettingsImpl.ts"],"sourcesContent":["import lodash from 'lodash';\nimport { BLACK, DEFAULT_HEIGHT, DEFAULT_HEIGHT_SMALL, DEFAULT_WIDTH, DEFAULT_WIDTH_SMALL } from '../constants';\nimport type {\n AesRecord,\n AggregationMethod,\n ColumnName, DendrogramDistance, DendrogramLinkage, HeatmapSettings,\n LegendPosition, LineShape, NormalizationDirection, NormalizationMethod, PointShape,\n SettingsInterface,\n TitlePosition\n} from '../types';\nimport { HeatmapSettingsSchema } from '../types';\nimport { MIN_MARGIN, MIN_PADDING } from './constants';\n\nconst DEFAULT_DENDRO_AES = {\n lineColor: BLACK,\n dotShape: '21' as PointShape,\n dotFill: BLACK,\n dotSize: 3,\n lineShape: 'solid' as LineShape,\n lineWidth: 1,\n};\nconst DEFAULT_DENDRO: HeatmapDendrogramSettings = {\n size: 150,\n distance: 'euclidean',\n linkage: 'average',\n fillNA: 0,\n showNodes: true,\n hidden: false,\n edgeInheritance: 'up',\n aes: DEFAULT_DENDRO_AES,\n};\n\nexport interface HeatmapDendrogramSettings {\n size: number;\n distance: DendrogramDistance;\n linkage: DendrogramLinkage;\n fillNA: number;\n showNodes: boolean;\n hidden: boolean;\n edgeInheritance: 'up' | 'down';\n aes: {\n lineColor: string | ColumnName;\n dotFill: string | ColumnName;\n dotShape: PointShape | ColumnName;\n dotSize: number | ColumnName;\n lineShape: LineShape | ColumnName;\n lineWidth: number | ColumnName;\n };\n}\n\ninterface HeatmapDendrogramSettingsX extends HeatmapDendrogramSettings {\n position: 'top' | 'bottom';\n}\ninterface HeatmapDendrogramSettingsY extends HeatmapDendrogramSettings {\n position: 'left' | 'right';\n}\n\ninterface HeatmapAnnotation {\n id: string;\n valueColumn: ColumnName;\n showTitle: boolean;\n type: 'discrete' | 'continuous';\n colors: string[];\n}\n\ninterface HeatmapAnnotationX extends HeatmapAnnotation {\n axis: 'x';\n position: 'top' | 'bottom';\n titlePosition: 'left' | 'right';\n}\ninterface HeatmapAnnotationY extends HeatmapAnnotation {\n axis: 'y';\n position: 'left' | 'right';\n titlePosition: 'top' | 'bottom';\n}\n\nexport class HeatmapSettingsImpl implements SettingsInterface {\n readonly id: string;\n readonly type = 'heatmap';\n readonly facetSettings: {\n order: string[] | null;\n sharedX: boolean;\n sharedY: boolean;\n nRows?: number;\n nCols?: number;\n };\n readonly xColumn: ColumnName;\n readonly xGroupBy: ColumnName[];\n readonly yColumn: ColumnName;\n readonly yGroupBy: ColumnName[];\n readonly valueColumn: ColumnName;\n readonly facetBy: ColumnName[];\n readonly normalization: { direction: NormalizationDirection, method: NormalizationMethod, colorRange?: number[] } | null;\n readonly chartSettings: {\n readonly title: { name: string; show: boolean; position: TitlePosition };\n readonly size: {\n width: number;\n height: number;\n cellWidth: number | null;\n cellHeight: number | null;\n innerOffset: number;\n outerOffset: number;\n };\n readonly frame: { type: 'full' | 'groups' | 'none' };\n readonly valueType: 'discrete' | 'continuous';\n readonly yAxis: {\n title: string;\n showTicks: boolean;\n showTitle: boolean;\n showAxisLabels: boolean;\n showGroupLabels: boolean;\n position: 'left' | 'right';\n groupingPosition: 'left' | 'right';\n axisLabelsAngle: 0 | 45 | 90;\n groupLabelsAngle: 0 | 45 | 90;\n sorting: 'asc' | 'desc';\n };\n readonly xAxis: {\n title: string;\n showTicks: boolean;\n showTitle: boolean;\n showAxisLabels: boolean;\n showGroupLabels: boolean;\n position: 'bottom' | 'top';\n groupingPosition: 'bottom' | 'top';\n axisLabelsAngle: 0 | 45 | 90;\n groupLabelsAngle: 0 | 45 | 90;\n sorting: 'asc' | 'desc';\n };\n readonly legend: { show: boolean; position: LegendPosition };\n readonly tooltips: { show: boolean; content?: ColumnName[] };\n };\n readonly keysOrder: Record<string, string[]>;\n readonly aes: {\n colorsList: string[];\n colorsMap: Record<string, string> | null;\n valueColors: string[] | null;\n valuesByColors: number[] | null;\n groupGap: number;\n cellStrokeColor: string;\n emptyCellColor: string;\n };\n\n readonly aggregation: {\n x: boolean;\n y: boolean;\n method: AggregationMethod;\n };\n\n readonly annotations: (HeatmapAnnotationX | HeatmapAnnotationY)[];\n\n readonly dendrogramX: HeatmapDendrogramSettingsX | null;\n readonly dendrogramY: HeatmapDendrogramSettingsY | null;\n readonly inheritedDendrogramAes: Record<string, AesRecord> | null;\n readonly NAValueAs: number | null;\n readonly showEmptyRows: boolean;\n readonly showEmptyColumns: boolean;\n readonly cellsRenderingMode: 'canvas' | 'svg' | null;\n\n constructor(settings: HeatmapSettings) {\n HeatmapSettingsSchema.parse(settings);\n\n this.id = lodash.uniqueId('settings');\n this.xColumn = settings.xColumn;\n this.xGroupBy = settings.xGroupBy ?? [];\n this.yColumn = settings.yColumn;\n this.yGroupBy = settings.yGroupBy ?? [];\n this.valueColumn = settings.valueColumn;\n this.facetBy = settings.facetBy ?? [];\n this.chartSettings = {\n title: {\n position: 'left',\n show: true,\n ...settings.title,\n name: settings.title?.name ?? 'Chart',\n },\n size: {\n width: settings?.size?.width ?? (this.facetBy.length ? DEFAULT_WIDTH_SMALL : DEFAULT_WIDTH),\n height: settings?.size?.height ?? (this.facetBy.length ? DEFAULT_HEIGHT_SMALL : DEFAULT_HEIGHT),\n innerOffset: settings.size?.innerOffset ?? MIN_PADDING,\n outerOffset: settings.size?.outerOffset ?? MIN_MARGIN,\n cellWidth: settings?.size?.cellWidth ?? null,\n cellHeight: settings?.size?.cellHeight ?? null,\n },\n frame: { type: settings.frame?.type ?? 'none' },\n valueType: settings.valueType ?? 'continuous',\n yAxis: {\n title: settings.yColumn.label ?? settings.yColumn.value,\n showTicks: true,\n showTitle: true,\n showAxisLabels: true,\n showGroupLabels: true,\n position: 'left',\n groupingPosition: 'left',\n axisLabelsAngle: 90,\n groupLabelsAngle: 0,\n sorting: 'asc',\n ...settings.yAxis,\n },\n xAxis: {\n title: settings.xColumn.label ?? settings.xColumn.value,\n showTicks: true,\n showTitle: true,\n showAxisLabels: true,\n showGroupLabels: true,\n position: 'bottom',\n groupingPosition: 'bottom',\n axisLabelsAngle: 90,\n groupLabelsAngle: 0,\n sorting: 'asc',\n ...settings.xAxis,\n },\n legend: {\n show: true,\n position: 'right',\n ...settings.legend,\n },\n tooltips: {\n show: true,\n ...settings.tooltips,\n },\n };\n this.facetSettings = {\n sharedX: true,\n sharedY: true,\n order: settings.facetSettings?.order ?? null,\n ...settings.facetSettings,\n };\n if (this.chartSettings.size.cellWidth && this.facetBy.length > 0) {\n this.facetSettings.sharedX = true;\n }\n if (this.chartSettings.size.cellHeight && this.facetBy.length > 0) {\n this.facetSettings.sharedY = true;\n }\n this.keysOrder = settings.keysOrder ?? {};\n this.normalization = this.chartSettings.valueType === 'continuous' ? settings.normalization ?? null : null;\n this.NAValueAs = settings.NAValueAs ?? null;\n this.showEmptyRows = settings.showEmptyRows ?? false;\n this.showEmptyColumns = settings.showEmptyColumns ?? false;\n this.aes = {\n colorsList: settings.aes?.colorsList ?? ['black', 'white', 'red'],\n colorsMap: settings.aes?.colorsMap ?? null,\n valueColors: settings.aes?.valueColors ?? null,\n valuesByColors: settings.aes?.valuesByColors ?? null,\n cellStrokeColor: settings.aes?.cellStrokeColor ?? 'none',\n groupGap: settings.aes?.groupGap ?? 3,\n emptyCellColor: settings.aes?.emptyCellColor ?? 'white',\n };\n\n this.annotations = (settings.annotations ?? []).map(item => {\n if (item.axis === 'x') {\n return {\n id: lodash.uniqueId('annotation'),\n axis: 'x',\n valueColumn: item.valueColumn,\n position: item.position ?? this.chartSettings.xAxis.position,\n titlePosition: item.titlePosition ?? 'right',\n showTitle: item.showTitle ?? true,\n type: item.type,\n colors: item.colors ?? ['white', 'black'],\n };\n }\n return {\n id: lodash.uniqueId('annotation'),\n axis: 'y',\n valueColumn: item.valueColumn,\n position: item.position ?? this.chartSettings.yAxis.position,\n titlePosition: item.titlePosition ?? 'top',\n showTitle: item.showTitle ?? true,\n type: item.type,\n colors: item.colors ?? ['white', 'black'],\n };\n });\n\n if (settings.valueType === 'discrete' && (settings.dendrogramX || settings.dendrogramY)) {\n throw Error('Dendrogram is not available with discrete cells values');\n }\n\n this.aggregation = {\n x: false,\n y: false,\n method: 'min',\n ...settings.aggregation\n };\n\n this.dendrogramX = settings.dendrogramX\n ? {\n ...DEFAULT_DENDRO,\n position: 'top',\n ...settings.dendrogramX,\n aes: {\n ...DEFAULT_DENDRO_AES,\n ...settings.dendrogramX?.aes,\n },\n }\n : null;\n this.dendrogramY = settings.dendrogramY\n ? {\n ...DEFAULT_DENDRO,\n position: 'left',\n ...settings.dendrogramY,\n aes: {\n ...DEFAULT_DENDRO_AES,\n ...settings.dendrogramY?.aes,\n },\n }\n : null;\n this.inheritedDendrogramAes = settings.inheritedDendrogramAes ?? null;\n this.cellsRenderingMode = settings.cellsRenderingMode ?? null;\n }\n}\n"],"mappings":";;;;AAaA,IAAM,IAAqB;CACvB,WAAW;CACX,UAAU;CACV,SAAS;CACT,SAAS;CACT,WAAW;CACX,WAAW;CACd,EACK,IAA4C;CAC9C,MAAM;CACN,UAAU;CACV,SAAS;CACT,QAAQ;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,EAAK;GAClB,UAAU,EAAK,YAAY,KAAK,cAAc,MAAM;GACpD,eAAe,EAAK,iBAAiB;GACrC,WAAW,EAAK,aAAa;GAC7B,MAAM,EAAK;GACX,QAAQ,EAAK,UAAU,CAAC,SAAS,QAAQ;GAC5C,CACH,EAEE,EAAS,cAAc,eAAe,EAAS,eAAe,EAAS,aACvE,OAAM,MAAM,yDAAyD;AAiCzE,EA9BA,KAAK,cAAc;GACf,GAAG;GACH,GAAG;GACH,QAAQ;GACR,GAAG,EAAS;GACf,EAED,KAAK,cAAc,EAAS,cACtB;GACE,GAAG;GACH,UAAU;GACV,GAAG,EAAS;GACZ,KAAK;IACD,GAAG;IACH,GAAG,EAAS,aAAa;IAC5B;GACJ,GACC,MACN,KAAK,cAAc,EAAS,cACtB;GACE,GAAG;GACH,UAAU;GACV,GAAG,EAAS;GACZ,KAAK;IACD,GAAG;IACH,GAAG,EAAS,aAAa;IAC5B;GACJ,GACC,MACN,KAAK,yBAAyB,EAAS,0BAA0B,MACjE,KAAK,qBAAqB,EAAS,sBAAsB"}
|
|
1
|
+
{"version":3,"file":"HeatmapSettingsImpl.js","names":[],"sources":["../../src/heatmap/HeatmapSettingsImpl.ts"],"sourcesContent":["import lodash from 'lodash';\nimport { BLACK, DEFAULT_HEIGHT, DEFAULT_HEIGHT_SMALL, DEFAULT_WIDTH, DEFAULT_WIDTH_SMALL } from '../constants';\nimport type {\n AesRecord,\n AggregationMethod,\n ColumnName, DendrogramDistance, DendrogramLinkage, HeatmapSettings,\n LegendPosition, LineShape, NormalizationDirection, NormalizationMethod, PointShape,\n SettingsInterface,\n TitlePosition\n} from '../types';\nimport { HeatmapSettingsSchema } from '../types';\nimport { MIN_MARGIN, MIN_PADDING } from './constants';\n\nconst DEFAULT_DENDRO_AES = {\n lineColor: BLACK,\n dotShape: '21' as PointShape,\n dotFill: BLACK,\n dotSize: 3,\n lineShape: 'solid' as LineShape,\n lineWidth: 1,\n};\nconst DEFAULT_DENDRO: HeatmapDendrogramSettings = {\n size: 150,\n distance: 'euclidean',\n linkage: 'average',\n fillNA: 0,\n showNodes: true,\n hidden: false,\n edgeInheritance: 'up',\n aes: DEFAULT_DENDRO_AES,\n};\n\nexport interface HeatmapDendrogramSettings {\n size: number;\n distance: DendrogramDistance;\n linkage: DendrogramLinkage;\n fillNA: number;\n showNodes: boolean;\n hidden: boolean;\n edgeInheritance: 'up' | 'down';\n aes: {\n lineColor: string | ColumnName;\n dotFill: string | ColumnName;\n dotShape: PointShape | ColumnName;\n dotSize: number | ColumnName;\n lineShape: LineShape | ColumnName;\n lineWidth: number | ColumnName;\n };\n}\n\ninterface HeatmapDendrogramSettingsX extends HeatmapDendrogramSettings {\n position: 'top' | 'bottom';\n}\ninterface HeatmapDendrogramSettingsY extends HeatmapDendrogramSettings {\n position: 'left' | 'right';\n}\n\ninterface HeatmapAnnotation {\n id: string;\n valueColumn: ColumnName;\n showTitle: boolean;\n type: 'discrete' | 'continuous';\n colors: string[];\n}\n\ninterface HeatmapAnnotationX extends HeatmapAnnotation {\n axis: 'x';\n position: 'top' | 'bottom';\n titlePosition: 'left' | 'right';\n}\ninterface HeatmapAnnotationY extends HeatmapAnnotation {\n axis: 'y';\n position: 'left' | 'right';\n titlePosition: 'top' | 'bottom';\n}\n\nexport class HeatmapSettingsImpl implements SettingsInterface {\n readonly id: string;\n readonly type = 'heatmap';\n readonly facetSettings: {\n order: string[] | null;\n sharedX: boolean;\n sharedY: boolean;\n nRows?: number;\n nCols?: number;\n };\n readonly xColumn: ColumnName;\n readonly xGroupBy: ColumnName[];\n readonly xSortBy: ColumnName[];\n readonly yColumn: ColumnName;\n readonly yGroupBy: ColumnName[];\n readonly ySortBy: ColumnName[];\n readonly valueColumn: ColumnName;\n readonly facetBy: ColumnName[];\n readonly normalization: { direction: NormalizationDirection, method: NormalizationMethod, colorRange?: number[] } | null;\n readonly chartSettings: {\n readonly title: { name: string; show: boolean; position: TitlePosition };\n readonly size: {\n width: number;\n height: number;\n cellWidth: number | null;\n cellHeight: number | null;\n innerOffset: number;\n outerOffset: number;\n };\n readonly frame: { type: 'full' | 'groups' | 'none' };\n readonly valueType: 'discrete' | 'continuous';\n readonly yAxis: {\n title: string;\n showTicks: boolean;\n showTitle: boolean;\n showAxisLabels: boolean;\n showGroupLabels: boolean;\n position: 'left' | 'right';\n groupingPosition: 'left' | 'right';\n axisLabelsAngle: 0 | 45 | 90;\n groupLabelsAngle: 0 | 45 | 90;\n sorting: 'asc' | 'desc';\n };\n readonly xAxis: {\n title: string;\n showTicks: boolean;\n showTitle: boolean;\n showAxisLabels: boolean;\n showGroupLabels: boolean;\n position: 'bottom' | 'top';\n groupingPosition: 'bottom' | 'top';\n axisLabelsAngle: 0 | 45 | 90;\n groupLabelsAngle: 0 | 45 | 90;\n sorting: 'asc' | 'desc';\n };\n readonly legend: { show: boolean; position: LegendPosition };\n readonly tooltips: { show: boolean; content?: ColumnName[] };\n };\n readonly keysOrder: Record<string, string[]>;\n readonly aes: {\n colorsList: string[];\n colorsMap: Record<string, string> | null;\n valueColors: string[] | null;\n valuesByColors: number[] | null;\n groupGap: number;\n cellStrokeColor: string;\n emptyCellColor: string;\n };\n\n readonly aggregation: {\n x: boolean;\n y: boolean;\n method: AggregationMethod;\n };\n\n readonly annotations: (HeatmapAnnotationX | HeatmapAnnotationY)[];\n\n readonly dendrogramX: HeatmapDendrogramSettingsX | null;\n readonly dendrogramY: HeatmapDendrogramSettingsY | null;\n readonly inheritedDendrogramAes: Record<string, AesRecord> | null;\n readonly NAValueAs: number | null;\n readonly transform: 'log' | null;\n readonly showEmptyRows: boolean;\n readonly showEmptyColumns: boolean;\n readonly cellsRenderingMode: 'canvas' | 'svg' | null;\n\n constructor(settings: HeatmapSettings) {\n HeatmapSettingsSchema.parse(settings);\n\n this.id = lodash.uniqueId('settings');\n this.xColumn = settings.xColumn;\n this.xGroupBy = settings.xGroupBy ?? [];\n this.xSortBy = settings.xSortBy ?? [];\n this.yColumn = settings.yColumn;\n this.yGroupBy = settings.yGroupBy ?? [];\n this.ySortBy = settings.ySortBy ?? [];\n this.valueColumn = settings.valueColumn;\n this.facetBy = settings.facetBy ?? [];\n this.chartSettings = {\n title: {\n position: 'left',\n show: true,\n ...settings.title,\n name: settings.title?.name ?? 'Chart',\n },\n size: {\n width: settings?.size?.width ?? (this.facetBy.length ? DEFAULT_WIDTH_SMALL : DEFAULT_WIDTH),\n height: settings?.size?.height ?? (this.facetBy.length ? DEFAULT_HEIGHT_SMALL : DEFAULT_HEIGHT),\n innerOffset: settings.size?.innerOffset ?? MIN_PADDING,\n outerOffset: settings.size?.outerOffset ?? MIN_MARGIN,\n cellWidth: settings?.size?.cellWidth ?? null,\n cellHeight: settings?.size?.cellHeight ?? null,\n },\n frame: { type: settings.frame?.type ?? 'none' },\n valueType: settings.valueType ?? 'continuous',\n yAxis: {\n title: settings.yColumn.label ?? settings.yColumn.value,\n showTicks: true,\n showTitle: true,\n showAxisLabels: true,\n showGroupLabels: true,\n position: 'left',\n groupingPosition: 'left',\n axisLabelsAngle: 90,\n groupLabelsAngle: 0,\n sorting: 'asc',\n ...settings.yAxis,\n },\n xAxis: {\n title: settings.xColumn.label ?? settings.xColumn.value,\n showTicks: true,\n showTitle: true,\n showAxisLabels: true,\n showGroupLabels: true,\n position: 'bottom',\n groupingPosition: 'bottom',\n axisLabelsAngle: 90,\n groupLabelsAngle: 0,\n sorting: 'asc',\n ...settings.xAxis,\n },\n legend: {\n show: true,\n position: 'right',\n ...settings.legend,\n },\n tooltips: {\n show: true,\n ...settings.tooltips,\n },\n };\n this.facetSettings = {\n sharedX: true,\n sharedY: true,\n order: settings.facetSettings?.order ?? null,\n ...settings.facetSettings,\n };\n if (this.chartSettings.size.cellWidth && this.facetBy.length > 0) {\n this.facetSettings.sharedX = true;\n }\n if (this.chartSettings.size.cellHeight && this.facetBy.length > 0) {\n this.facetSettings.sharedY = true;\n }\n this.keysOrder = settings.keysOrder ?? {};\n this.normalization = this.chartSettings.valueType === 'continuous' ? settings.normalization ?? null : null;\n this.transform = this.chartSettings.valueType === 'continuous' ? settings.transform ?? null : null;\n this.NAValueAs = settings.NAValueAs ?? null;\n this.showEmptyRows = settings.showEmptyRows ?? false;\n this.showEmptyColumns = settings.showEmptyColumns ?? false;\n this.aes = {\n colorsList: settings.aes?.colorsList ?? ['black', 'white', 'red'],\n colorsMap: settings.aes?.colorsMap ?? null,\n valueColors: settings.aes?.valueColors ?? null,\n valuesByColors: settings.aes?.valuesByColors ?? null,\n cellStrokeColor: settings.aes?.cellStrokeColor ?? 'none',\n groupGap: settings.aes?.groupGap ?? 3,\n emptyCellColor: settings.aes?.emptyCellColor ?? 'white',\n };\n\n this.annotations = (settings.annotations ?? []).map(item => {\n if (item.axis === 'x') {\n return {\n id: lodash.uniqueId('annotation'),\n axis: 'x',\n valueColumn: item.valueColumn,\n position: item.position ?? this.chartSettings.xAxis.position,\n titlePosition: item.titlePosition ?? 'right',\n showTitle: item.showTitle ?? true,\n type: item.type,\n colors: item.colors ?? ['white', 'black'],\n };\n }\n return {\n id: lodash.uniqueId('annotation'),\n axis: 'y',\n valueColumn: item.valueColumn,\n position: item.position ?? this.chartSettings.yAxis.position,\n titlePosition: item.titlePosition ?? 'top',\n showTitle: item.showTitle ?? true,\n type: item.type,\n colors: item.colors ?? ['white', 'black'],\n };\n });\n\n if (settings.valueType === 'discrete' && (settings.dendrogramX || settings.dendrogramY)) {\n throw Error('Dendrogram is not available with discrete cells values');\n }\n\n this.aggregation = {\n x: false,\n y: false,\n method: 'min',\n ...settings.aggregation\n };\n\n this.dendrogramX = settings.dendrogramX\n ? {\n ...DEFAULT_DENDRO,\n position: 'top',\n ...settings.dendrogramX,\n aes: {\n ...DEFAULT_DENDRO_AES,\n ...settings.dendrogramX?.aes,\n },\n }\n : null;\n this.dendrogramY = settings.dendrogramY\n ? {\n ...DEFAULT_DENDRO,\n position: 'left',\n ...settings.dendrogramY,\n aes: {\n ...DEFAULT_DENDRO_AES,\n ...settings.dendrogramY?.aes,\n },\n }\n : null;\n this.inheritedDendrogramAes = settings.inheritedDendrogramAes ?? null;\n this.cellsRenderingMode = settings.cellsRenderingMode ?? null;\n }\n}\n"],"mappings":";;;;AAaA,IAAM,IAAqB;CACvB,WAAW;CACX,UAAU;CACV,SAAS;CACT,SAAS;CACT,WAAW;CACX,WAAW;CACd,EACK,IAA4C;CAC9C,MAAM;CACN,UAAU;CACV,SAAS;CACT,QAAQ;CACR,WAAW;CACX,QAAQ;CACR,iBAAiB;CACjB,KAAK;CACR,EA8CY,IAAb,MAA8D;CAC1D;CACA,OAAgB;CAChB;CAOA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CAuCA;CACA;CAUA;CAMA;CAEA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CAEA,YAAY,GAA2B;AAsHnC,MArHA,EAAsB,MAAM,EAAS,EAErC,KAAK,KAAK,EAAO,SAAS,WAAW,EACrC,KAAK,UAAU,EAAS,SACxB,KAAK,WAAW,EAAS,YAAY,EAAE,EACvC,KAAK,UAAU,EAAS,WAAW,EAAE,EACrC,KAAK,UAAU,EAAS,SACxB,KAAK,WAAW,EAAS,YAAY,EAAE,EACvC,KAAK,UAAU,EAAS,WAAW,EAAE,EACrC,KAAK,cAAc,EAAS,aAC5B,KAAK,UAAU,EAAS,WAAW,EAAE,EACrC,KAAK,gBAAgB;GACjB,OAAO;IACH,UAAU;IACV,MAAM;IACN,GAAG,EAAS;IACZ,MAAM,EAAS,OAAO,QAAQ;IACjC;GACD,MAAM;IACF,OAAO,GAAU,MAAM,UAAU,KAAK,QAAQ,SAAA,MAAA;IAC9C,QAAQ,GAAU,MAAM,WAAW,KAAK,QAAQ,SAAA,MAAA;IAChD,aAAa,EAAS,MAAM,eAAA;IAC5B,aAAa,EAAS,MAAM,eAAA;IAC5B,WAAW,GAAU,MAAM,aAAa;IACxC,YAAY,GAAU,MAAM,cAAc;IAC7C;GACD,OAAO,EAAE,MAAM,EAAS,OAAO,QAAQ,QAAQ;GAC/C,WAAW,EA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AK,YAAY;GACpC,gBAAgB,EAAS,KAAK,kBAAkB;GACnD,EAED,KAAK,eAAe,EAAS,eAAe,EAAE,EAAE,KAAI,MAC5C,EAAK,SAAS,MACP;GACH,IAAI,EAAO,SAAS,aAAa;GACjC,MAAM;GACN,aAAa,EAAK;GAClB,UAAU,EAAK,YAAY,KAAK,cAAc,MAAM;GACpD,eAAe,EAAK,iBAAiB;GACrC,WAAW,EAAK,aAAa;GAC7B,MAAM,EAAK;GACX,QAAQ,EAAK,UAAU,CAAC,SAAS,QAAQ;GAC5C,GAEE;GACH,IAAI,EAAO,SAAS,aAAa;GACjC,MAAM;GACN,aAAa,EAAK;GAClB,UAAU,EAAK,YAAY,KAAK,cAAc,MAAM;GACpD,eAAe,EAAK,iBAAiB;GACrC,WAAW,EAAK,aAAa;GAC7B,MAAM,EAAK;GACX,QAAQ,EAAK,UAAU,CAAC,SAAS,QAAQ;GAC5C,CACH,EAEE,EAAS,cAAc,eAAe,EAAS,eAAe,EAAS,aACvE,OAAM,MAAM,yDAAyD;AAiCzE,EA9BA,KAAK,cAAc;GACf,GAAG;GACH,GAAG;GACH,QAAQ;GACR,GAAG,EAAS;GACf,EAED,KAAK,cAAc,EAAS,cACtB;GACE,GAAG;GACH,UAAU;GACV,GAAG,EAAS;GACZ,KAAK;IACD,GAAG;IACH,GAAG,EAAS,aAAa;IAC5B;GACJ,GACC,MACN,KAAK,cAAc,EAAS,cACtB;GACE,GAAG;GACH,UAAU;GACV,GAAG,EAAS;GACZ,KAAK;IACD,GAAG;IACH,GAAG,EAAS,aAAa;IAC5B;GACJ,GACC,MACN,KAAK,yBAAyB,EAAS,0BAA0B,MACjE,KAAK,qBAAqB,EAAS,sBAAsB"}
|
|
@@ -40,8 +40,10 @@ export type GroupedCellsData<T extends string> = {
|
|
|
40
40
|
cells: Record<string, Record<string, Cell<T>>>;
|
|
41
41
|
}>;
|
|
42
42
|
};
|
|
43
|
+
export declare const sortByColumns: (arr: string[], direction: "asc" | "desc", sortColumns: ColumnName[], dataByKeys: Record<string, Record<string, DataValue>>) => string[];
|
|
43
44
|
export declare function fillCellsData<T extends string>(result: GroupedCellsData<T>, { data, xColumn, yColumn, valueColumns, facetBy, xGroupBy, yGroupBy, facetSettings, annotations, dendrogramX, dendrogramY, normalizationBySource, // separated for color and size for example
|
|
44
|
-
NAValueAs,
|
|
45
|
+
NAValueAs, transformBySource, // same per-source pattern as normalization
|
|
46
|
+
keysOrder, xAxis, yAxis, xSortBy, ySortBy, aggregation, showEmptyRows, showEmptyColumns, }: {
|
|
45
47
|
data: DataFrame;
|
|
46
48
|
xColumn: ColumnName;
|
|
47
49
|
yColumn: ColumnName;
|
|
@@ -55,9 +57,12 @@ NAValueAs, keysOrder, xAxis, yAxis, aggregation, showEmptyRows, showEmptyColumns
|
|
|
55
57
|
dendrogramY: HeatmapSettingsImpl['dendrogramY'];
|
|
56
58
|
normalizationBySource: Record<T, HeatmapSettingsImpl['normalization']>;
|
|
57
59
|
NAValueAs: HeatmapSettingsImpl['NAValueAs'];
|
|
60
|
+
transformBySource?: Record<T, HeatmapSettingsImpl['transform']>;
|
|
58
61
|
keysOrder: HeatmapSettingsImpl['keysOrder'];
|
|
59
62
|
xAxis: HeatmapSettingsImpl['chartSettings']['xAxis'] | BubbleSettingsImpl['chartSettings']['xAxis'];
|
|
60
63
|
yAxis: HeatmapSettingsImpl['chartSettings']['yAxis'] | BubbleSettingsImpl['chartSettings']['yAxis'];
|
|
64
|
+
xSortBy?: HeatmapSettingsImpl['xSortBy'];
|
|
65
|
+
ySortBy?: HeatmapSettingsImpl['ySortBy'];
|
|
61
66
|
aggregation: HeatmapSettingsImpl['aggregation'];
|
|
62
67
|
showEmptyRows?: boolean;
|
|
63
68
|
showEmptyColumns?: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fillCellsData.d.ts","sourceRoot":"","sources":["../../src/heatmap/fillCellsData.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"fillCellsData.d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Ae,CAAC,CAAC,OAAO,CAAC,CAAC;IACpG,OAAO,CAAC,EAAE,mBAAmB,CAAC,SAAS,CAAC,CAAC;IACzC,OAAO,CAAC,EAAE,mBAAmB,CAAC,SAAS,CAAC,CAAC;IACzC,WAAW,EAAE,mBAAmB,CAAC,aAAa,CAAC,CAAC;IAChD,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,gBAAgB,CAAC,EAAE,OAAO,CAAC;CAC9B,uBAgSJ"}
|
|
@@ -2,7 +2,7 @@ import { exhaustive as e } from "../utils/index.js";
|
|
|
2
2
|
import { getFacetStringKey as t } from "../discrete/utils/getFacetStringKey.js";
|
|
3
3
|
import { getFacetLabels as n } from "../discrete/utils/getFacetLabels.js";
|
|
4
4
|
import { getFacetOrGroupKey as r } from "../utils/getFacetOrGroupKey.js";
|
|
5
|
-
import i from "
|
|
5
|
+
import { intersect as i } from "../utils/intersect.js";
|
|
6
6
|
import { deviation as a, extent as o, mean as s, quantileSorted as c, sum as l } from "d3-array";
|
|
7
7
|
function u(e) {
|
|
8
8
|
let t = a(e), n = s(e);
|
|
@@ -40,30 +40,49 @@ function m(e) {
|
|
|
40
40
|
function h(e) {
|
|
41
41
|
if (!e.length) return [];
|
|
42
42
|
let t = [[]];
|
|
43
|
-
|
|
44
|
-
let
|
|
45
|
-
e.
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
43
|
+
for (let n of e) {
|
|
44
|
+
let e = [];
|
|
45
|
+
for (let r of n) e.push(...t.map((e) => [...e, r]));
|
|
46
|
+
t = e;
|
|
47
|
+
}
|
|
48
|
+
return t;
|
|
49
|
+
}
|
|
50
|
+
var g = (e, t, n = {}) => {
|
|
51
|
+
let r = t === "asc" ? 1 : -1;
|
|
52
|
+
return e.sort((e, t) => r * (n[e] ?? e).localeCompare(n[t] ?? t, "en", { numeric: !0 }));
|
|
53
|
+
};
|
|
54
|
+
function _(e) {
|
|
55
|
+
return !!(e == null || typeof e == "number" && Number.isNaN(e));
|
|
56
|
+
}
|
|
57
|
+
function v(e, t, n) {
|
|
58
|
+
let r = _(e), i = _(t);
|
|
59
|
+
if (r && i) return 0;
|
|
60
|
+
if (r) return 1;
|
|
61
|
+
if (i) return -1;
|
|
62
|
+
let a = n === "asc" ? 1 : -1;
|
|
63
|
+
return typeof e == "number" && typeof t == "number" ? a * (e < t ? -1 : e > t ? 1 : 0) : a * String(e).localeCompare(String(t), "en", { numeric: !0 });
|
|
49
64
|
}
|
|
50
|
-
|
|
51
|
-
|
|
65
|
+
const y = (e, t, n, r) => e.sort((e, i) => {
|
|
66
|
+
for (let a of n) {
|
|
67
|
+
let n = v(r[a.value]?.[e], r[a.value]?.[i], t);
|
|
68
|
+
if (n !== 0) return n;
|
|
69
|
+
}
|
|
70
|
+
return 0;
|
|
71
|
+
});
|
|
72
|
+
function b(e, t, n, r, i) {
|
|
52
73
|
if (t.x || t.y) {
|
|
53
74
|
let a = e.meta.valueSources.reduce((e, t) => (e[t] = [Infinity, -Infinity], e), {});
|
|
54
|
-
e.meta.facetKeys
|
|
75
|
+
for (let o of e.meta.facetKeys) {
|
|
55
76
|
let { xKeys: s, yKeys: c, cells: l, xKeysByGroups: u, yKeysByGroups: d } = e.facets[o], f = t.x ? u : s.reduce((e, t) => (e[t] = [t], e), {}), h = t.y ? d : c.reduce((e, t) => (e[t] = [t], e), {}), g = Object.keys(f), _ = Object.keys(h);
|
|
56
77
|
for (let n of g) for (let r of _) {
|
|
57
78
|
let i = e.meta.valueSources.reduce((e, t) => (e[t] = [], e), {});
|
|
58
|
-
f[n]
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
});
|
|
66
|
-
});
|
|
79
|
+
for (let t of f[n]) for (let n of h[r]) {
|
|
80
|
+
for (let r of e.meta.valueSources) {
|
|
81
|
+
let e = l[t]?.[n]?.value?.[r];
|
|
82
|
+
e !== void 0 && i[r].push(e);
|
|
83
|
+
}
|
|
84
|
+
delete l[t]?.[n];
|
|
85
|
+
}
|
|
67
86
|
for (let s of e.meta.valueSources) {
|
|
68
87
|
let c = i[s];
|
|
69
88
|
if (c.length > 0) {
|
|
@@ -82,117 +101,125 @@ function _(e, t, n, r, i) {
|
|
|
82
101
|
}
|
|
83
102
|
}
|
|
84
103
|
}
|
|
85
|
-
t.x
|
|
86
|
-
n.
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
}), _.forEach((n) => {
|
|
99
|
-
r.forEach((r) => {
|
|
100
|
-
let a = i.find((e) => e.valueColumn.value === r || e.valueColumn.valueLabels === r);
|
|
101
|
-
if (!a) return;
|
|
104
|
+
if (t.x) for (let r of g) for (let a of n) {
|
|
105
|
+
let n = i.find((e) => e.valueColumn.value === a || e.valueColumn.valueLabels === a);
|
|
106
|
+
if (!n) continue;
|
|
107
|
+
let o = [];
|
|
108
|
+
for (let t of f[r]) o.push(e.meta.xDataByKeys[a][t]), delete e.meta.xDataByKeys[a][t];
|
|
109
|
+
let s = n.type === "continuous" ? p(t.method, o) : m(o);
|
|
110
|
+
e.meta.xDataByKeys[a][r] = s;
|
|
111
|
+
}
|
|
112
|
+
if (t.y) {
|
|
113
|
+
for (let t of r) e.meta.yDataByKeys[t] = {};
|
|
114
|
+
for (let n of _) for (let a of r) {
|
|
115
|
+
let r = i.find((e) => e.valueColumn.value === a || e.valueColumn.valueLabels === a);
|
|
116
|
+
if (!r) continue;
|
|
102
117
|
let o = [];
|
|
103
|
-
h[n].
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
118
|
+
for (let t of h[n]) o.push(e.meta.yDataByKeys[a][t]), delete e.meta.yDataByKeys[a][t];
|
|
119
|
+
let s = r.type === "continuous" ? p(t.method, o) : m(o);
|
|
120
|
+
e.meta.yDataByKeys[a][n] = s;
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
t.x && (e.facets[o].xKeys = Object.keys(u), e.facets[o].xKeysByGroups = { null: e.facets[o].xKeys }, e.meta.xLabels = e.meta.xGroupLabels, e.meta.xGroupKeys = ["null"], e.meta.xGroupKeyValues = { null: ["null"] }), t.y && (e.facets[o].yKeys = Object.keys(d), e.facets[o].yKeysByGroups = { null: e.facets[o].yKeys }, e.meta.yLabels = e.meta.yGroupLabels, e.meta.yGroupKeys = ["null"], e.meta.yGroupKeyValues = { null: ["null"] });
|
|
124
|
+
}
|
|
125
|
+
e.meta.valueExtent = a;
|
|
111
126
|
}
|
|
112
127
|
}
|
|
113
|
-
function
|
|
128
|
+
function x(e, t) {
|
|
114
129
|
for (let n of e.meta.valueSources) e.meta.valueExtent[n][0] = Math.min(t.normalizedValue?.[n], e.meta.valueExtent[n][0]), e.meta.valueExtent[n][1] = Math.max(t.normalizedValue?.[n], e.meta.valueExtent[n][1]);
|
|
115
130
|
}
|
|
116
|
-
function
|
|
131
|
+
function S(e, t) {
|
|
117
132
|
if (Object.values(t).length) {
|
|
118
133
|
let n = e.meta.valueSources.reduce((e, n) => (t[n] && (e[n] = [Infinity, -Infinity]), e), {});
|
|
119
|
-
e.meta.facetKeys
|
|
134
|
+
for (let r of e.meta.facetKeys) {
|
|
120
135
|
let { xKeys: i, yKeys: a, cells: o } = e.facets[r];
|
|
121
136
|
for (let r of e.meta.valueSources) {
|
|
122
137
|
let e = t[r];
|
|
123
138
|
if (!e) continue;
|
|
124
139
|
let s = e.direction === "row" ? i : a, c = e.direction === "row" ? a : i, l = e.direction === "row" ? (e, t) => o[e]?.[t] : (e, t) => o[t]?.[e];
|
|
125
|
-
|
|
140
|
+
for (let t of c) {
|
|
126
141
|
let i = [];
|
|
127
|
-
|
|
142
|
+
for (let e of s) {
|
|
128
143
|
let n = l(e, t)?.value?.[r];
|
|
129
144
|
n !== void 0 && i.push(n);
|
|
130
|
-
}
|
|
145
|
+
}
|
|
131
146
|
let a = f(e.method, i);
|
|
132
|
-
|
|
147
|
+
for (let e of s) {
|
|
133
148
|
let i = l(e, t);
|
|
134
149
|
i !== void 0 && (i.normalizedValue[r] = a(i.value?.[r]), n[r][0] = Math.min(i.normalizedValue?.[r], n[r][0]), n[r][1] = Math.max(i.normalizedValue?.[r], n[r][1]));
|
|
135
|
-
}
|
|
136
|
-
}
|
|
150
|
+
}
|
|
151
|
+
}
|
|
137
152
|
}
|
|
138
|
-
}
|
|
153
|
+
}
|
|
154
|
+
e.meta.valueExtent = {
|
|
139
155
|
...e.meta.valueExtent,
|
|
140
156
|
valueExtent: n
|
|
141
157
|
};
|
|
142
158
|
}
|
|
143
159
|
}
|
|
144
|
-
function
|
|
145
|
-
let
|
|
146
|
-
f?.order?.length && (
|
|
147
|
-
let
|
|
148
|
-
e.meta.facetKeys =
|
|
149
|
-
let
|
|
150
|
-
e.meta.facetKeyValues =
|
|
151
|
-
let
|
|
152
|
-
...H,
|
|
160
|
+
function C(e, { data: a, xColumn: o, yColumn: s, valueColumns: c, facetBy: l, xGroupBy: u, yGroupBy: d, facetSettings: f, annotations: p, dendrogramX: m, dendrogramY: _, normalizationBySource: v, NAValueAs: C, transformBySource: w, keysOrder: T, xAxis: E, yAxis: D, xSortBy: O, ySortBy: k, aggregation: A, showEmptyRows: j = !1, showEmptyColumns: M = !1 }) {
|
|
161
|
+
let N = l.length ? l.map((e) => T[e.value] ?? a.getColumnCategories(e.value)) : [["null"]], ee = u.length ? u.map((e) => T[e.value] ?? a.getColumnCategories(e.value)) : [["null"]], te = d.length ? d.map((e) => T[e.value] ?? a.getColumnCategories(e.value)) : [["null"]], P = h(N), F = h(ee), I = h(te);
|
|
162
|
+
f?.order?.length && (P = P.filter((e) => f.order?.includes(t(e))));
|
|
163
|
+
let L = P.map(r), R = new Set(L), z = F.map(r), B = I.map(r);
|
|
164
|
+
e.meta.facetKeys = L, e.meta.xGroupKeys = z, e.meta.yGroupKeys = B;
|
|
165
|
+
let V = n(a, l, L, P);
|
|
166
|
+
e.meta.facetKeyValues = L.reduce((e, t) => (e[t] = V[t], e), {}), e.meta.xGroupKeyValues = z.reduce((e, t, n) => (e[t] = F[n], e), {}), e.meta.yGroupKeyValues = B.reduce((e, t, n) => (e[t] = I[n], e), {});
|
|
167
|
+
let H = o.valueLabels ?? o.value, U = s.valueLabels ?? s.value, W = p.filter((e) => e.axis === "x").map((e) => e.valueColumn.valueLabels ?? e.valueColumn.value), G = p.filter((e) => e.axis === "y").map((e) => e.valueColumn.valueLabels ?? e.valueColumn.value), K = Object.values(m ?? {}).map((e) => e.value), q = Object.values(_ ?? {}).map((e) => e.value), J = (O ?? []).map((e) => e.value), Y = (k ?? []).map((e) => e.value), X = [...new Set([
|
|
153
168
|
...W,
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
169
|
+
...K,
|
|
170
|
+
...J,
|
|
171
|
+
H
|
|
172
|
+
])], Z = [...new Set([
|
|
157
173
|
...G,
|
|
158
|
-
|
|
159
|
-
|
|
174
|
+
...q,
|
|
175
|
+
...Y,
|
|
176
|
+
U
|
|
177
|
+
])];
|
|
160
178
|
for (let t = 0; t < a.rowsCount; t++) {
|
|
161
179
|
let n = r(l.map((e) => a.getColumnValue(e.value, t)));
|
|
162
|
-
if (!
|
|
180
|
+
if (!R.has(n)) continue;
|
|
163
181
|
let i = r(u.map((e) => a.getColumnValue(e.value, t))), f = r(d.map((e) => a.getColumnValue(e.value, t))), p = u.map((e) => a.getColumnValue(e.valueLabels ?? e.value, t)).join(", "), m = d.map((e) => a.getColumnValue(e.valueLabels ?? e.value, t)).join(", ");
|
|
164
182
|
e.meta.xGroupLabels[i] = p, e.meta.yGroupLabels[f] = m;
|
|
165
|
-
let h = String(a.getColumnValue(o.value, t)), g = String(a.getColumnValue(s.value, t)), _ = e.meta.valueSources.reduce((e, n) =>
|
|
183
|
+
let h = String(a.getColumnValue(o.value, t)), g = String(a.getColumnValue(s.value, t)), _ = e.meta.valueSources.reduce((e, n) => {
|
|
184
|
+
let r = a.getColumnValue(c[n].value, t) ?? C;
|
|
185
|
+
if (w?.[n] === "log" && typeof r == "number") {
|
|
186
|
+
let e = Math.log10(r);
|
|
187
|
+
r = Number.isFinite(e) ? e : null;
|
|
188
|
+
}
|
|
189
|
+
return e[n] = r, e;
|
|
190
|
+
}, {});
|
|
166
191
|
if (h === "null" || g === "null") continue;
|
|
167
|
-
let
|
|
168
|
-
if (!(
|
|
192
|
+
let v = Object.values(_).every((e) => e === null);
|
|
193
|
+
if (!(v && !j && !M)) {
|
|
169
194
|
if (e.facets[n] || (e.facets[n] = {
|
|
170
195
|
xKeys: [],
|
|
171
196
|
yKeys: [],
|
|
172
197
|
xKeysByGroups: {},
|
|
173
198
|
yKeysByGroups: {},
|
|
174
199
|
cells: {}
|
|
175
|
-
}), e.facets[n].xKeysByGroups[i] || (e.facets[n].xKeysByGroups[i] = []), e.facets[n].yKeysByGroups[f] || (e.facets[n].yKeysByGroups[f] = []), !
|
|
200
|
+
}), e.facets[n].xKeysByGroups[i] || (e.facets[n].xKeysByGroups[i] = []), e.facets[n].yKeysByGroups[f] || (e.facets[n].yKeysByGroups[f] = []), !v || M) {
|
|
176
201
|
e.facets[n].xKeys.push(h), e.facets[n].xKeysByGroups[i].push(h);
|
|
177
|
-
let r = a.getColumnValue(
|
|
202
|
+
let r = a.getColumnValue(H, t);
|
|
178
203
|
if (e.meta.xLabels[h] && String(r) !== e.meta.xLabels[h]) throw Error(`More than 1 x-label value for x=${h}`);
|
|
179
|
-
e.meta.xLabels[h] = String(r)
|
|
204
|
+
e.meta.xLabels[h] = String(r);
|
|
205
|
+
for (let n of X) {
|
|
180
206
|
let r = e.meta.xDataByKeys[n] !== void 0, i = r && e.meta.xDataByKeys[n][h] !== void 0;
|
|
181
207
|
if (r || (e.meta.xDataByKeys[n] = {}), i && e.meta.xDataByKeys[n][h] !== a.getColumnValue(n, t)) throw Error(`More than 1 value for x = ${h} and column = ${n}`);
|
|
182
208
|
i || (e.meta.xDataByKeys[n][h] = a.getColumnValue(n, t));
|
|
183
|
-
}
|
|
209
|
+
}
|
|
184
210
|
}
|
|
185
|
-
if (!
|
|
211
|
+
if (!v || j) {
|
|
186
212
|
e.facets[n].yKeys.push(g), e.facets[n].yKeysByGroups[f].push(g);
|
|
187
|
-
let r = a.getColumnValue(
|
|
213
|
+
let r = a.getColumnValue(U, t);
|
|
188
214
|
if (e.meta.yLabels[g] && String(r) !== e.meta.yLabels[g]) throw Error(`More than 1 y-label value for y=${g}`);
|
|
189
|
-
e.meta.yLabels[g] = String(r)
|
|
215
|
+
e.meta.yLabels[g] = String(r);
|
|
216
|
+
for (let n of Z) {
|
|
190
217
|
let r = e.meta.yDataByKeys[n] !== void 0, i = r && e.meta.yDataByKeys[n][g] !== void 0;
|
|
191
218
|
if (r || (e.meta.yDataByKeys[n] = {}), i && e.meta.yDataByKeys[n][g] !== a.getColumnValue(n, t)) throw Error(`More than 1 value for y = ${g} and column = ${n}`);
|
|
192
219
|
i || (e.meta.yDataByKeys[n][g] = a.getColumnValue(n, t));
|
|
193
|
-
}
|
|
220
|
+
}
|
|
194
221
|
}
|
|
195
|
-
if (!
|
|
222
|
+
if (!v) {
|
|
196
223
|
e.facets[n].cells[h] || (e.facets[n].cells[h] = {});
|
|
197
224
|
for (let t of e.meta.valueSources) if (e.facets[n].cells[h][g] && e.facets[n].cells[h][g].value[t] !== _[t]) throw Error(`More than 1 value for x=${h}, y=${g}`);
|
|
198
225
|
e.facets[n].cells[h][g] = {
|
|
@@ -203,27 +230,39 @@ function b(e, { data: a, xColumn: o, yColumn: s, valueColumns: c, facetBy: l, xG
|
|
|
203
230
|
y: g,
|
|
204
231
|
value: _,
|
|
205
232
|
normalizedValue: _
|
|
206
|
-
},
|
|
233
|
+
}, x(e, e.facets[n].cells[h][g]);
|
|
207
234
|
}
|
|
208
235
|
}
|
|
209
236
|
}
|
|
210
|
-
e.meta.facetKeys = e.meta.facetKeys.filter((t) => e.facets[t])
|
|
211
|
-
|
|
212
|
-
n
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
237
|
+
e.meta.facetKeys = e.meta.facetKeys.filter((t) => e.facets[t]);
|
|
238
|
+
for (let t of e.meta.facetKeys) {
|
|
239
|
+
let n = e.facets[t], r = [...new Set(n.xKeys)], a = [...new Set(n.yKeys)];
|
|
240
|
+
n.xKeys = T[o.value] ? i(T[o.value], r) : r, n.yKeys = T[s.value] ? i(T[s.value], a) : a;
|
|
241
|
+
for (let r of z) e.facets[t].xKeysByGroups[r] = i(n.xKeys, e.facets[t].xKeysByGroups[r]);
|
|
242
|
+
for (let r of B) e.facets[t].yKeysByGroups[r] = i(n.yKeys, e.facets[t].yKeysByGroups[r]);
|
|
243
|
+
}
|
|
244
|
+
b(e, A, X, Z, p), S(e, v);
|
|
245
|
+
let ne = u.some((e) => T[e.value]?.length > 0), re = d.some((e) => T[e.value]?.length > 0);
|
|
246
|
+
ne || (e.meta.xGroupKeys = g([...e.meta.xGroupKeys], E.sorting, e.meta.xGroupLabels)), re || (e.meta.yGroupKeys = g([...e.meta.yGroupKeys], D.sorting, e.meta.yGroupLabels));
|
|
247
|
+
let Q = !m && !A.x && O?.length ? O : null;
|
|
248
|
+
e.meta.xKeysByGroups = e.meta.xGroupKeys.reduce((t, n) => {
|
|
249
|
+
let r = [...new Set(e.meta.facetKeys.flatMap((t) => e.facets[t].xKeysByGroups[n]))], a = Q ? y(r, E.sorting, Q, e.meta.xDataByKeys) : g(r, E.sorting, e.meta.xLabels);
|
|
250
|
+
return t[n] = T[o.value] ? i(T[o.value], a) : a, t;
|
|
251
|
+
}, {}), e.meta.xKeys = e.meta.xGroupKeys.reduce((t, n) => (t = t.concat(e.meta.xKeysByGroups[n]), t), []);
|
|
252
|
+
let $ = !_ && !A.y && k?.length ? k : null;
|
|
253
|
+
e.meta.yKeysByGroups = e.meta.yGroupKeys.reduce((t, n) => {
|
|
254
|
+
let r = [...new Set(e.meta.facetKeys.flatMap((t) => e.facets[t].yKeysByGroups[n]))], a = $ ? y(r, D.sorting, $, e.meta.yDataByKeys) : g(r, D.sorting, e.meta.yLabels);
|
|
255
|
+
return t[n] = T[s.value] ? i(T[s.value], a) : a, t;
|
|
223
256
|
}, {}), e.meta.yKeys = e.meta.yGroupKeys.reduce((t, n) => (t = t.concat(e.meta.yKeysByGroups[n]), t), []);
|
|
257
|
+
for (let t of e.meta.facetKeys) {
|
|
258
|
+
for (let n of e.meta.xGroupKeys) e.facets[t].xKeysByGroups[n] = i(e.meta.xKeysByGroups[n], e.facets[t].xKeysByGroups[n] ?? []);
|
|
259
|
+
e.facets[t].xKeys = e.meta.xGroupKeys.flatMap((n) => e.facets[t].xKeysByGroups[n] ?? []);
|
|
260
|
+
for (let n of e.meta.yGroupKeys) e.facets[t].yKeysByGroups[n] = i(e.meta.yKeysByGroups[n], e.facets[t].yKeysByGroups[n] ?? []);
|
|
261
|
+
e.facets[t].yKeys = e.meta.yGroupKeys.flatMap((n) => e.facets[t].yKeysByGroups[n] ?? []);
|
|
262
|
+
}
|
|
224
263
|
for (let t of e.meta.valueSources) e.meta.valueExtent[t][0] === Infinity && (e.meta.valueExtent[t][0] = 0), e.meta.valueExtent[t][1] === -Infinity && (e.meta.valueExtent[t][1] = 0);
|
|
225
264
|
return e.meta.xLabels.null = o.nullValueLabel ?? "NA", e.meta.yLabels.null = s.nullValueLabel ?? "NA", e.meta.xGroupLabels.null = u.map((e) => e.nullValueLabel ?? "NA").join(", "), e.meta.yGroupLabels.null = d.map((e) => e.nullValueLabel ?? "NA").join(", "), e;
|
|
226
265
|
}
|
|
227
|
-
export {
|
|
266
|
+
export { C as fillCellsData };
|
|
228
267
|
|
|
229
268
|
//# sourceMappingURL=fillCellsData.js.map
|