@milaboratories/graph-maker 1.1.123 → 1.1.125

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.
@@ -1,11 +1,13 @@
1
- import { DemoDataStore, InputGuide, InputState } from '@milaboratories/pf-plots';
1
+ import { DemoDataStore, InputGuide, InputState, PlotDataAndSettings } from '@milaboratories/pf-plots';
2
2
  import { GraphMakerProps, ReactiveState, UniqueValuesData } from '../../types.ts';
3
+ import { Settings } from '@milaboratories/miplots4';
3
4
 
4
- export declare function composeChartSettings(inputGuide: InputGuide<InputState>, labelsInfo: Record<string, UniqueValuesData>, reactiveState: ReactiveState, dataStore: DemoDataStore | null, fixedOptions?: GraphMakerProps['fixedOptions']): Promise<{
5
- settings: Record<string, unknown>;
6
- dataByColumns: {
5
+ export declare function loadDataForPlot(inputGuide: InputGuide<InputState>, reactiveState: ReactiveState, dataStore: DemoDataStore | null, fixedOptions?: GraphMakerProps['fixedOptions']): Promise<PlotDataAndSettings | null>;
6
+ export declare function composeChartSettings(chartData: PlotDataAndSettings | null, inputGuide: InputGuide<InputState>, labelsInfo: Record<string, UniqueValuesData>, reactiveState: ReactiveState): {
7
+ settings: Settings;
8
+ data: {
7
9
  type: "columns";
8
10
  id: string;
9
11
  values: Record<string, import('@milaboratories/pf-plots').PValue[]>;
10
12
  };
11
- } | null>;
13
+ } | null;
@@ -1,4 +1,162 @@
1
- import { DemoDataStore, PlotDataAndSettings } from '@milaboratories/pf-plots';
1
+ import { InputGuide, InputState, PlotDataAndSettings } from '@milaboratories/pf-plots';
2
2
  import { ReactiveState, UniqueValuesData } from '../../types.ts';
3
+ import { DendroSettings } from '@milaboratories/miplots4';
3
4
 
4
- export declare function composeDendroSettings(dataStore: DemoDataStore, dataByColumns: PlotDataAndSettings['dataByColumns'], settings: Record<string, unknown>, reactiveState: ReactiveState, uniqueValuesData: Record<string, UniqueValuesData>, chartScale: number): Promise<Record<string, unknown>>;
5
+ export declare function composeDendroSettings(settings: DendroSettings, dataByColumns: PlotDataAndSettings['data']['byColumns'], reactiveState: ReactiveState, inputGuide: InputGuide<InputState>, uniqueValuesData: Record<string, UniqueValuesData>): {
6
+ type: "dendro";
7
+ title: {
8
+ name: string;
9
+ show?: boolean | undefined;
10
+ position?: "left" | "center" | "right" | undefined;
11
+ };
12
+ id: {
13
+ type: "column";
14
+ value: string;
15
+ label?: string | undefined;
16
+ valueLabels?: string | undefined;
17
+ };
18
+ parentId: {
19
+ type: "column";
20
+ value: string;
21
+ label?: string | undefined;
22
+ valueLabels?: string | undefined;
23
+ };
24
+ aes?: {
25
+ lineShape?: "solid" | "dashed" | "dotted" | "dotdash" | "longdash" | "twodash" | undefined;
26
+ lineColor?: string | {
27
+ columnName: {
28
+ type: "column";
29
+ value: string;
30
+ label?: string | undefined;
31
+ valueLabels?: string | undefined;
32
+ };
33
+ domain: number[];
34
+ range: string[];
35
+ type?: "linear" | "log" | undefined;
36
+ } | {
37
+ columnName: {
38
+ type: "column";
39
+ value: string;
40
+ label?: string | undefined;
41
+ valueLabels?: string | undefined;
42
+ };
43
+ valuesMap: Record<string, string>;
44
+ } | undefined;
45
+ nodeShape?: "0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" | "10" | "11" | "12" | "13" | "14" | "15" | "16" | "17" | "18" | "20" | "21" | "22" | "23" | "24" | "25" | {
46
+ columnName: {
47
+ type: "column";
48
+ value: string;
49
+ label?: string | undefined;
50
+ valueLabels?: string | undefined;
51
+ };
52
+ valuesMap: Record<string, "0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" | "10" | "11" | "12" | "13" | "14" | "15" | "16" | "17" | "18" | "20" | "21" | "22" | "23" | "24" | "25">;
53
+ } | undefined;
54
+ nodeColor?: string | {
55
+ columnName: {
56
+ type: "column";
57
+ value: string;
58
+ label?: string | undefined;
59
+ valueLabels?: string | undefined;
60
+ };
61
+ domain: number[];
62
+ range: string[];
63
+ type?: "linear" | "log" | undefined;
64
+ } | {
65
+ columnName: {
66
+ type: "column";
67
+ value: string;
68
+ label?: string | undefined;
69
+ valueLabels?: string | undefined;
70
+ };
71
+ valuesMap: Record<string, string>;
72
+ } | undefined;
73
+ nodeSize?: number | {
74
+ columnName: {
75
+ type: "column";
76
+ value: string;
77
+ label?: string | undefined;
78
+ valueLabels?: string | undefined;
79
+ };
80
+ domain: number[];
81
+ range: number[];
82
+ type?: "linear" | "log" | undefined;
83
+ } | {
84
+ columnName: {
85
+ type: "column";
86
+ value: string;
87
+ label?: string | undefined;
88
+ valueLabels?: string | undefined;
89
+ };
90
+ valuesMap: Record<string, number>;
91
+ } | undefined;
92
+ } | undefined;
93
+ size?: {
94
+ width?: number | undefined;
95
+ height?: number | undefined;
96
+ scale?: number | undefined;
97
+ minCellWidth?: number | undefined;
98
+ minCellHeight?: number | undefined;
99
+ maxCellWidth?: number | undefined;
100
+ maxCellHeight?: number | undefined;
101
+ } | undefined;
102
+ height?: {
103
+ type: "column";
104
+ value: string;
105
+ label?: string | undefined;
106
+ valueLabels?: string | undefined;
107
+ } | undefined;
108
+ legend?: {
109
+ show?: boolean | undefined;
110
+ position?: "right" | "inside" | "top" | "bottom" | undefined;
111
+ } | undefined;
112
+ facetSettings?: {
113
+ nRows?: number | undefined;
114
+ nCols?: number | undefined;
115
+ } | undefined;
116
+ facetBy?: {
117
+ type: "column";
118
+ value: string;
119
+ label?: string | undefined;
120
+ valueLabels?: string | undefined;
121
+ }[] | undefined;
122
+ showNodes?: boolean | undefined;
123
+ edgeInheritance?: "up" | "down" | undefined;
124
+ mode?: "normal" | "useAllNodesAsLeaves" | undefined;
125
+ leavesMode?: "normal" | "alignLeavesToLine" | undefined;
126
+ labels?: {
127
+ type: "column";
128
+ value: string;
129
+ label?: string | undefined;
130
+ valueLabels?: string | undefined;
131
+ } | undefined;
132
+ heatmapAnnotation?: {
133
+ type: "column";
134
+ value: string;
135
+ label?: string | undefined;
136
+ valueLabels?: string | undefined;
137
+ } | undefined;
138
+ heatmapAxis?: {
139
+ type: "column";
140
+ value: string;
141
+ label?: string | undefined;
142
+ valueLabels?: string | undefined;
143
+ } | undefined;
144
+ heatmapGroup?: {
145
+ type: "column";
146
+ value: string;
147
+ label?: string | undefined;
148
+ valueLabels?: string | undefined;
149
+ }[] | undefined;
150
+ heatmapSettings?: {
151
+ aes?: {
152
+ colorsList?: string[] | undefined;
153
+ colorsMap?: Record<string, string> | undefined;
154
+ } | undefined;
155
+ valueType?: "discrete" | "continuous" | "stringSource" | undefined;
156
+ } | undefined;
157
+ connectionType?: "curve" | "line" | "rectangle" | undefined;
158
+ showEdges?: boolean | undefined;
159
+ showLeavesLabels?: boolean | undefined;
160
+ showNodesLabels?: boolean | undefined;
161
+ rootPosition?: "left" | "top" | undefined;
162
+ };
@@ -2,7 +2,7 @@ import { ScatterplotSettings } from '@milaboratories/miplots4';
2
2
  import { InputGuide, InputState, PlotDataAndSettings } from '@milaboratories/pf-plots';
3
3
  import { ReactiveState, UniqueValuesData } from '../../types.ts';
4
4
 
5
- export declare function composeScatterplotSettings(settings: ScatterplotSettings, dataByColumns: PlotDataAndSettings['dataByColumns'], reactiveState: ReactiveState, inputGuide: InputGuide<InputState>, uniqueValuesData: Record<string, UniqueValuesData>): {
5
+ export declare function composeScatterplotSettings(settings: ScatterplotSettings, dataByColumns: PlotDataAndSettings['data']['byColumns'], reactiveState: ReactiveState, inputGuide: InputGuide<InputState>, uniqueValuesData: Record<string, UniqueValuesData>): {
6
6
  type: "scatterplot";
7
7
  title: {
8
8
  name: string;
@@ -2,19 +2,13 @@ import { ScatterplotUmapSettings } from '@milaboratories/miplots4';
2
2
  import { InputGuide, InputState, PlotDataAndSettings } from '@milaboratories/pf-plots';
3
3
  import { ReactiveState, UniqueValuesData } from '../../types.ts';
4
4
 
5
- export declare function composeScatterplotUmapSettings(settings: ScatterplotUmapSettings, dataByColumns: PlotDataAndSettings['dataByColumns'], reactiveState: ReactiveState, inputGuide: InputGuide<InputState>, uniqueValuesData: Record<string, UniqueValuesData>): {
5
+ export declare function composeScatterplotUmapSettings(settings: ScatterplotUmapSettings, dataByColumns: PlotDataAndSettings['data']['byColumns'], reactiveState: ReactiveState, inputGuide: InputGuide<InputState>, uniqueValuesData: Record<string, UniqueValuesData>): {
6
6
  type: "scatterplot-umap";
7
7
  title: {
8
8
  name: string;
9
9
  show?: boolean | undefined;
10
10
  position?: "left" | "center" | "right" | undefined;
11
11
  };
12
- keyColumn: {
13
- type: "column";
14
- value: string;
15
- label?: string | undefined;
16
- valueLabels?: string | undefined;
17
- };
18
12
  x: {
19
13
  type: "column";
20
14
  value: string;
@@ -115,6 +109,12 @@ export declare function composeScatterplotUmapSettings(settings: ScatterplotUmap
115
109
  frame?: {
116
110
  type?: "left" | "bottom" | "left-bottom" | "full" | "empty" | undefined;
117
111
  } | undefined;
112
+ keyColumn?: {
113
+ type: "column";
114
+ value: string;
115
+ label?: string | undefined;
116
+ valueLabels?: string | undefined;
117
+ } | undefined;
118
118
  xAxis?: {
119
119
  title?: string | {
120
120
  type: "column";
@@ -6,7 +6,7 @@ import { ScatterplotSettings } from '@milaboratories/miplots4';
6
6
 
7
7
  export declare function getStatLayers(statisticsSettings: DiscreteStatisticsState): ChartLayerSettings[];
8
8
  export declare function getDiscreteLayersSettings(layers: Layer[], layerSettings: LayersSettings, statisticsSettings: DiscreteStatisticsState, optionsState: DiscreteUIState, inputGuide: InputGuide<InputState>): ChartLayerSettings[];
9
- export declare function getScatterplotLayersSettings(layers: Layer[], layerSettings: ReturnType<typeof getDefaultLayersSettings>, dataByColumns: PlotDataAndSettings['dataByColumns'], optionsState: ScatterplotUIState, dataBindAes: ReactiveState['dataBindAes'], inputGuide: InputGuide<InputState>, groupingSchema?: ColumnNameSchema[], defaultDotSize?: number): ScatterplotSettings['layers'];
9
+ export declare function getScatterplotLayersSettings(layers: Layer[], layerSettings: ReturnType<typeof getDefaultLayersSettings>, dataByColumns: PlotDataAndSettings['data']['byColumns'], optionsState: ScatterplotUIState, dataBindAes: ReactiveState['dataBindAes'], inputGuide: InputGuide<InputState>, groupingSchema?: ColumnNameSchema[], defaultDotSize?: number): ScatterplotSettings['layers'];
10
10
  export type ChartLayerSettings = {
11
11
  [key: string]: string | boolean | null | Record<string, string | DotShape | NumberRange | {
12
12
  domain: number[];