@milaboratories/graph-maker 1.1.167 → 1.1.168
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/GraphMaker/constantsCommon.d.ts +2 -0
- package/dist/GraphMaker/constantsCommon.d.ts.map +1 -1
- package/dist/GraphMaker/constantsCommon.js +4 -2
- package/dist/GraphMaker/constantsCommon.js.map +1 -1
- package/dist/GraphMaker/forms/LayersForm/Layer/discrete/StackedArea.vue.d.ts.map +1 -1
- package/dist/GraphMaker/forms/LayersForm/Layer/discrete/StackedArea.vue.js +56 -38
- package/dist/GraphMaker/forms/LayersForm/Layer/discrete/StackedArea.vue.js.map +1 -1
- package/dist/GraphMaker/forms/LayersForm/Layer/discrete/StackedBar.vue.d.ts.map +1 -1
- package/dist/GraphMaker/forms/LayersForm/Layer/discrete/StackedBar.vue.js +48 -30
- package/dist/GraphMaker/forms/LayersForm/Layer/discrete/StackedBar.vue.js.map +1 -1
- package/dist/GraphMaker/utils/createChartSettingsForRender/composeDiscreteSettings.d.ts +2 -0
- package/dist/GraphMaker/utils/createChartSettingsForRender/composeDiscreteSettings.d.ts.map +1 -1
- package/dist/GraphMaker/utils/createChartSettingsForRender/getLayersDataFromForms.d.ts.map +1 -1
- package/dist/GraphMaker/utils/createChartSettingsForRender/getLayersDataFromForms.js +7 -5
- package/dist/GraphMaker/utils/createChartSettingsForRender/getLayersDataFromForms.js.map +1 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/discrete/DiscreteSettingsImpl.js +8 -8
- package/dist/node_modules/@milaboratories/miplots4/dist/discrete/DiscreteSettingsImpl.js.map +1 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/discrete/index.js +8 -8
- package/dist/node_modules/@milaboratories/miplots4/dist/discrete/layers/stackedBar.js +54 -29
- package/dist/node_modules/@milaboratories/miplots4/dist/discrete/layers/stackedBar.js.map +1 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/node_modules/d3-array/src/min.js +12 -6
- package/dist/node_modules/@milaboratories/miplots4/dist/node_modules/d3-array/src/min.js.map +1 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/types/discrete.js +2 -0
- package/dist/node_modules/@milaboratories/miplots4/dist/types/discrete.js.map +1 -1
- package/dist/node_modules/@milaboratories/pf-plots/dist/controllers/controllersByChartType/scatterplot-umap.js +64 -64
- package/dist/node_modules/@milaboratories/pf-plots/dist/controllers/controllersByChartType/scatterplot-umap.js.map +1 -1
- package/dist/node_modules/@milaboratories/pf-plots/dist/controllers/controllersByChartType/scatterplot.js +30 -30
- package/dist/node_modules/@milaboratories/pf-plots/dist/controllers/controllersByChartType/scatterplot.js.map +1 -1
- package/package.json +3 -3
|
@@ -186,6 +186,7 @@ export type LayersSettings = {
|
|
|
186
186
|
lineColor: ColorAes;
|
|
187
187
|
opacity: number;
|
|
188
188
|
normalize: boolean;
|
|
189
|
+
height: 'sum' | 'max' | 'mean' | 'median';
|
|
189
190
|
};
|
|
190
191
|
stackedArea: {
|
|
191
192
|
fillColor: ColorAes | null;
|
|
@@ -193,6 +194,7 @@ export type LayersSettings = {
|
|
|
193
194
|
barsOpacity: number;
|
|
194
195
|
areaOpacity: number;
|
|
195
196
|
normalize: boolean;
|
|
197
|
+
height: 'sum' | 'max' | 'mean' | 'median';
|
|
196
198
|
showBars: boolean;
|
|
197
199
|
};
|
|
198
200
|
line: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constantsCommon.d.ts","sourceRoot":"","sources":["../../src/GraphMaker/constantsCommon.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AAC1D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,KAAK,CAAC;AACrC,OAAO,EACL,QAAQ,EACR,QAAQ,EACT,MAAM,gCAAgC,CAAC;AA6BxC,OAAO,EACL,aAAa,EACb,WAAW,EACX,aAAa,EACb,sBAAsB,EACtB,KAAK,EACL,YAAY,EAAE,Y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AAa,MAAM,CAAC;AACjC,eAAO,MAAM,cAAc,MAAM,CAAC;AAClC,eAAO,MAAM,mBAAmB,MAAM,CAAC;AACvC,eAAO,MAAM,oBAAoB,MAAM,CAAC;AAExC,eAAO,MAAM,8BAA8B,MAAM,CAAC"}
|
|
@@ -232,7 +232,8 @@ const ce = () => ({
|
|
|
232
232
|
fillColor: null,
|
|
233
233
|
lineColor: i,
|
|
234
234
|
opacity: 1,
|
|
235
|
-
normalize: !1
|
|
235
|
+
normalize: !1,
|
|
236
|
+
height: "sum"
|
|
236
237
|
},
|
|
237
238
|
stackedArea: {
|
|
238
239
|
fillColor: null,
|
|
@@ -240,7 +241,8 @@ const ce = () => ({
|
|
|
240
241
|
barsOpacity: 1,
|
|
241
242
|
areaOpacity: 0.7,
|
|
242
243
|
normalize: !1,
|
|
243
|
-
showBars: !0
|
|
244
|
+
showBars: !0,
|
|
245
|
+
height: "sum"
|
|
244
246
|
},
|
|
245
247
|
line: {
|
|
246
248
|
pointsValues: "mean",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constantsCommon.js","sources":["../../src/GraphMaker/constantsCommon.ts"],"sourcesContent":["import type { ChartType } from '@milaboratories/pf-plots';\nimport type { Component } from 'vue';\nimport {\n DotShape,\n LineType\n} from './components/AesSettings/types';\nimport {\n DEFAULT_BLACK,\n DEFAULT_DOT_SHAPE,\n DEFAULT_LINE_TYPE\n} from './constantsAesthetic';\nimport { DEFAULT_DOT_SIZE, DEFAULT_LINE_COLOR } from './dataBindAes';\nimport BarAndErrorIcon from './icons/BarAndErrorIcon.vue';\nimport BarAndLineIcon from './icons/BarAndLineIcon.vue';\nimport BarIcon from './icons/BarIcon.vue';\nimport BinnedDotsIcon from './icons/BinnedDotsIcon.vue';\nimport BoxplotAndBinnedIcon from './icons/BoxplotAndBinnedIcon.vue';\nimport BoxplotAndJitterIcon from './icons/BoxplotAndJitterIcon.vue';\nimport BoxplotIcon from './icons/BoxplotIcon.vue';\nimport DendroIcon from './icons/DendroIcon.vue';\nimport HeatmapIcon from './icons/HeatmapIcon.vue';\nimport JitteredDotsIcon from './icons/JitteredDotsIcon.vue';\nimport LineAndBinnedIcon from './icons/LineAndBinnedIcon.vue';\nimport LineAndErrorbarIcon from './icons/LineAndErrorbarIcon.vue';\nimport LineAndJitterIcon from './icons/LineAndJitterIcon.vue';\nimport LineIcon from './icons/LineIcon.vue';\nimport LogoIcon from './icons/LogoIcon.vue';\nimport ScatterplotIcon from './icons/ScatterplotIcon.vue';\nimport SinaIcon from './icons/SinaIcon.vue';\nimport StackedBarIcon from './icons/StackedBarIcon.vue';\nimport StackedAreaIcon from './icons/StackedAreaIcon.vue';\nimport ViolinAndBinnedIcon from './icons/ViolinAndBinnedIcon.vue';\nimport ViolinAndJitterIcon from './icons/ViolinAndJitterIcon.vue';\nimport ViolinIcon from './icons/ViolinIcon.vue';\nimport {\n AxisTitleMode,\n DeepPartial,\n DiscreteLayer,\n DiscreteLayersTemplate,\n Frame,\n HeatmapFrame, HeatmapLayer, HeatmapLayerTemplate, HistogramLayer, HistogramLayerTemplate,\n LabelsPosition,\n LabelsRotation,\n Layer,\n LayersTemplate,\n Scale,\n ScatterplotLayer,\n ScatterplotLayersTemplate,\n TitlePosition\n} from './types';\n\nexport const DEFAULT_CHART_TYPE: ChartType = 'discrete';\n\nexport function getInitialTemplate(\n restoredTemplate: LayersTemplate | null,\n chartType: ChartType\n) {\n if (chartType === 'discrete') {\n return restoredTemplate &&\n DISCRETE_TEMPLATES_MAP[restoredTemplate as DiscreteLayersTemplate]\n ? restoredTemplate\n : 'box';\n }\n if (chartType === 'scatterplot' || chartType === 'scatterplot-umap') {\n return restoredTemplate &&\n SCATTERPLOT_TEMPLATES_MAP[restoredTemplate as ScatterplotLayersTemplate]\n ? restoredTemplate\n : 'dots';\n }\n if (chartType === 'dendro') {\n return 'dendro';\n }\n return restoredTemplate ?? 'heatmap';\n}\n\nexport const DISCRETE_TEMPLATES_MAP: Record<\n DiscreteLayersTemplate,\n DiscreteLayer[]\n> = {\n box: ['box'],\n box_binnedDots: ['box', 'binnedDots'],\n box_jitteredDots: ['box', 'jitteredDots'],\n violin: ['violin'],\n violin_binnedDots: ['violin', 'binnedDots'],\n violin_jitteredDots: ['violin', 'jitteredDots'],\n binnedDots: ['binnedDots'],\n jitteredDots: ['jitteredDots'],\n bar: ['bar'],\n bar_line: ['bar', 'line'],\n bar_errorbar: ['bar', 'errorbar'],\n stackedBar: ['stackedBar'],\n stackedArea: ['stackedArea'],\n line: ['line'],\n line_jitteredDots: ['line', 'jitteredDots'],\n line_binnedDots: ['line', 'binnedDots'],\n line_errorbar: ['line', 'errorbar'],\n errorbar: ['errorbar'],\n sina: ['sina'],\n logo: ['logo']\n};\n\nexport const SCATTERPLOT_TEMPLATES_MAP: Record<\n ScatterplotLayersTemplate,\n ScatterplotLayer[]\n> = {\n dots: ['dots'],\n curve: ['curve'],\n curve_dots: ['curve', 'dots']\n};\n\nexport const SCATTERPLOT_UMAP_TEMPLATES_MAP: Partial<Record<\n ScatterplotLayersTemplate,\n ScatterplotLayer[]\n>> = {\n dots: ['dots'],\n curve_dots: ['curve', 'dots']\n};\n\nexport const HEATMAP_TEMPLATES_MAP: Record<HeatmapLayerTemplate, HeatmapLayer[]> = {\n heatmap: ['heatmap'],\n heatmapClustered: ['heatmapClustered']\n};\nexport const HISTOGRAM_TEMPLATES_MAP: Record<HistogramLayerTemplate, HistogramLayer[]> = {\n bins: ['bins']\n}\nexport const LAYER_TITLES: Record<Layer, string> = {\n box: 'Boxplot',\n binnedDots: 'Binned Dots',\n jitteredDots: 'Jittered Dots',\n violin: 'Violins',\n bar: 'Bar',\n stackedBar: 'Stacked Bar',\n stackedArea: 'Stacked Bar + Stream Area',\n line: 'Line',\n errorbar: 'Error Bar',\n sina: 'Sina',\n logo: 'Logo Plot',\n dots: 'Scatter Plot',\n curve: 'Curve',\n heatmap: 'Heatmap',\n heatmapClustered: 'Heatmap + Dendro',\n dendro: 'Dendrogram',\n bins: 'Histogram',\n bubble: 'Bubble plot'\n};\n\nexport type DiscreteStatisticsState = {\n overall: {\n data: { testMethod: null | string };\n validity: { testMethod: boolean };\n };\n referenceGroup: {\n data: {\n testMethod: null | string;\n referenceGroup: null | string;\n correctionMethod: string;\n format: 'significance' | 'pValue';\n ns: boolean;\n };\n validity: {\n testMethod: boolean;\n referenceGroup: boolean;\n };\n };\n pairwise: {\n data: {\n testMethod: null | string;\n correctionMethod: string;\n format: 'significance' | 'pValue';\n ns: boolean;\n };\n validity: { testMethod: boolean };\n };\n};\n\nexport type ScatterplotStatisticsState = {\n trend: {\n on: boolean,\n trim: boolean,\n showLegend: boolean\n },\n}\n\nexport type StatisticsState = DiscreteStatisticsState | ScatterplotStatisticsState;\n\nexport function getInitialStatisticsState(chartType: ChartType, initialData?: DeepPartial<StatisticsState>): StatisticsState {\n if (chartType === 'discrete') {\n const initial = initialData as DiscreteStatisticsState;\n return {\n overall: {\n data: { testMethod: initial?.overall?.data?.testMethod ?? null },\n validity: { testMethod: initial?.overall?.validity?.testMethod ?? true }\n },\n referenceGroup: {\n data: {\n testMethod: initial?.referenceGroup?.data?.testMethod ?? null,\n referenceGroup: initial?.referenceGroup?.data?.referenceGroup ?? null,\n correctionMethod: initial?.referenceGroup?.data?.correctionMethod ?? 'Bonferroni',\n format: initial?.referenceGroup?.data?.format ?? 'significance',\n ns: initial?.referenceGroup?.data?.ns ?? false\n },\n validity: {\n testMethod: initial?.referenceGroup?.validity?.testMethod ?? true,\n referenceGroup: initial?.referenceGroup?.validity?.referenceGroup ?? true\n }\n },\n pairwise: {\n data: {\n testMethod: initial?.pairwise?.data?.testMethod ?? null,\n correctionMethod: initial?.pairwise?.data?.correctionMethod ?? 'Bonferroni',\n format: initial?.pairwise?.data?.format ?? 'significance',\n ns: initial?.pairwise?.data?.ns ?? false\n },\n validity: { testMethod: initial?.pairwise?.validity?.testMethod ?? true }\n }\n } as DiscreteStatisticsState;\n }\n const initial = initialData as ScatterplotStatisticsState;\n return {\n trend: {\n on: initial?.trend?.on ?? false,\n trim: initial?.trend?.trim ?? false,\n showLegend: initial?.trend?.showLegend ?? true\n }\n };\n}\n\nexport type NumberRange = { min: number, max: number }\nexport type MappingLink = { type: string, value?: string }; // {type: 'primaryGrouping'} for example\nexport type ColorAes = string | MappingLink;\nexport type DotShapeAes = DotShape | MappingLink;\nexport type DotSizeAes = number | NumberRange;\nexport type LineTypeAes = LineType | MappingLink;\nexport type FixedOrMappedAes = ColorAes | DotShapeAes | LineTypeAes;\n\nexport type ContinuousDataMappingSize = {\n column: string,\n range: NumberRange\n}\n\nexport type ContinuousDataMappingForGraph<T extends string | number> = {columnName: ColumnNameSchema, domain: number[], range: T[], type: 'linear' | 'log'}\n\nexport type ColumnNameSchema = {\n type: 'column'\n value: string,\n label?: string\n valueLabels?: string\n}\n\nexport function isNumberRange(v: number | NumberRange | null | undefined): v is NumberRange {\n return typeof v !== 'undefined' && v !== null && typeof v === 'object' && 'min' in v && 'max' in v;\n}\n\nexport function isMappedAes(\n item: FixedOrMappedAes | null | string | number | boolean | unknown\n): item is MappingLink {\n return typeof item === 'object' && item !== null && 'type' in item;\n}\n\nexport function isContinuousDataMapping(v: ContinuousDataMappingSize | MappingLink | number | string | null | undefined): v is ContinuousDataMappingSize {\n return typeof v !== 'undefined' && v !== null && typeof v === 'object' && 'range' in v;\n}\n\nexport type LayersSettings = {\n //bubble\n bubble: {\n NAValueAs: number | null,\n minRadius: number,\n maxRadius: number,\n normalizationDirection: 'row' | 'column' | null,\n normalizationMethod: 'standardScaling' | 'meanNormalization',\n strokeColor: null | string\n },\n // histogram\n bins: {\n fillColor: ColorAes | null,\n opacity: number\n },\n //dendrogram\n dendro: {\n dotFill: ColorAes,\n dotShape: DotShapeAes,\n dotSize: DotSizeAes,\n lineColor: ColorAes,\n mode: 'normal' | 'useAllNodesAsLeaves',\n leavesMode: 'normal' | 'alignLeavesToLine',\n showTable: boolean,\n showLegend: boolean,\n },\n //heatmap\n heatmap: {\n NAValueAs: number | null,\n normalizationDirection: 'row' | 'column' | null,\n normalizationMethod: 'standardScaling' | 'meanNormalization',\n aggregateByX: boolean;\n aggregateByY: boolean;\n aggregationMethod: 'mean' | 'median' | 'min' | 'max'\n },\n heatmapClustered: {\n NAValueAs: number | null,\n normalizationDirection: 'row' | 'column' | null,\n normalizationMethod: 'standardScaling' | 'meanNormalization',\n dendrogramX: boolean,\n dendrogramY: boolean,\n disableClusteringX: boolean,\n disableClusteringY: boolean,\n aggregateByX: boolean;\n aggregateByY: boolean;\n aggregationMethod: 'mean' | 'median' | 'min' | 'max'\n },\n //scatterplot\n dots: {\n dotFill: ColorAes | null,\n dotShape: DotShapeAes | null,\n dotSize: ContinuousDataMappingSize | number | null\n },\n curve: {\n smoothing: boolean,\n lineColor: ColorAes\n },\n //discrete\n box: {\n showOutliers: boolean,\n fillColor: ColorAes | null,\n lineColor: ColorAes,\n dotShape: DotShapeAes,\n lineType: LineTypeAes,\n gapWidth: number,\n opacity: number,\n stat: {\n low: number,\n middle: number,\n upper: number,\n k: number,\n },\n },\n binnedDots: {\n fillColor: ColorAes | null,\n lineColor: ColorAes,\n opacity: number,\n showOutliers: boolean,\n },\n jitteredDots: {\n dotFill: ColorAes | null,\n dotShape: DotShapeAes,\n lineColor: ColorAes,\n opacity: number,\n showOutliers: boolean,\n },\n violin: {\n fillColor: ColorAes | null,\n lineColor: ColorAes,\n lineType: LineTypeAes,\n opacity: number,\n trim: boolean,\n showQuartiles: boolean,\n quartilesLineStyle: LineType,\n medianLineStyle: LineType\n },\n bar: {\n fillColor: ColorAes | null,\n lineColor: ColorAes,\n opacity: number,\n height: 'max' | 'mean' | 'median',\n },\n stackedBar: {\n fillColor: ColorAes | null,\n lineColor: ColorAes,\n opacity: number,\n normalize: boolean\n },\n stackedArea: {\n fillColor: ColorAes | null,\n lineColor: ColorAes,\n barsOpacity: number,\n areaOpacity: number,\n normalize: boolean,\n showBars: boolean\n },\n line: {\n pointsValues: 'mean' | 'median',\n emptyGroupValue: number,\n lineColor: ColorAes | null,\n dotShape: DotShapeAes,\n lineType: LineTypeAes,\n dotFill: ColorAes | null,\n opacity: number,\n },\n errorbar: {\n pointsValues: 'mean' | 'median',\n interval: 'sd' | 'se' | '',\n lineColor: ColorAes | null,\n dotShape: DotShapeAes,\n dotFill: ColorAes | null,\n opacity: number,\n },\n sina: {\n dotFill: ColorAes | null,\n dotShape: DotShapeAes,\n opacity: number,\n showOutliers: boolean,\n },\n logo: {\n normalize: boolean,\n opacity: number,\n }\n};\nexport const DEFAULT_LAYERS_SETTINGS: () => LayersSettings = () => ({\n //bubble\n bubble: {\n NAValueAs: 0,\n strokeColor: null,\n minRadius: 3,\n maxRadius: 38,\n normalizationDirection: 'row',\n normalizationMethod: 'standardScaling',\n },\n // histogram\n bins: {\n fillColor: null,\n opacity: 1\n },\n //dendro\n dendro: {\n dotFill: DEFAULT_BLACK,\n dotShape: DEFAULT_DOT_SHAPE,\n dotSize: DEFAULT_DOT_SIZE,\n lineColor: DEFAULT_BLACK,\n mode: 'normal',\n leavesMode: 'normal',\n showTable: false,\n showLegend: true\n },\n //heatmap\n heatmap: {\n NAValueAs: 0,\n normalizationDirection: 'row',\n normalizationMethod: 'standardScaling',\n aggregateByX: false,\n aggregateByY: false,\n aggregationMethod: 'mean'\n },\n heatmapClustered: {\n NAValueAs: 0,\n normalizationDirection: 'row',\n normalizationMethod: 'standardScaling',\n dendrogramX: true,\n dendrogramY: true,\n disableClusteringX: false,\n disableClusteringY: false,\n aggregateByX: false,\n aggregateByY: false,\n aggregationMethod: 'mean'\n },\n //scatterplot\n dots: {\n dotFill: null as ColorAes | null,\n dotShape: null as DotShapeAes | null,\n dotSize: null as ContinuousDataMappingSize | number | null\n },\n curve: { lineColor: DEFAULT_BLACK, smoothing: true },\n //discrete\n box: {\n showOutliers: true,\n fillColor: null as ColorAes | null,\n lineColor: DEFAULT_LINE_COLOR as ColorAes,\n dotShape: DEFAULT_DOT_SHAPE as DotShapeAes,\n lineType: DEFAULT_LINE_TYPE as LineTypeAes,\n gapWidth: 0.2,\n opacity: 1,\n stat: {\n low: 0.25,\n middle: 0.5,\n upper: 0.75,\n k: 1.5\n }\n },\n binnedDots: {\n fillColor: null as ColorAes | null,\n lineColor: DEFAULT_LINE_COLOR as ColorAes,\n opacity: 1,\n showOutliers: true\n },\n jitteredDots: {\n dotFill: null as ColorAes | null,\n dotShape: DEFAULT_DOT_SHAPE as DotShapeAes,\n lineColor: DEFAULT_LINE_COLOR as ColorAes,\n opacity: 1,\n showOutliers: true\n },\n violin: {\n fillColor: null as ColorAes | null,\n lineColor: DEFAULT_LINE_COLOR as ColorAes,\n lineType: DEFAULT_LINE_TYPE as LineTypeAes,\n opacity: 1,\n trim: false,\n showQuartiles: false,\n quartilesLineStyle: 'dashed',\n medianLineStyle: 'solid'\n },\n bar: {\n fillColor: null as ColorAes | null,\n lineColor: DEFAULT_LINE_COLOR as ColorAes,\n opacity: 1,\n height: 'max'\n },\n stackedBar: {\n fillColor: null as ColorAes | null,\n lineColor: DEFAULT_LINE_COLOR as ColorAes,\n opacity: 1,\n normalize: false\n },\n stackedArea: {\n fillColor: null as ColorAes | null,\n lineColor: DEFAULT_LINE_COLOR as ColorAes,\n barsOpacity: 1,\n areaOpacity: 0.7,\n normalize: false,\n showBars: true\n },\n line: {\n pointsValues: 'mean',\n emptyGroupValue: 0,\n lineColor: null as ColorAes | null,\n dotShape: DEFAULT_DOT_SHAPE as DotShapeAes,\n lineType: DEFAULT_LINE_TYPE as LineTypeAes,\n dotFill: null as ColorAes | null,\n opacity: 1\n },\n errorbar: {\n pointsValues: 'mean',\n interval: 'sd',\n lineColor: null as ColorAes | null,\n dotShape: DEFAULT_DOT_SHAPE as DotShapeAes,\n dotFill: null as ColorAes | null,\n opacity: 1\n },\n sina: {\n dotFill: null as ColorAes | null,\n dotShape: DEFAULT_DOT_SHAPE as DotShapeAes,\n opacity: 1,\n showOutliers: true\n },\n logo: {\n normalize: false,\n opacity: 1\n }\n});\n\nexport function getDefaultLayersSettings() {\n return DEFAULT_LAYERS_SETTINGS();\n}\n\nconst DISCRETE_LAYERS: Layer[] = [\n 'box',\n 'binnedDots',\n 'jitteredDots',\n 'violin',\n 'bar',\n 'stackedBar',\n 'line',\n 'errorbar',\n 'sina',\n 'logo'\n];\nconst SCATTERPLOT_LAYERS: Layer[] = ['dots', 'curve'];\nconst SCATTERPLOT_UMAP_LAYERS: Layer[] = ['dots'];\nconst HEATMAP_LAYERS: Layer[] = ['heatmap', 'heatmapClustered'];\nconst DENDRO_LAYERS: Layer[] = ['dendro'];\nconst HISTOGRAM_LAYERS: Layer[] = ['bins'];\nconst BUBBLE_LAYERS: Layer[] = ['bubble'];\nconst LAYERS_BY_CHART_TYPE: Record<ChartType, Layer[]> = {\n discrete: DISCRETE_LAYERS,\n scatterplot: SCATTERPLOT_LAYERS,\n 'scatterplot-umap': SCATTERPLOT_UMAP_LAYERS,\n heatmap: HEATMAP_LAYERS,\n dendro: DENDRO_LAYERS,\n histogram: HISTOGRAM_LAYERS,\n bubble: BUBBLE_LAYERS\n};\n\nexport function getInitialLayersSettings(\n initialSettings?: DeepPartial<LayersSettings>\n): LayersSettings {\n const defaultSettings = DEFAULT_LAYERS_SETTINGS();\n const layers: Layer[] = Object.keys(defaultSettings) as Layer[];\n return layers.reduce((res, layer) => {\n Object.assign(\n res[layer],\n initialSettings?.[layer] ?? {}\n );\n return res;\n }, defaultSettings);\n}\n\nexport type Sorting = 'asc' | 'desc';\nexport type AxesState = {\n title: { value: string; position: TitlePosition; mode: AxisTitleMode; facetTitleFrame: Frame };\n axisX: {\n labelsPosition: LabelsPosition; // for heatmap - top/bottom/left/right/hidden\n labelsRotation: LabelsRotation | null; // only for discrete X axis - 'center'/'90deg'/'45deg'; null for auto mode before user chose\n axisLabelsAngle: 0 | 45 | 90; // for heatmap\n groupLabelsAngle: 0 | 45 | 90; // for heatmap\n titleMode: AxisTitleMode; // 'auto' - from column or 'custom' - from 'customTitle' field or 'hidden'\n customTitle: string; // user axis title, not default from column\n gridlines: boolean;\n linesBetweenCategories: boolean; // for discrete - position for vertical gridlines\n ticks: boolean;\n scale: Scale; // linear or log\n significantLinesStyle: LineType;\n sorting: Sorting;\n allowNullPrimaryGroups: boolean; // for discrete - allow group with null grouping value\n allowNullSecondaryGroups: boolean;\n order: {\n source: string,\n options: {value: string, label: string}[]\n } | null;\n cellSize: number | null;\n };\n axisY: {\n labelsRotation: LabelsRotation | null; // only for discrete X axis - 'center'/'90deg'/'45deg'; null for auto mode before user chose\n titleMode: AxisTitleMode;\n customTitle: string;\n axisLabelsAngle: 0 | 45 | 90; // for heatmap\n groupLabelsAngle: 0 | 45 | 90; // for heatmap\n gridlines: boolean;\n ticks: boolean;\n scale: Scale;\n significantLinesStyle: LineType;\n sorting: Sorting;\n order: {\n source: string,\n options: {value: string, label: string}[]\n } | null;\n cellSize: number | null;\n };\n legend: {};\n other: {\n frame: Frame | HeatmapFrame;\n reverse: boolean;\n facetSharedBy: 'x' | 'y' | 'xy' | 'none';\n facetColumns: number;\n binsCount: number;\n groupingDirection: 'straight' | 'reverse';\n groupingStack: 'vertical' | 'horizontal';\n canvasRenderMode: boolean;\n };\n};\n\nconst DEFAULT_AXES: () => AxesState = () => ({\n title: {\n value: 'Graph 1',\n position: 'center',\n mode: 'auto',\n facetTitleFrame: 'full'\n },\n axisX: {\n labelsPosition: 'bottom',\n labelsRotation: null,\n axisLabelsAngle: 90,\n groupLabelsAngle: 45,\n titleMode: 'auto',\n customTitle: '',\n gridlines: true,\n linesBetweenCategories: true,\n ticks: true,\n scale: 'linear',\n significantLinesStyle: 'dashed',\n sorting: 'asc',\n allowNullPrimaryGroups: false,\n allowNullSecondaryGroups: false,\n order: null,\n cellSize: null,\n },\n axisY: {\n labelsRotation: null,\n titleMode: 'auto',\n customTitle: '',\n axisLabelsAngle: 90,\n groupLabelsAngle: 45,\n gridlines: true,\n ticks: true,\n scale: 'linear',\n significantLinesStyle: 'dashed',\n sorting: 'asc',\n order: null,\n cellSize: null,\n },\n legend: {},\n other: {\n frame: 'full',\n reverse: false,\n canvasRenderMode: false,\n facetSharedBy: 'xy',\n facetColumns: 3,\n binsCount: 10,\n groupingDirection: 'straight',\n groupingStack: 'vertical'\n }\n});\n\nfunction isHeatmapFrame(frame: Frame | HeatmapFrame): frame is HeatmapFrame {\n return frame === 'full' || frame === 'none';\n}\n\nexport function getInitialAxesSettings(\n chartType: ChartType,\n initialAxesSettings?: DeepPartial<AxesState>\n): AxesState {\n const defaultAxes = DEFAULT_AXES();\n if (!initialAxesSettings) {\n return defaultAxes;\n }\n\n // TODO: divide into separated settings for chart types\n function getFrame(frame?: Frame | HeatmapFrame): Frame | HeatmapFrame {\n if (!frame) {\n return 'full';\n }\n if (chartType === 'heatmap' && !isHeatmapFrame(frame)) {\n return 'full' as HeatmapFrame;\n }\n if (chartType !== 'heatmap' && isHeatmapFrame(frame)) {\n return frame === 'none' ? 'empty' : (frame as Frame);\n }\n return frame;\n }\n\n return {\n title: {\n ...defaultAxes.title,\n ...initialAxesSettings.title\n },\n axisX: {\n ...defaultAxes.axisX,\n ...initialAxesSettings.axisX\n },\n axisY: {\n ...defaultAxes.axisY,\n ...initialAxesSettings.axisY\n },\n legend: {\n ...defaultAxes.legend,\n ...initialAxesSettings.legend\n },\n other: {\n ...defaultAxes.other,\n ...initialAxesSettings.other,\n frame: getFrame(initialAxesSettings.other?.frame)\n }\n };\n}\n\nexport const LAYER_ICONS: Record<LayersTemplate, Component> = {\n box: BoxplotIcon,\n box_binnedDots: BoxplotAndBinnedIcon,\n box_jitteredDots: BoxplotAndJitterIcon,\n binnedDots: BinnedDotsIcon,\n jitteredDots: JitteredDotsIcon,\n violin: ViolinIcon,\n violin_binnedDots: ViolinAndBinnedIcon,\n violin_jitteredDots: ViolinAndJitterIcon,\n bar: BarIcon,\n bar_line: BarAndLineIcon,\n bar_errorbar: BarAndErrorIcon,\n stackedBar: StackedBarIcon,\n stackedArea: StackedAreaIcon,\n line: LineIcon,\n line_binnedDots: LineAndBinnedIcon,\n line_jitteredDots: LineAndJitterIcon,\n line_errorbar: LineAndErrorbarIcon,\n errorbar: BarAndLineIcon,\n sina: SinaIcon,\n logo: LogoIcon,\n dots: ScatterplotIcon,\n curve: LineIcon,\n curve_dots: LineAndJitterIcon,\n heatmap: HeatmapIcon,\n heatmapClustered: DendroIcon,\n dendro: DendroIcon,\n bins: BarIcon,\n bubble: HeatmapIcon\n};\n\ntype Option = { value: string; text: string };\nexport const STAT_TEST_METHOD: Option[] = [\n { value: 'ttest', text: 'TTest' },\n { value: 'anova', text: 'ANOVA' },\n { value: 'wilcoxon', text: 'Wilcoxon' },\n { value: 'kruskalWallis', text: 'Kruskal-Wallis' }\n];\n\nexport const STAT_CORRECTION_METHOD: Option[] = [\n { value: 'BenjaminiHochberg', text: 'Benjamini-Hochberg' },\n { value: 'BenjaminiYekutieli', text: 'Benjamini-Yekutieli' },\n { value: 'Bonferroni', text: 'Bonferroni' },\n { value: 'Hochberg', text: 'Hochberg' },\n { value: 'Holm', text: 'Holm' },\n { value: 'Hommel', text: 'Hommel' },\n { value: 'none', text: 'None' }\n];\n\nexport const FORMAT_P_VALUE_OPTIONS: Option[] = [\n { value: 'pValue', text: 'p-value' },\n { value: 'significance', text: 'significance' }\n];\n\nexport type AesType = 'fill' | 'stroke' | 'dotShape' | 'lineType' | 'size';\n\nexport const DEFAULT_WIDTH = 600;\nexport const DEFAULT_HEIGHT = 350;\nexport const DEFAULT_WIDTH_SMALL = 400;\nexport const DEFAULT_HEIGHT_SMALL = 250;\n\nexport const MAX_SEARCH_OPTIONS_LIST_LENGTH = 100;\n"],"names":["getInitialTemplate","restoredTemplate","chartType","DISCRETE_TEMPLATES_MAP","SCATTERPLOT_TEMPLATES_MAP","SCATTERPLOT_UMAP_TEMPLATES_MAP","HEATMAP_TEMPLATES_MAP","HISTOGRAM_TEMPLATES_MAP","LAYER_TITLES","getInitialStatisticsState","initialData","initial","_C","_D","_E","isNumberRange","v","isMappedAes","item","isContinuousDataMapping","DEFAULT_LAYERS_SETTINGS","DEFAULT_BLACK","DEFAULT_DOT_SHAPE","DEFAULT_DOT_SIZE","DEFAULT_LINE_COLOR","DEFAULT_LINE_TYPE","getInitialLayersSettings","initialSettings","defaultSettings","res","layer","DEFAULT_AXES","isHeatmapFrame","frame","getInitialAxesSettings","initialAxesSettings","defaultAxes","getFrame","_a","LAYER_ICONS","BoxplotIcon","BoxplotAndBinnedIcon","BoxplotAndJitterIcon","BinnedDotsIcon","JitteredDotsIcon","ViolinIcon","ViolinAndBinnedIcon","ViolinAndJitterIcon","BarIcon","BarAndLineIcon","BarAndErrorIcon","StackedBarIcon","StackedAreaIcon","LineIcon","LineAndBinnedIcon","LineAndJitterIcon","LineAndErrorbarIcon","SinaIcon","LogoIcon","ScatterplotIcon","HeatmapIcon","DendroIcon","STAT_TEST_METHOD","STAT_CORRECTION_METHOD","FORMAT_P_VALUE_OPTIONS","DEFAULT_WIDTH","DEFAULT_HEIGHT","DEFAULT_WIDTH_SMALL","DEFAULT_HEIGHT_SMALL","MAX_SEARCH_OPTIONS_LIST_LENGTH"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAqDO,SAASA,GACdC,GACAC,GACA;AACA,SAAIA,MAAc,aACTD,KACPE,GAAuBF,CAA0C,IAC7DA,IACA,QAEFC,MAAc,iBAAiBA,MAAc,qBACxCD,KACPG,GAA0BH,CAA6C,IACnEA,IACA,SAEFC,MAAc,WACT,WAEFD,KAAoB;AAC7B;AAEO,MAAME,KAGT;AAAA,EACF,KAAK,CAAC,KAAK;AAAA,EACX,gBAAgB,CAAC,OAAO,YAAY;AAAA,EACpC,kBAAkB,CAAC,OAAO,cAAc;AAAA,EACxC,QAAQ,CAAC,QAAQ;AAAA,EACjB,mBAAmB,CAAC,UAAU,YAAY;AAAA,EAC1C,qBAAqB,CAAC,UAAU,cAAc;AAAA,EAC9C,YAAY,CAAC,YAAY;AAAA,EACzB,cAAc,CAAC,cAAc;AAAA,EAC7B,KAAK,CAAC,KAAK;AAAA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,GAEaC,KAAmC;AAAA,EAC9C,EAAE,OAAO,qBAAqB,MAAM,qBAAA;AAAA,EACpC,EAAE,OAAO,sBAAsB,MAAM,sBAAA;AAAA,EACrC,EAAE,OAAO,cAAc,MAAM,aAAA;AAAA,EAC7B,EAAE,OAAO,YAAY,MAAM,WAAA;AAAA,EAC3B,EAAE,OAAO,QAAQ,MAAM,OAAA;AAAA,EACvB,EAAE,OAAO,UAAU,MAAM,SAAA;AAAA,EACzB,EAAE,OAAO,QAAQ,MAAM,OAAA;AACzB,GAEaC,KAAmC;AAAA,EAC9C,EAAE,OAAO,UAAU,MAAM,UAAA;AAAA,EACzB,EAAE,OAAO,gBAAgB,MAAM,eAAA;AACjC,GAIaC,KAAgB,KAChBC,KAAiB,KACjBC,KAAsB,KACtBC,KAAuB,KAEvBC,KAAiC;"}
|
|
1
|
+
{"version":3,"file":"constantsCommon.js","sources":["../../src/GraphMaker/constantsCommon.ts"],"sourcesContent":["import type { ChartType } from '@milaboratories/pf-plots';\nimport type { Component } from 'vue';\nimport {\n DotShape,\n LineType\n} from './components/AesSettings/types';\nimport {\n DEFAULT_BLACK,\n DEFAULT_DOT_SHAPE,\n DEFAULT_LINE_TYPE\n} from './constantsAesthetic';\nimport { DEFAULT_DOT_SIZE, DEFAULT_LINE_COLOR } from './dataBindAes';\nimport BarAndErrorIcon from './icons/BarAndErrorIcon.vue';\nimport BarAndLineIcon from './icons/BarAndLineIcon.vue';\nimport BarIcon from './icons/BarIcon.vue';\nimport BinnedDotsIcon from './icons/BinnedDotsIcon.vue';\nimport BoxplotAndBinnedIcon from './icons/BoxplotAndBinnedIcon.vue';\nimport BoxplotAndJitterIcon from './icons/BoxplotAndJitterIcon.vue';\nimport BoxplotIcon from './icons/BoxplotIcon.vue';\nimport DendroIcon from './icons/DendroIcon.vue';\nimport HeatmapIcon from './icons/HeatmapIcon.vue';\nimport JitteredDotsIcon from './icons/JitteredDotsIcon.vue';\nimport LineAndBinnedIcon from './icons/LineAndBinnedIcon.vue';\nimport LineAndErrorbarIcon from './icons/LineAndErrorbarIcon.vue';\nimport LineAndJitterIcon from './icons/LineAndJitterIcon.vue';\nimport LineIcon from './icons/LineIcon.vue';\nimport LogoIcon from './icons/LogoIcon.vue';\nimport ScatterplotIcon from './icons/ScatterplotIcon.vue';\nimport SinaIcon from './icons/SinaIcon.vue';\nimport StackedBarIcon from './icons/StackedBarIcon.vue';\nimport StackedAreaIcon from './icons/StackedAreaIcon.vue';\nimport ViolinAndBinnedIcon from './icons/ViolinAndBinnedIcon.vue';\nimport ViolinAndJitterIcon from './icons/ViolinAndJitterIcon.vue';\nimport ViolinIcon from './icons/ViolinIcon.vue';\nimport {\n AxisTitleMode,\n DeepPartial,\n DiscreteLayer,\n DiscreteLayersTemplate,\n Frame,\n HeatmapFrame, HeatmapLayer, HeatmapLayerTemplate, HistogramLayer, HistogramLayerTemplate,\n LabelsPosition,\n LabelsRotation,\n Layer,\n LayersTemplate,\n Scale,\n ScatterplotLayer,\n ScatterplotLayersTemplate,\n TitlePosition\n} from './types';\n\nexport const DEFAULT_CHART_TYPE: ChartType = 'discrete';\n\nexport function getInitialTemplate(\n restoredTemplate: LayersTemplate | null,\n chartType: ChartType\n) {\n if (chartType === 'discrete') {\n return restoredTemplate &&\n DISCRETE_TEMPLATES_MAP[restoredTemplate as DiscreteLayersTemplate]\n ? restoredTemplate\n : 'box';\n }\n if (chartType === 'scatterplot' || chartType === 'scatterplot-umap') {\n return restoredTemplate &&\n SCATTERPLOT_TEMPLATES_MAP[restoredTemplate as ScatterplotLayersTemplate]\n ? restoredTemplate\n : 'dots';\n }\n if (chartType === 'dendro') {\n return 'dendro';\n }\n return restoredTemplate ?? 'heatmap';\n}\n\nexport const DISCRETE_TEMPLATES_MAP: Record<\n DiscreteLayersTemplate,\n DiscreteLayer[]\n> = {\n box: ['box'],\n box_binnedDots: ['box', 'binnedDots'],\n box_jitteredDots: ['box', 'jitteredDots'],\n violin: ['violin'],\n violin_binnedDots: ['violin', 'binnedDots'],\n violin_jitteredDots: ['violin', 'jitteredDots'],\n binnedDots: ['binnedDots'],\n jitteredDots: ['jitteredDots'],\n bar: ['bar'],\n bar_line: ['bar', 'line'],\n bar_errorbar: ['bar', 'errorbar'],\n stackedBar: ['stackedBar'],\n stackedArea: ['stackedArea'],\n line: ['line'],\n line_jitteredDots: ['line', 'jitteredDots'],\n line_binnedDots: ['line', 'binnedDots'],\n line_errorbar: ['line', 'errorbar'],\n errorbar: ['errorbar'],\n sina: ['sina'],\n logo: ['logo']\n};\n\nexport const SCATTERPLOT_TEMPLATES_MAP: Record<\n ScatterplotLayersTemplate,\n ScatterplotLayer[]\n> = {\n dots: ['dots'],\n curve: ['curve'],\n curve_dots: ['curve', 'dots']\n};\n\nexport const SCATTERPLOT_UMAP_TEMPLATES_MAP: Partial<Record<\n ScatterplotLayersTemplate,\n ScatterplotLayer[]\n>> = {\n dots: ['dots'],\n curve_dots: ['curve', 'dots']\n};\n\nexport const HEATMAP_TEMPLATES_MAP: Record<HeatmapLayerTemplate, HeatmapLayer[]> = {\n heatmap: ['heatmap'],\n heatmapClustered: ['heatmapClustered']\n};\nexport const HISTOGRAM_TEMPLATES_MAP: Record<HistogramLayerTemplate, HistogramLayer[]> = {\n bins: ['bins']\n}\nexport const LAYER_TITLES: Record<Layer, string> = {\n box: 'Boxplot',\n binnedDots: 'Binned Dots',\n jitteredDots: 'Jittered Dots',\n violin: 'Violins',\n bar: 'Bar',\n stackedBar: 'Stacked Bar',\n stackedArea: 'Stacked Bar + Stream Area',\n line: 'Line',\n errorbar: 'Error Bar',\n sina: 'Sina',\n logo: 'Logo Plot',\n dots: 'Scatter Plot',\n curve: 'Curve',\n heatmap: 'Heatmap',\n heatmapClustered: 'Heatmap + Dendro',\n dendro: 'Dendrogram',\n bins: 'Histogram',\n bubble: 'Bubble plot'\n};\n\nexport type DiscreteStatisticsState = {\n overall: {\n data: { testMethod: null | string };\n validity: { testMethod: boolean };\n };\n referenceGroup: {\n data: {\n testMethod: null | string;\n referenceGroup: null | string;\n correctionMethod: string;\n format: 'significance' | 'pValue';\n ns: boolean;\n };\n validity: {\n testMethod: boolean;\n referenceGroup: boolean;\n };\n };\n pairwise: {\n data: {\n testMethod: null | string;\n correctionMethod: string;\n format: 'significance' | 'pValue';\n ns: boolean;\n };\n validity: { testMethod: boolean };\n };\n};\n\nexport type ScatterplotStatisticsState = {\n trend: {\n on: boolean,\n trim: boolean,\n showLegend: boolean\n },\n}\n\nexport type StatisticsState = DiscreteStatisticsState | ScatterplotStatisticsState;\n\nexport function getInitialStatisticsState(chartType: ChartType, initialData?: DeepPartial<StatisticsState>): StatisticsState {\n if (chartType === 'discrete') {\n const initial = initialData as DiscreteStatisticsState;\n return {\n overall: {\n data: { testMethod: initial?.overall?.data?.testMethod ?? null },\n validity: { testMethod: initial?.overall?.validity?.testMethod ?? true }\n },\n referenceGroup: {\n data: {\n testMethod: initial?.referenceGroup?.data?.testMethod ?? null,\n referenceGroup: initial?.referenceGroup?.data?.referenceGroup ?? null,\n correctionMethod: initial?.referenceGroup?.data?.correctionMethod ?? 'Bonferroni',\n format: initial?.referenceGroup?.data?.format ?? 'significance',\n ns: initial?.referenceGroup?.data?.ns ?? false\n },\n validity: {\n testMethod: initial?.referenceGroup?.validity?.testMethod ?? true,\n referenceGroup: initial?.referenceGroup?.validity?.referenceGroup ?? true\n }\n },\n pairwise: {\n data: {\n testMethod: initial?.pairwise?.data?.testMethod ?? null,\n correctionMethod: initial?.pairwise?.data?.correctionMethod ?? 'Bonferroni',\n format: initial?.pairwise?.data?.format ?? 'significance',\n ns: initial?.pairwise?.data?.ns ?? false\n },\n validity: { testMethod: initial?.pairwise?.validity?.testMethod ?? true }\n }\n } as DiscreteStatisticsState;\n }\n const initial = initialData as ScatterplotStatisticsState;\n return {\n trend: {\n on: initial?.trend?.on ?? false,\n trim: initial?.trend?.trim ?? false,\n showLegend: initial?.trend?.showLegend ?? true\n }\n };\n}\n\nexport type NumberRange = { min: number, max: number }\nexport type MappingLink = { type: string, value?: string }; // {type: 'primaryGrouping'} for example\nexport type ColorAes = string | MappingLink;\nexport type DotShapeAes = DotShape | MappingLink;\nexport type DotSizeAes = number | NumberRange;\nexport type LineTypeAes = LineType | MappingLink;\nexport type FixedOrMappedAes = ColorAes | DotShapeAes | LineTypeAes;\n\nexport type ContinuousDataMappingSize = {\n column: string,\n range: NumberRange\n}\n\nexport type ContinuousDataMappingForGraph<T extends string | number> = {columnName: ColumnNameSchema, domain: number[], range: T[], type: 'linear' | 'log'}\n\nexport type ColumnNameSchema = {\n type: 'column'\n value: string,\n label?: string\n valueLabels?: string\n}\n\nexport function isNumberRange(v: number | NumberRange | null | undefined): v is NumberRange {\n return typeof v !== 'undefined' && v !== null && typeof v === 'object' && 'min' in v && 'max' in v;\n}\n\nexport function isMappedAes(\n item: FixedOrMappedAes | null | string | number | boolean | unknown\n): item is MappingLink {\n return typeof item === 'object' && item !== null && 'type' in item;\n}\n\nexport function isContinuousDataMapping(v: ContinuousDataMappingSize | MappingLink | number | string | null | undefined): v is ContinuousDataMappingSize {\n return typeof v !== 'undefined' && v !== null && typeof v === 'object' && 'range' in v;\n}\n\nexport type LayersSettings = {\n //bubble\n bubble: {\n NAValueAs: number | null,\n minRadius: number,\n maxRadius: number,\n normalizationDirection: 'row' | 'column' | null,\n normalizationMethod: 'standardScaling' | 'meanNormalization',\n strokeColor: null | string\n },\n // histogram\n bins: {\n fillColor: ColorAes | null,\n opacity: number\n },\n //dendrogram\n dendro: {\n dotFill: ColorAes,\n dotShape: DotShapeAes,\n dotSize: DotSizeAes,\n lineColor: ColorAes,\n mode: 'normal' | 'useAllNodesAsLeaves',\n leavesMode: 'normal' | 'alignLeavesToLine',\n showTable: boolean,\n showLegend: boolean,\n },\n //heatmap\n heatmap: {\n NAValueAs: number | null,\n normalizationDirection: 'row' | 'column' | null,\n normalizationMethod: 'standardScaling' | 'meanNormalization',\n aggregateByX: boolean;\n aggregateByY: boolean;\n aggregationMethod: 'mean' | 'median' | 'min' | 'max'\n },\n heatmapClustered: {\n NAValueAs: number | null,\n normalizationDirection: 'row' | 'column' | null,\n normalizationMethod: 'standardScaling' | 'meanNormalization',\n dendrogramX: boolean,\n dendrogramY: boolean,\n disableClusteringX: boolean,\n disableClusteringY: boolean,\n aggregateByX: boolean;\n aggregateByY: boolean;\n aggregationMethod: 'mean' | 'median' | 'min' | 'max'\n },\n //scatterplot\n dots: {\n dotFill: ColorAes | null,\n dotShape: DotShapeAes | null,\n dotSize: ContinuousDataMappingSize | number | null\n },\n curve: {\n smoothing: boolean,\n lineColor: ColorAes\n },\n //discrete\n box: {\n showOutliers: boolean,\n fillColor: ColorAes | null,\n lineColor: ColorAes,\n dotShape: DotShapeAes,\n lineType: LineTypeAes,\n gapWidth: number,\n opacity: number,\n stat: {\n low: number,\n middle: number,\n upper: number,\n k: number,\n },\n },\n binnedDots: {\n fillColor: ColorAes | null,\n lineColor: ColorAes,\n opacity: number,\n showOutliers: boolean,\n },\n jitteredDots: {\n dotFill: ColorAes | null,\n dotShape: DotShapeAes,\n lineColor: ColorAes,\n opacity: number,\n showOutliers: boolean,\n },\n violin: {\n fillColor: ColorAes | null,\n lineColor: ColorAes,\n lineType: LineTypeAes,\n opacity: number,\n trim: boolean,\n showQuartiles: boolean,\n quartilesLineStyle: LineType,\n medianLineStyle: LineType\n },\n bar: {\n fillColor: ColorAes | null,\n lineColor: ColorAes,\n opacity: number,\n height: 'max' | 'mean' | 'median',\n },\n stackedBar: {\n fillColor: ColorAes | null,\n lineColor: ColorAes,\n opacity: number,\n normalize: boolean,\n height: 'sum' | 'max' | 'mean' | 'median',\n },\n stackedArea: {\n fillColor: ColorAes | null,\n lineColor: ColorAes,\n barsOpacity: number,\n areaOpacity: number,\n normalize: boolean,\n height: 'sum' | 'max' | 'mean' | 'median',\n showBars: boolean\n },\n line: {\n pointsValues: 'mean' | 'median',\n emptyGroupValue: number,\n lineColor: ColorAes | null,\n dotShape: DotShapeAes,\n lineType: LineTypeAes,\n dotFill: ColorAes | null,\n opacity: number,\n },\n errorbar: {\n pointsValues: 'mean' | 'median',\n interval: 'sd' | 'se' | '',\n lineColor: ColorAes | null,\n dotShape: DotShapeAes,\n dotFill: ColorAes | null,\n opacity: number,\n },\n sina: {\n dotFill: ColorAes | null,\n dotShape: DotShapeAes,\n opacity: number,\n showOutliers: boolean,\n },\n logo: {\n normalize: boolean,\n opacity: number,\n }\n};\nexport const DEFAULT_LAYERS_SETTINGS: () => LayersSettings = () => ({\n //bubble\n bubble: {\n NAValueAs: 0,\n strokeColor: null,\n minRadius: 3,\n maxRadius: 38,\n normalizationDirection: 'row',\n normalizationMethod: 'standardScaling',\n },\n // histogram\n bins: {\n fillColor: null,\n opacity: 1\n },\n //dendro\n dendro: {\n dotFill: DEFAULT_BLACK,\n dotShape: DEFAULT_DOT_SHAPE,\n dotSize: DEFAULT_DOT_SIZE,\n lineColor: DEFAULT_BLACK,\n mode: 'normal',\n leavesMode: 'normal',\n showTable: false,\n showLegend: true\n },\n //heatmap\n heatmap: {\n NAValueAs: 0,\n normalizationDirection: 'row',\n normalizationMethod: 'standardScaling',\n aggregateByX: false,\n aggregateByY: false,\n aggregationMethod: 'mean'\n },\n heatmapClustered: {\n NAValueAs: 0,\n normalizationDirection: 'row',\n normalizationMethod: 'standardScaling',\n dendrogramX: true,\n dendrogramY: true,\n disableClusteringX: false,\n disableClusteringY: false,\n aggregateByX: false,\n aggregateByY: false,\n aggregationMethod: 'mean'\n },\n //scatterplot\n dots: {\n dotFill: null as ColorAes | null,\n dotShape: null as DotShapeAes | null,\n dotSize: null as ContinuousDataMappingSize | number | null\n },\n curve: { lineColor: DEFAULT_BLACK, smoothing: true },\n //discrete\n box: {\n showOutliers: true,\n fillColor: null as ColorAes | null,\n lineColor: DEFAULT_LINE_COLOR as ColorAes,\n dotShape: DEFAULT_DOT_SHAPE as DotShapeAes,\n lineType: DEFAULT_LINE_TYPE as LineTypeAes,\n gapWidth: 0.2,\n opacity: 1,\n stat: {\n low: 0.25,\n middle: 0.5,\n upper: 0.75,\n k: 1.5\n }\n },\n binnedDots: {\n fillColor: null as ColorAes | null,\n lineColor: DEFAULT_LINE_COLOR as ColorAes,\n opacity: 1,\n showOutliers: true\n },\n jitteredDots: {\n dotFill: null as ColorAes | null,\n dotShape: DEFAULT_DOT_SHAPE as DotShapeAes,\n lineColor: DEFAULT_LINE_COLOR as ColorAes,\n opacity: 1,\n showOutliers: true\n },\n violin: {\n fillColor: null as ColorAes | null,\n lineColor: DEFAULT_LINE_COLOR as ColorAes,\n lineType: DEFAULT_LINE_TYPE as LineTypeAes,\n opacity: 1,\n trim: false,\n showQuartiles: false,\n quartilesLineStyle: 'dashed',\n medianLineStyle: 'solid'\n },\n bar: {\n fillColor: null as ColorAes | null,\n lineColor: DEFAULT_LINE_COLOR as ColorAes,\n opacity: 1,\n height: 'max'\n },\n stackedBar: {\n fillColor: null as ColorAes | null,\n lineColor: DEFAULT_LINE_COLOR as ColorAes,\n opacity: 1,\n normalize: false,\n height: 'sum'\n },\n stackedArea: {\n fillColor: null as ColorAes | null,\n lineColor: DEFAULT_LINE_COLOR as ColorAes,\n barsOpacity: 1,\n areaOpacity: 0.7,\n normalize: false,\n showBars: true,\n height: 'sum'\n },\n line: {\n pointsValues: 'mean',\n emptyGroupValue: 0,\n lineColor: null as ColorAes | null,\n dotShape: DEFAULT_DOT_SHAPE as DotShapeAes,\n lineType: DEFAULT_LINE_TYPE as LineTypeAes,\n dotFill: null as ColorAes | null,\n opacity: 1\n },\n errorbar: {\n pointsValues: 'mean',\n interval: 'sd',\n lineColor: null as ColorAes | null,\n dotShape: DEFAULT_DOT_SHAPE as DotShapeAes,\n dotFill: null as ColorAes | null,\n opacity: 1\n },\n sina: {\n dotFill: null as ColorAes | null,\n dotShape: DEFAULT_DOT_SHAPE as DotShapeAes,\n opacity: 1,\n showOutliers: true\n },\n logo: {\n normalize: false,\n opacity: 1\n }\n});\n\nexport function getDefaultLayersSettings() {\n return DEFAULT_LAYERS_SETTINGS();\n}\n\nconst DISCRETE_LAYERS: Layer[] = [\n 'box',\n 'binnedDots',\n 'jitteredDots',\n 'violin',\n 'bar',\n 'stackedBar',\n 'line',\n 'errorbar',\n 'sina',\n 'logo'\n];\nconst SCATTERPLOT_LAYERS: Layer[] = ['dots', 'curve'];\nconst SCATTERPLOT_UMAP_LAYERS: Layer[] = ['dots'];\nconst HEATMAP_LAYERS: Layer[] = ['heatmap', 'heatmapClustered'];\nconst DENDRO_LAYERS: Layer[] = ['dendro'];\nconst HISTOGRAM_LAYERS: Layer[] = ['bins'];\nconst BUBBLE_LAYERS: Layer[] = ['bubble'];\nconst LAYERS_BY_CHART_TYPE: Record<ChartType, Layer[]> = {\n discrete: DISCRETE_LAYERS,\n scatterplot: SCATTERPLOT_LAYERS,\n 'scatterplot-umap': SCATTERPLOT_UMAP_LAYERS,\n heatmap: HEATMAP_LAYERS,\n dendro: DENDRO_LAYERS,\n histogram: HISTOGRAM_LAYERS,\n bubble: BUBBLE_LAYERS\n};\n\nexport function getInitialLayersSettings(\n initialSettings?: DeepPartial<LayersSettings>\n): LayersSettings {\n const defaultSettings = DEFAULT_LAYERS_SETTINGS();\n const layers: Layer[] = Object.keys(defaultSettings) as Layer[];\n return layers.reduce((res, layer) => {\n Object.assign(\n res[layer],\n initialSettings?.[layer] ?? {}\n );\n return res;\n }, defaultSettings);\n}\n\nexport type Sorting = 'asc' | 'desc';\nexport type AxesState = {\n title: { value: string; position: TitlePosition; mode: AxisTitleMode; facetTitleFrame: Frame };\n axisX: {\n labelsPosition: LabelsPosition; // for heatmap - top/bottom/left/right/hidden\n labelsRotation: LabelsRotation | null; // only for discrete X axis - 'center'/'90deg'/'45deg'; null for auto mode before user chose\n axisLabelsAngle: 0 | 45 | 90; // for heatmap\n groupLabelsAngle: 0 | 45 | 90; // for heatmap\n titleMode: AxisTitleMode; // 'auto' - from column or 'custom' - from 'customTitle' field or 'hidden'\n customTitle: string; // user axis title, not default from column\n gridlines: boolean;\n linesBetweenCategories: boolean; // for discrete - position for vertical gridlines\n ticks: boolean;\n scale: Scale; // linear or log\n significantLinesStyle: LineType;\n sorting: Sorting;\n allowNullPrimaryGroups: boolean; // for discrete - allow group with null grouping value\n allowNullSecondaryGroups: boolean;\n order: {\n source: string,\n options: {value: string, label: string}[]\n } | null;\n cellSize: number | null;\n };\n axisY: {\n labelsRotation: LabelsRotation | null; // only for discrete X axis - 'center'/'90deg'/'45deg'; null for auto mode before user chose\n titleMode: AxisTitleMode;\n customTitle: string;\n axisLabelsAngle: 0 | 45 | 90; // for heatmap\n groupLabelsAngle: 0 | 45 | 90; // for heatmap\n gridlines: boolean;\n ticks: boolean;\n scale: Scale;\n significantLinesStyle: LineType;\n sorting: Sorting;\n order: {\n source: string,\n options: {value: string, label: string}[]\n } | null;\n cellSize: number | null;\n };\n legend: {};\n other: {\n frame: Frame | HeatmapFrame;\n reverse: boolean;\n facetSharedBy: 'x' | 'y' | 'xy' | 'none';\n facetColumns: number;\n binsCount: number;\n groupingDirection: 'straight' | 'reverse';\n groupingStack: 'vertical' | 'horizontal';\n canvasRenderMode: boolean;\n };\n};\n\nconst DEFAULT_AXES: () => AxesState = () => ({\n title: {\n value: 'Graph 1',\n position: 'center',\n mode: 'auto',\n facetTitleFrame: 'full'\n },\n axisX: {\n labelsPosition: 'bottom',\n labelsRotation: null,\n axisLabelsAngle: 90,\n groupLabelsAngle: 45,\n titleMode: 'auto',\n customTitle: '',\n gridlines: true,\n linesBetweenCategories: true,\n ticks: true,\n scale: 'linear',\n significantLinesStyle: 'dashed',\n sorting: 'asc',\n allowNullPrimaryGroups: false,\n allowNullSecondaryGroups: false,\n order: null,\n cellSize: null,\n },\n axisY: {\n labelsRotation: null,\n titleMode: 'auto',\n customTitle: '',\n axisLabelsAngle: 90,\n groupLabelsAngle: 45,\n gridlines: true,\n ticks: true,\n scale: 'linear',\n significantLinesStyle: 'dashed',\n sorting: 'asc',\n order: null,\n cellSize: null,\n },\n legend: {},\n other: {\n frame: 'full',\n reverse: false,\n canvasRenderMode: false,\n facetSharedBy: 'xy',\n facetColumns: 3,\n binsCount: 10,\n groupingDirection: 'straight',\n groupingStack: 'vertical'\n }\n});\n\nfunction isHeatmapFrame(frame: Frame | HeatmapFrame): frame is HeatmapFrame {\n return frame === 'full' || frame === 'none';\n}\n\nexport function getInitialAxesSettings(\n chartType: ChartType,\n initialAxesSettings?: DeepPartial<AxesState>\n): AxesState {\n const defaultAxes = DEFAULT_AXES();\n if (!initialAxesSettings) {\n return defaultAxes;\n }\n\n // TODO: divide into separated settings for chart types\n function getFrame(frame?: Frame | HeatmapFrame): Frame | HeatmapFrame {\n if (!frame) {\n return 'full';\n }\n if (chartType === 'heatmap' && !isHeatmapFrame(frame)) {\n return 'full' as HeatmapFrame;\n }\n if (chartType !== 'heatmap' && isHeatmapFrame(frame)) {\n return frame === 'none' ? 'empty' : (frame as Frame);\n }\n return frame;\n }\n\n return {\n title: {\n ...defaultAxes.title,\n ...initialAxesSettings.title\n },\n axisX: {\n ...defaultAxes.axisX,\n ...initialAxesSettings.axisX\n },\n axisY: {\n ...defaultAxes.axisY,\n ...initialAxesSettings.axisY\n },\n legend: {\n ...defaultAxes.legend,\n ...initialAxesSettings.legend\n },\n other: {\n ...defaultAxes.other,\n ...initialAxesSettings.other,\n frame: getFrame(initialAxesSettings.other?.frame)\n }\n };\n}\n\nexport const LAYER_ICONS: Record<LayersTemplate, Component> = {\n box: BoxplotIcon,\n box_binnedDots: BoxplotAndBinnedIcon,\n box_jitteredDots: BoxplotAndJitterIcon,\n binnedDots: BinnedDotsIcon,\n jitteredDots: JitteredDotsIcon,\n violin: ViolinIcon,\n violin_binnedDots: ViolinAndBinnedIcon,\n violin_jitteredDots: ViolinAndJitterIcon,\n bar: BarIcon,\n bar_line: BarAndLineIcon,\n bar_errorbar: BarAndErrorIcon,\n stackedBar: StackedBarIcon,\n stackedArea: StackedAreaIcon,\n line: LineIcon,\n line_binnedDots: LineAndBinnedIcon,\n line_jitteredDots: LineAndJitterIcon,\n line_errorbar: LineAndErrorbarIcon,\n errorbar: BarAndLineIcon,\n sina: SinaIcon,\n logo: LogoIcon,\n dots: ScatterplotIcon,\n curve: LineIcon,\n curve_dots: LineAndJitterIcon,\n heatmap: HeatmapIcon,\n heatmapClustered: DendroIcon,\n dendro: DendroIcon,\n bins: BarIcon,\n bubble: HeatmapIcon\n};\n\ntype Option = { value: string; text: string };\nexport const STAT_TEST_METHOD: Option[] = [\n { value: 'ttest', text: 'TTest' },\n { value: 'anova', text: 'ANOVA' },\n { value: 'wilcoxon', text: 'Wilcoxon' },\n { value: 'kruskalWallis', text: 'Kruskal-Wallis' }\n];\n\nexport const STAT_CORRECTION_METHOD: Option[] = [\n { value: 'BenjaminiHochberg', text: 'Benjamini-Hochberg' },\n { value: 'BenjaminiYekutieli', text: 'Benjamini-Yekutieli' },\n { value: 'Bonferroni', text: 'Bonferroni' },\n { value: 'Hochberg', text: 'Hochberg' },\n { value: 'Holm', text: 'Holm' },\n { value: 'Hommel', text: 'Hommel' },\n { value: 'none', text: 'None' }\n];\n\nexport const FORMAT_P_VALUE_OPTIONS: Option[] = [\n { value: 'pValue', text: 'p-value' },\n { value: 'significance', text: 'significance' }\n];\n\nexport type AesType = 'fill' | 'stroke' | 'dotShape' | 'lineType' | 'size';\n\nexport const DEFAULT_WIDTH = 600;\nexport const DEFAULT_HEIGHT = 350;\nexport const DEFAULT_WIDTH_SMALL = 400;\nexport const DEFAULT_HEIGHT_SMALL = 250;\n\nexport const MAX_SEARCH_OPTIONS_LIST_LENGTH = 100;\n"],"names":["getInitialTemplate","restoredTemplate","chartType","DISCRETE_TEMPLATES_MAP","SCATTERPLOT_TEMPLATES_MAP","SCATTERPLOT_UMAP_TEMPLATES_MAP","HEATMAP_TEMPLATES_MAP","HISTOGRAM_TEMPLATES_MAP","LAYER_TITLES","getInitialStatisticsState","initialData","initial","_C","_D","_E","isNumberRange","v","isMappedAes","item","isContinuousDataMapping","DEFAULT_LAYERS_SETTINGS","DEFAULT_BLACK","DEFAULT_DOT_SHAPE","DEFAULT_DOT_SIZE","DEFAULT_LINE_COLOR","DEFAULT_LINE_TYPE","getInitialLayersSettings","initialSettings","defaultSettings","res","layer","DEFAULT_AXES","isHeatmapFrame","frame","getInitialAxesSettings","initialAxesSettings","defaultAxes","getFrame","_a","LAYER_ICONS","BoxplotIcon","BoxplotAndBinnedIcon","BoxplotAndJitterIcon","BinnedDotsIcon","JitteredDotsIcon","ViolinIcon","ViolinAndBinnedIcon","ViolinAndJitterIcon","BarIcon","BarAndLineIcon","BarAndErrorIcon","StackedBarIcon","StackedAreaIcon","LineIcon","LineAndBinnedIcon","LineAndJitterIcon","LineAndErrorbarIcon","SinaIcon","LogoIcon","ScatterplotIcon","HeatmapIcon","DendroIcon","STAT_TEST_METHOD","STAT_CORRECTION_METHOD","FORMAT_P_VALUE_OPTIONS","DEFAULT_WIDTH","DEFAULT_HEIGHT","DEFAULT_WIDTH_SMALL","DEFAULT_HEIGHT_SMALL","MAX_SEARCH_OPTIONS_LIST_LENGTH"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAqDO,SAASA,GACdC,GACAC,GACA;AACA,SAAIA,MAAc,aACTD,KACPE,GAAuBF,CAA0C,IAC7DA,IACA,QAEFC,MAAc,iBAAiBA,MAAc,qBACxCD,KACPG,GAA0BH,CAA6C,IACnEA,IACA,SAEFC,MAAc,WACT,WAEFD,KAAoB;AAC7B;AAEO,MAAME,KAGT;AAAA,EACF,KAAK,CAAC,KAAK;AAAA,EACX,gBAAgB,CAAC,OAAO,YAAY;AAAA,EACpC,kBAAkB,CAAC,OAAO,cAAc;AAAA,EACxC,QAAQ,CAAC,QAAQ;AAAA,EACjB,mBAAmB,CAAC,UAAU,YAAY;AAAA,EAC1C,qBAAqB,CAAC,UAAU,cAAc;AAAA,EAC9C,YAAY,CAAC,YAAY;AAAA,EACzB,cAAc,CAAC,cAAc;AAAA,EAC7B,KAAK,CAAC,KAAK;AAAA,EACX,UAAU,CAAC,OAAO,MAAM;AAAA,EACxB,cAA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AmC;AAAA,EAC9C,EAAE,OAAO,qBAAqB,MAAM,qBAAA;AAAA,EACpC,EAAE,OAAO,sBAAsB,MAAM,sBAAA;AAAA,EACrC,EAAE,OAAO,cAAc,MAAM,aAAA;AAAA,EAC7B,EAAE,OAAO,YAAY,MAAM,WAAA;AAAA,EAC3B,EAAE,OAAO,QAAQ,MAAM,OAAA;AAAA,EACvB,EAAE,OAAO,UAAU,MAAM,SAAA;AAAA,EACzB,EAAE,OAAO,QAAQ,MAAM,OAAA;AACzB,GAEaC,KAAmC;AAAA,EAC9C,EAAE,OAAO,UAAU,MAAM,UAAA;AAAA,EACzB,EAAE,OAAO,gBAAgB,MAAM,eAAA;AACjC,GAIaC,KAAgB,KAChBC,KAAiB,KACjBC,KAAsB,KACtBC,KAAuB,KAEvBC,KAAiC;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StackedArea.vue.d.ts","sourceRoot":"","sources":["../../../../../../src/GraphMaker/forms/LayersForm/Layer/discrete/StackedArea.vue"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"StackedArea.vue.d.ts","sourceRoot":"","sources":["../../../../../../src/GraphMaker/forms/LayersForm/Layer/discrete/StackedArea.vue"],"names":[],"mappings":";AA8WA,wBAKG"}
|
|
@@ -1,53 +1,71 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { useStore as
|
|
3
|
-
import { useDefaultAes as
|
|
4
|
-
import { DEFAULT_WHITE as
|
|
5
|
-
import
|
|
6
|
-
import { Slider as
|
|
7
|
-
const
|
|
1
|
+
import { defineComponent as x, computed as s, createElementBlock as C, openBlock as U, Fragment as A, createVNode as o, createElementVNode as i, withModifiers as O, unref as n } from "vue";
|
|
2
|
+
import { useStore as B } from "../../../../store.js";
|
|
3
|
+
import { useDefaultAes as y } from "./utils.js";
|
|
4
|
+
import { DEFAULT_WHITE as E, DEFAULT_BLACK as w } from "../../../../constantsAesthetic.js";
|
|
5
|
+
import b from "../../AesSelector.vue.js";
|
|
6
|
+
import { PlDropdown as F, Slider as c, PlCheckbox as V } from "@platforma-sdk/ui-vue";
|
|
7
|
+
const L = { class: "checkbox-item" }, M = { class: "checkbox-item" }, m = "stackedArea", G = /* @__PURE__ */ x({
|
|
8
8
|
__name: "StackedArea",
|
|
9
|
-
setup(
|
|
10
|
-
const
|
|
11
|
-
() =>
|
|
12
|
-
), S =
|
|
13
|
-
() =>
|
|
14
|
-
),
|
|
15
|
-
() =>
|
|
9
|
+
setup(N) {
|
|
10
|
+
const r = B(), t = s(() => r.value.reactive.layersSettings[m]), d = s(
|
|
11
|
+
() => r.value.reactive.optionsState
|
|
12
|
+
), S = s(
|
|
13
|
+
() => y(t.value.fillColor, d.value, E)
|
|
14
|
+
), g = s(
|
|
15
|
+
() => y(t.value.lineColor, d.value, w)
|
|
16
16
|
);
|
|
17
|
-
function
|
|
18
|
-
e.type === "dataCategorical" ?
|
|
17
|
+
function p(a, e, l) {
|
|
18
|
+
e.type === "dataCategorical" ? r.value.reactive.layersSettings[m][l] = {
|
|
19
19
|
type: e.inputName
|
|
20
|
-
} :
|
|
20
|
+
} : r.value.reactive.layersSettings[m][l] = a, e.type === "dataCategorical" && typeof a != "string" && (r.value.reactive.dataBindAes[e.selectedSource] = a);
|
|
21
21
|
}
|
|
22
|
-
const
|
|
22
|
+
const k = [
|
|
23
|
+
{ text: "Sum", value: "sum" },
|
|
24
|
+
{ text: "Min", value: "min" },
|
|
25
|
+
{ text: "Max", value: "max" },
|
|
26
|
+
{ text: "Mean", value: "mean" },
|
|
27
|
+
{ text: "Median", value: "median" }
|
|
28
|
+
], v = s({
|
|
23
29
|
get: () => t.value.barsOpacity * 100,
|
|
24
30
|
set: (a) => {
|
|
25
31
|
t.value.barsOpacity = a / 100;
|
|
26
32
|
}
|
|
27
|
-
}), f =
|
|
33
|
+
}), f = s({
|
|
28
34
|
get: () => t.value.areaOpacity * 100,
|
|
29
35
|
set: (a) => {
|
|
30
36
|
t.value.areaOpacity = a / 100;
|
|
31
37
|
}
|
|
32
38
|
});
|
|
33
|
-
return (a, e) => (
|
|
34
|
-
|
|
39
|
+
return (a, e) => (U(), C(A, null, [
|
|
40
|
+
o(b, {
|
|
35
41
|
label: "Fill color",
|
|
36
42
|
"form-title": "Fill Color Settings",
|
|
37
43
|
"form-back-title": "Layers",
|
|
38
44
|
type: "fill",
|
|
39
45
|
selected: S.value,
|
|
40
|
-
onAesUpdate: e[0] || (e[0] = (l, u) =>
|
|
46
|
+
onAesUpdate: e[0] || (e[0] = (l, u) => p(l, u, "fillColor"))
|
|
41
47
|
}, null, 8, ["selected"]),
|
|
42
|
-
|
|
48
|
+
o(b, {
|
|
43
49
|
label: "Stroke color",
|
|
44
50
|
"form-title": "Stroke Color Settings",
|
|
45
51
|
"form-back-title": "Layers",
|
|
46
52
|
type: "stroke",
|
|
47
|
-
selected:
|
|
48
|
-
onAesUpdate: e[1] || (e[1] = (l, u) =>
|
|
53
|
+
selected: g.value,
|
|
54
|
+
onAesUpdate: e[1] || (e[1] = (l, u) => p(l, u, "lineColor"))
|
|
49
55
|
}, null, 8, ["selected"]),
|
|
50
|
-
|
|
56
|
+
i("div", {
|
|
57
|
+
class: "input-item",
|
|
58
|
+
onClick: e[3] || (e[3] = O(() => {
|
|
59
|
+
}, ["stop"]))
|
|
60
|
+
}, [
|
|
61
|
+
o(n(F), {
|
|
62
|
+
label: "Height",
|
|
63
|
+
options: k,
|
|
64
|
+
modelValue: t.value.height,
|
|
65
|
+
"onUpdate:modelValue": e[2] || (e[2] = (l) => t.value.height = l)
|
|
66
|
+
}, null, 8, ["modelValue"])
|
|
67
|
+
]),
|
|
68
|
+
o(n(c), {
|
|
51
69
|
label: "Opacity of bars",
|
|
52
70
|
min: 0,
|
|
53
71
|
max: 100,
|
|
@@ -55,9 +73,9 @@ const F = { class: "checkbox-item" }, L = { class: "checkbox-item" }, m = "stack
|
|
|
55
73
|
breakpoints: !1,
|
|
56
74
|
measure: "%",
|
|
57
75
|
modelValue: v.value,
|
|
58
|
-
"onUpdate:modelValue": e[
|
|
76
|
+
"onUpdate:modelValue": e[4] || (e[4] = (l) => v.value = l)
|
|
59
77
|
}, null, 8, ["modelValue"]),
|
|
60
|
-
|
|
78
|
+
o(n(c), {
|
|
61
79
|
label: "Opacity of areas",
|
|
62
80
|
min: 0,
|
|
63
81
|
max: 100,
|
|
@@ -65,26 +83,26 @@ const F = { class: "checkbox-item" }, L = { class: "checkbox-item" }, m = "stack
|
|
|
65
83
|
breakpoints: !1,
|
|
66
84
|
measure: "%",
|
|
67
85
|
modelValue: f.value,
|
|
68
|
-
"onUpdate:modelValue": e[
|
|
86
|
+
"onUpdate:modelValue": e[5] || (e[5] = (l) => f.value = l)
|
|
69
87
|
}, null, 8, ["modelValue"]),
|
|
70
|
-
i("div",
|
|
71
|
-
|
|
88
|
+
i("div", L, [
|
|
89
|
+
o(n(V), {
|
|
72
90
|
modelValue: t.value.normalize,
|
|
73
|
-
"onUpdate:modelValue": e[
|
|
91
|
+
"onUpdate:modelValue": e[6] || (e[6] = (l) => t.value.normalize = l)
|
|
74
92
|
}, null, 8, ["modelValue"]),
|
|
75
|
-
e[
|
|
93
|
+
e[8] || (e[8] = i("span", null, "Normalize", -1))
|
|
76
94
|
]),
|
|
77
|
-
i("div",
|
|
78
|
-
|
|
95
|
+
i("div", M, [
|
|
96
|
+
o(n(V), {
|
|
79
97
|
modelValue: t.value.showBars,
|
|
80
|
-
"onUpdate:modelValue": e[
|
|
98
|
+
"onUpdate:modelValue": e[7] || (e[7] = (l) => t.value.showBars = l)
|
|
81
99
|
}, null, 8, ["modelValue"]),
|
|
82
|
-
e[
|
|
100
|
+
e[9] || (e[9] = i("span", null, "Show bars", -1))
|
|
83
101
|
])
|
|
84
102
|
], 64));
|
|
85
103
|
}
|
|
86
104
|
});
|
|
87
105
|
export {
|
|
88
|
-
|
|
106
|
+
G as default
|
|
89
107
|
};
|
|
90
108
|
//# sourceMappingURL=StackedArea.vue.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StackedArea.vue.js","sources":["../../../../../../src/GraphMaker/forms/LayersForm/Layer/discrete/StackedArea.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport { useStore } from '../../../../store';\nimport { computed } from \"vue\";\nimport type { AesOption } from '../../../../components/AesSettings/types';\nimport type { AestheticMappingCategorical } from '../../../../dataBindAes';\nimport { useDefaultAes } from './utils';\nimport { DiscreteUIState } from \"@milaboratories/pf-plots\";\nimport {\n DEFAULT_BLACK,\n DEFAULT_WHITE,\n} from '../../../../constantsAesthetic';\nimport AesSelector from '../../AesSelector.vue';\nimport { PlCheckbox, Slider } from '@platforma-sdk/ui-vue';\n\nconst store = useStore();\nconst layer = \"stackedArea\";\nconst settings = computed(() => store.value.reactive.layersSettings[layer]);\nconst optionsState = computed(\n () => store.value.reactive.optionsState as DiscreteUIState,\n);\n\nconst fillColor = computed(() =>\n useDefaultAes(settings.value.fillColor, optionsState.value, DEFAULT_WHITE),\n);\nconst lineColor = computed(() =>\n useDefaultAes(settings.value.lineColor, optionsState.value, DEFAULT_BLACK),\n);\n\nfunction onUpdate(\n value: string | AestheticMappingCategorical,\n colorOption: AesOption,\n field: \"fillColor\" | \"lineColor\",\n) {\n if (colorOption.type === \"dataCategorical\") {\n store.value.reactive.layersSettings[layer][field] = {\n type: colorOption.inputName,\n };\n } else {\n store.value.reactive.layersSettings[layer][field] = value;\n }\n if (colorOption.type === \"dataCategorical\" && typeof value !== \"string\") {\n store.value.reactive.dataBindAes[colorOption.selectedSource] = value;\n }\n}\n\nconst barOpacity = computed({\n get: () => settings.value.barsOpacity * 100,\n set: (newValue: number) => {\n settings.value.barsOpacity = newValue / 100;\n }\n});\nconst areaOpacity = computed({\n get: () => settings.value.areaOpacity * 100,\n set: (newValue: number) => {\n settings.value.areaOpacity = newValue / 100;\n }\n});\n</script>\n\n<template>\n <aes-selector\n label=\"Fill color\"\n form-title=\"Fill Color Settings\"\n form-back-title=\"Layers\"\n type=\"fill\"\n :selected=\"fillColor\"\n @aes-update=\"(v, c) => onUpdate(v, c, 'fillColor')\"\n />\n <aes-selector\n label=\"Stroke color\"\n form-title=\"Stroke Color Settings\"\n form-back-title=\"Layers\"\n type=\"stroke\"\n :selected=\"lineColor\"\n @aes-update=\"(v, c) => onUpdate(v, c, 'lineColor')\"\n />\n <Slider\n label=\"Opacity of bars\"\n :min=\"0\"\n :max=\"100\"\n :step=\"1\"\n :breakpoints=\"false\"\n measure=\"%\"\n v-model=\"barOpacity\"\n />\n <Slider\n label=\"Opacity of areas\"\n :min=\"0\"\n :max=\"100\"\n :step=\"1\"\n :breakpoints=\"false\"\n measure=\"%\"\n v-model=\"areaOpacity\"\n />\n <div class=\"checkbox-item\">\n <pl-checkbox v-model=\"settings.normalize\" />\n <span>Normalize</span>\n </div>\n <div class=\"checkbox-item\">\n <pl-checkbox v-model=\"settings.showBars\" />\n <span>Show bars</span>\n </div>\n</template>\n"],"names":["layer","store","useStore","settings","computed","optionsState","fillColor","useDefaultAes","DEFAULT_WHITE","lineColor","DEFAULT_BLACK","onUpdate","value","colorOption","field","barOpacity","newValue","areaOpacity"],"mappings":";;;;;;sEAeMA,IAAQ;;;AADd,UAAMC,IAAQC,EAAA,GAERC,IAAWC,EAAS,MAAMH,EAAM,MAAM,SAAS,eAAeD,CAAK,CAAC,GACpEK,IAAeD;AAAA,MACnB,MAAMH,EAAM,MAAM,SAAS;AAAA,IAAA,GAGvBK,IAAYF;AAAA,MAAS,MACzBG,EAAcJ,EAAS,MAAM,WAAWE,EAAa,OAAOG,CAAa;AAAA,IAAA,GAErEC,IAAYL;AAAA,MAAS,MACzBG,EAAcJ,EAAS,MAAM,WAAWE,EAAa,OAAOK,CAAa;AAAA,IAAA;AAG3E,aAASC,EACPC,GACAC,GACAC,GACA;AACA,MAAID,EAAY,SAAS,oBACvBZ,EAAM,MAAM,SAAS,eAAeD,CAAK,EAAEc,CAAK,IAAI;AAAA,QAClD,MAAMD,EAAY;AAAA,MAAA,IAGpBZ,EAAM,MAAM,SAAS,eAAeD,CAAK,EAAEc,CAAK,IAAIF,GAElDC,EAAY,SAAS,qBAAqB,OAAOD,KAAU,aAC7DX,EAAM,MAAM,SAAS,YAAYY,EAAY,cAAc,IAAID;AAAA,IAEnE;AAEA,UAAMG,
|
|
1
|
+
{"version":3,"file":"StackedArea.vue.js","sources":["../../../../../../src/GraphMaker/forms/LayersForm/Layer/discrete/StackedArea.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport { useStore } from '../../../../store';\nimport { computed } from \"vue\";\nimport type { AesOption } from '../../../../components/AesSettings/types';\nimport type { AestheticMappingCategorical } from '../../../../dataBindAes';\nimport { useDefaultAes } from './utils';\nimport { DiscreteUIState } from \"@milaboratories/pf-plots\";\nimport {\n DEFAULT_BLACK,\n DEFAULT_WHITE,\n} from '../../../../constantsAesthetic';\nimport AesSelector from '../../AesSelector.vue';\nimport { PlCheckbox, Slider, PlDropdown } from '@platforma-sdk/ui-vue';\n\nconst store = useStore();\nconst layer = \"stackedArea\";\nconst settings = computed(() => store.value.reactive.layersSettings[layer]);\nconst optionsState = computed(\n () => store.value.reactive.optionsState as DiscreteUIState,\n);\n\nconst fillColor = computed(() =>\n useDefaultAes(settings.value.fillColor, optionsState.value, DEFAULT_WHITE),\n);\nconst lineColor = computed(() =>\n useDefaultAes(settings.value.lineColor, optionsState.value, DEFAULT_BLACK),\n);\n\nfunction onUpdate(\n value: string | AestheticMappingCategorical,\n colorOption: AesOption,\n field: \"fillColor\" | \"lineColor\",\n) {\n if (colorOption.type === \"dataCategorical\") {\n store.value.reactive.layersSettings[layer][field] = {\n type: colorOption.inputName,\n };\n } else {\n store.value.reactive.layersSettings[layer][field] = value;\n }\n if (colorOption.type === \"dataCategorical\" && typeof value !== \"string\") {\n store.value.reactive.dataBindAes[colorOption.selectedSource] = value;\n }\n}\n\nconst HEIGHT_OPTIONS: { text:string, value:string }[] = [\n { text: \"Sum\", value: \"sum\" },\n { text: \"Min\", value: \"min\" },\n { text: \"Max\", value: \"max\" },\n { text: \"Mean\", value: \"mean\" },\n { text: \"Median\", value: \"median\" },\n];\n\nconst barOpacity = computed({\n get: () => settings.value.barsOpacity * 100,\n set: (newValue: number) => {\n settings.value.barsOpacity = newValue / 100;\n }\n});\nconst areaOpacity = computed({\n get: () => settings.value.areaOpacity * 100,\n set: (newValue: number) => {\n settings.value.areaOpacity = newValue / 100;\n }\n});\n</script>\n\n<template>\n <aes-selector\n label=\"Fill color\"\n form-title=\"Fill Color Settings\"\n form-back-title=\"Layers\"\n type=\"fill\"\n :selected=\"fillColor\"\n @aes-update=\"(v, c) => onUpdate(v, c, 'fillColor')\"\n />\n <aes-selector\n label=\"Stroke color\"\n form-title=\"Stroke Color Settings\"\n form-back-title=\"Layers\"\n type=\"stroke\"\n :selected=\"lineColor\"\n @aes-update=\"(v, c) => onUpdate(v, c, 'lineColor')\"\n />\n <div class=\"input-item\" @click.stop>\n <pl-dropdown\n label=\"Height\"\n :options=\"HEIGHT_OPTIONS\"\n v-model=\"settings.height\"\n />\n </div>\n <Slider\n label=\"Opacity of bars\"\n :min=\"0\"\n :max=\"100\"\n :step=\"1\"\n :breakpoints=\"false\"\n measure=\"%\"\n v-model=\"barOpacity\"\n />\n <Slider\n label=\"Opacity of areas\"\n :min=\"0\"\n :max=\"100\"\n :step=\"1\"\n :breakpoints=\"false\"\n measure=\"%\"\n v-model=\"areaOpacity\"\n />\n <div class=\"checkbox-item\">\n <pl-checkbox v-model=\"settings.normalize\" />\n <span>Normalize</span>\n </div>\n <div class=\"checkbox-item\">\n <pl-checkbox v-model=\"settings.showBars\" />\n <span>Show bars</span>\n </div>\n</template>\n"],"names":["layer","store","useStore","settings","computed","optionsState","fillColor","useDefaultAes","DEFAULT_WHITE","lineColor","DEFAULT_BLACK","onUpdate","value","colorOption","field","HEIGHT_OPTIONS","barOpacity","newValue","areaOpacity"],"mappings":";;;;;;sEAeMA,IAAQ;;;AADd,UAAMC,IAAQC,EAAA,GAERC,IAAWC,EAAS,MAAMH,EA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;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StackedBar.vue.d.ts","sourceRoot":"","sources":["../../../../../../src/GraphMaker/forms/LayersForm/Layer/discrete/StackedBar.vue"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"StackedBar.vue.d.ts","sourceRoot":"","sources":["../../../../../../src/GraphMaker/forms/LayersForm/Layer/discrete/StackedBar.vue"],"names":[],"mappings":";AAiTA,wBAKG"}
|
|
@@ -1,68 +1,86 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { useStore as
|
|
1
|
+
import { defineComponent as C, computed as i, createElementBlock as k, openBlock as x, Fragment as V, createVNode as n, createElementVNode as s, withModifiers as b, unref as u } from "vue";
|
|
2
|
+
import { useStore as U } from "../../../../store.js";
|
|
3
3
|
import { useDefaultAes as f } from "./utils.js";
|
|
4
|
-
import { DEFAULT_WHITE as A, DEFAULT_BLACK as
|
|
5
|
-
import
|
|
6
|
-
import { Slider as
|
|
7
|
-
const
|
|
4
|
+
import { DEFAULT_WHITE as A, DEFAULT_BLACK as B } from "../../../../constantsAesthetic.js";
|
|
5
|
+
import c from "../../AesSelector.vue.js";
|
|
6
|
+
import { PlDropdown as E, Slider as F, PlCheckbox as L } from "@platforma-sdk/ui-vue";
|
|
7
|
+
const M = { class: "checkbox-item" }, m = "stackedBar", w = /* @__PURE__ */ C({
|
|
8
8
|
__name: "StackedBar",
|
|
9
|
-
setup(
|
|
10
|
-
const a =
|
|
9
|
+
setup(N) {
|
|
10
|
+
const a = U(), l = i(() => a.value.reactive.layersSettings[m]), d = i(
|
|
11
11
|
() => a.value.reactive.optionsState
|
|
12
|
-
), y =
|
|
13
|
-
() => f(l.value.fillColor,
|
|
14
|
-
),
|
|
15
|
-
() => f(l.value.lineColor,
|
|
12
|
+
), y = i(
|
|
13
|
+
() => f(l.value.fillColor, d.value, A)
|
|
14
|
+
), S = i(
|
|
15
|
+
() => f(l.value.lineColor, d.value, B)
|
|
16
16
|
);
|
|
17
|
-
function
|
|
18
|
-
e.type === "dataCategorical" ? a.value.reactive.layersSettings[
|
|
17
|
+
function p(o, e, t) {
|
|
18
|
+
e.type === "dataCategorical" ? a.value.reactive.layersSettings[m][t] = {
|
|
19
19
|
type: e.inputName
|
|
20
|
-
} : a.value.reactive.layersSettings[
|
|
20
|
+
} : a.value.reactive.layersSettings[m][t] = o, e.type === "dataCategorical" && typeof o != "string" && (a.value.reactive.dataBindAes[e.selectedSource] = o);
|
|
21
21
|
}
|
|
22
|
-
const
|
|
22
|
+
const g = [
|
|
23
|
+
{ text: "Sum", value: "sum" },
|
|
24
|
+
{ text: "Min", value: "min" },
|
|
25
|
+
{ text: "Max", value: "max" },
|
|
26
|
+
{ text: "Mean", value: "mean" },
|
|
27
|
+
{ text: "Median", value: "median" }
|
|
28
|
+
], v = i({
|
|
23
29
|
get: () => l.value.opacity * 100,
|
|
24
30
|
set: (o) => {
|
|
25
31
|
l.value.opacity = o / 100;
|
|
26
32
|
}
|
|
27
33
|
});
|
|
28
|
-
return (o, e) => (
|
|
29
|
-
|
|
34
|
+
return (o, e) => (x(), k(V, null, [
|
|
35
|
+
n(c, {
|
|
30
36
|
label: "Fill color",
|
|
31
37
|
"form-title": "Fill Color Settings",
|
|
32
38
|
"form-back-title": "Layers",
|
|
33
39
|
type: "fill",
|
|
34
40
|
selected: y.value,
|
|
35
|
-
onAesUpdate: e[0] || (e[0] = (t,
|
|
41
|
+
onAesUpdate: e[0] || (e[0] = (t, r) => p(t, r, "fillColor"))
|
|
36
42
|
}, null, 8, ["selected"]),
|
|
37
|
-
|
|
43
|
+
n(c, {
|
|
38
44
|
label: "Stroke color",
|
|
39
45
|
"form-title": "Stroke Color Settings",
|
|
40
46
|
"form-back-title": "Layers",
|
|
41
47
|
type: "stroke",
|
|
42
|
-
selected:
|
|
43
|
-
onAesUpdate: e[1] || (e[1] = (t,
|
|
48
|
+
selected: S.value,
|
|
49
|
+
onAesUpdate: e[1] || (e[1] = (t, r) => p(t, r, "lineColor"))
|
|
44
50
|
}, null, 8, ["selected"]),
|
|
45
|
-
s(
|
|
51
|
+
s("div", {
|
|
52
|
+
class: "input-item",
|
|
53
|
+
onClick: e[3] || (e[3] = b(() => {
|
|
54
|
+
}, ["stop"]))
|
|
55
|
+
}, [
|
|
56
|
+
n(u(E), {
|
|
57
|
+
label: "Height",
|
|
58
|
+
options: g,
|
|
59
|
+
modelValue: l.value.height,
|
|
60
|
+
"onUpdate:modelValue": e[2] || (e[2] = (t) => l.value.height = t)
|
|
61
|
+
}, null, 8, ["modelValue"])
|
|
62
|
+
]),
|
|
63
|
+
n(u(F), {
|
|
46
64
|
label: "Opacity",
|
|
47
65
|
min: 0,
|
|
48
66
|
max: 100,
|
|
49
67
|
step: 1,
|
|
50
68
|
breakpoints: !1,
|
|
51
69
|
measure: "%",
|
|
52
|
-
modelValue:
|
|
53
|
-
"onUpdate:modelValue": e[
|
|
70
|
+
modelValue: v.value,
|
|
71
|
+
"onUpdate:modelValue": e[4] || (e[4] = (t) => v.value = t)
|
|
54
72
|
}, null, 8, ["modelValue"]),
|
|
55
|
-
|
|
56
|
-
|
|
73
|
+
s("div", M, [
|
|
74
|
+
n(u(L), {
|
|
57
75
|
modelValue: l.value.normalize,
|
|
58
|
-
"onUpdate:modelValue": e[
|
|
76
|
+
"onUpdate:modelValue": e[5] || (e[5] = (t) => l.value.normalize = t)
|
|
59
77
|
}, null, 8, ["modelValue"]),
|
|
60
|
-
e[
|
|
78
|
+
e[6] || (e[6] = s("span", null, "Normalize", -1))
|
|
61
79
|
])
|
|
62
80
|
], 64));
|
|
63
81
|
}
|
|
64
82
|
});
|
|
65
83
|
export {
|
|
66
|
-
|
|
84
|
+
w as default
|
|
67
85
|
};
|
|
68
86
|
//# sourceMappingURL=StackedBar.vue.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StackedBar.vue.js","sources":["../../../../../../src/GraphMaker/forms/LayersForm/Layer/discrete/StackedBar.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport { useStore } from '../../../../store';\nimport { computed } from \"vue\";\nimport type { AesOption } from '../../../../components/AesSettings/types';\nimport type { AestheticMappingCategorical } from '../../../../dataBindAes';\nimport { useDefaultAes } from './utils';\nimport { DiscreteUIState } from \"@milaboratories/pf-plots\";\nimport {\n DEFAULT_BLACK,\n DEFAULT_WHITE,\n} from '../../../../constantsAesthetic';\nimport AesSelector from '../../AesSelector.vue';\nimport { PlCheckbox, Slider } from '@platforma-sdk/ui-vue';\n\nconst store = useStore();\nconst layer = \"stackedBar\";\nconst settings = computed(() => store.value.reactive.layersSettings[layer]);\nconst optionsState = computed(\n () => store.value.reactive.optionsState as DiscreteUIState,\n);\n\nconst fillColor = computed(() =>\n useDefaultAes(settings.value.fillColor, optionsState.value, DEFAULT_WHITE),\n);\nconst lineColor = computed(() =>\n useDefaultAes(settings.value.lineColor, optionsState.value, DEFAULT_BLACK),\n);\n\nfunction onUpdate(\n value: string | AestheticMappingCategorical,\n colorOption: AesOption,\n field: \"fillColor\" | \"lineColor\",\n) {\n if (colorOption.type === \"dataCategorical\") {\n store.value.reactive.layersSettings[layer][field] = {\n type: colorOption.inputName,\n };\n } else {\n store.value.reactive.layersSettings[layer][field] = value;\n }\n if (colorOption.type === \"dataCategorical\" && typeof value !== \"string\") {\n store.value.reactive.dataBindAes[colorOption.selectedSource] = value;\n }\n}\n\nconst opacity = computed({\n get: () => settings.value.opacity * 100,\n set: (newValue: number) => {\n settings.value.opacity = newValue / 100;\n }\n})\n</script>\n\n<template>\n <aes-selector\n label=\"Fill color\"\n form-title=\"Fill Color Settings\"\n form-back-title=\"Layers\"\n type=\"fill\"\n :selected=\"fillColor\"\n @aes-update=\"(v, c) => onUpdate(v, c, 'fillColor')\"\n />\n <aes-selector\n label=\"Stroke color\"\n form-title=\"Stroke Color Settings\"\n form-back-title=\"Layers\"\n type=\"stroke\"\n :selected=\"lineColor\"\n @aes-update=\"(v, c) => onUpdate(v, c, 'lineColor')\"\n />\n <Slider\n label=\"Opacity\"\n :min=\"0\"\n :max=\"100\"\n :step=\"1\"\n :breakpoints=\"false\"\n measure=\"%\"\n v-model=\"opacity\"\n />\n <div class=\"checkbox-item\">\n <pl-checkbox v-model=\"settings.normalize\" />\n <span>Normalize</span>\n </div>\n</template>\n"],"names":["layer","store","useStore","settings","computed","optionsState","fillColor","useDefaultAes","DEFAULT_WHITE","lineColor","DEFAULT_BLACK","onUpdate","value","colorOption","field","opacity","newValue"],"mappings":";;;;;;sCAeMA,IAAQ;;;AADd,UAAMC,IAAQC,EAAA,GAERC,IAAWC,EAAS,MAAMH,EAAM,MAAM,SAAS,eAAeD,CAAK,CAAC,GACpEK,IAAeD;AAAA,MACnB,MAAMH,EAAM,MAAM,SAAS;AAAA,IAAA,GAGvBK,IAAYF;AAAA,MAAS,MACzBG,EAAcJ,EAAS,MAAM,WAAWE,EAAa,OAAOG,CAAa;AAAA,IAAA,GAErEC,IAAYL;AAAA,MAAS,MACzBG,EAAcJ,EAAS,MAAM,WAAWE,EAAa,OAAOK,CAAa;AAAA,IAAA;AAG3E,aAASC,EACPC,GACAC,GACAC,GACA;AACA,MAAID,EAAY,SAAS,oBACvBZ,EAAM,MAAM,SAAS,eAAeD,CAAK,EAAEc,CAAK,IAAI;AAAA,QAClD,MAAMD,EAAY;AAAA,MAAA,IAGpBZ,EAAM,MAAM,SAAS,eAAeD,CAAK,EAAEc,CAAK,IAAIF,GAElDC,EAAY,SAAS,qBAAqB,OAAOD,KAAU,aAC7DX,EAAM,MAAM,SAAS,YAAYY,EAAY,cAAc,IAAID;AAAA,IAEnE;AAEA,UAAMG,
|
|
1
|
+
{"version":3,"file":"StackedBar.vue.js","sources":["../../../../../../src/GraphMaker/forms/LayersForm/Layer/discrete/StackedBar.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport { useStore } from '../../../../store';\nimport { computed } from \"vue\";\nimport type { AesOption } from '../../../../components/AesSettings/types';\nimport type { AestheticMappingCategorical } from '../../../../dataBindAes';\nimport { useDefaultAes } from './utils';\nimport { DiscreteUIState } from \"@milaboratories/pf-plots\";\nimport {\n DEFAULT_BLACK,\n DEFAULT_WHITE,\n} from '../../../../constantsAesthetic';\nimport AesSelector from '../../AesSelector.vue';\nimport { PlCheckbox, Slider, PlDropdown } from '@platforma-sdk/ui-vue';\n\nconst store = useStore();\nconst layer = \"stackedBar\";\nconst settings = computed(() => store.value.reactive.layersSettings[layer]);\nconst optionsState = computed(\n () => store.value.reactive.optionsState as DiscreteUIState,\n);\n\nconst fillColor = computed(() =>\n useDefaultAes(settings.value.fillColor, optionsState.value, DEFAULT_WHITE),\n);\nconst lineColor = computed(() =>\n useDefaultAes(settings.value.lineColor, optionsState.value, DEFAULT_BLACK),\n);\n\nfunction onUpdate(\n value: string | AestheticMappingCategorical,\n colorOption: AesOption,\n field: \"fillColor\" | \"lineColor\",\n) {\n if (colorOption.type === \"dataCategorical\") {\n store.value.reactive.layersSettings[layer][field] = {\n type: colorOption.inputName,\n };\n } else {\n store.value.reactive.layersSettings[layer][field] = value;\n }\n if (colorOption.type === \"dataCategorical\" && typeof value !== \"string\") {\n store.value.reactive.dataBindAes[colorOption.selectedSource] = value;\n }\n}\n\nconst HEIGHT_OPTIONS: { text:string, value:string }[] = [\n { text: \"Sum\", value: \"sum\" },\n { text: \"Min\", value: \"min\" },\n { text: \"Max\", value: \"max\" },\n { text: \"Mean\", value: \"mean\" },\n { text: \"Median\", value: \"median\" },\n];\n\nconst opacity = computed({\n get: () => settings.value.opacity * 100,\n set: (newValue: number) => {\n settings.value.opacity = newValue / 100;\n }\n})\n</script>\n\n<template>\n <aes-selector\n label=\"Fill color\"\n form-title=\"Fill Color Settings\"\n form-back-title=\"Layers\"\n type=\"fill\"\n :selected=\"fillColor\"\n @aes-update=\"(v, c) => onUpdate(v, c, 'fillColor')\"\n />\n <aes-selector\n label=\"Stroke color\"\n form-title=\"Stroke Color Settings\"\n form-back-title=\"Layers\"\n type=\"stroke\"\n :selected=\"lineColor\"\n @aes-update=\"(v, c) => onUpdate(v, c, 'lineColor')\"\n />\n <div class=\"input-item\" @click.stop>\n <pl-dropdown\n label=\"Height\"\n :options=\"HEIGHT_OPTIONS\"\n v-model=\"settings.height\"\n />\n </div>\n <Slider\n label=\"Opacity\"\n :min=\"0\"\n :max=\"100\"\n :step=\"1\"\n :breakpoints=\"false\"\n measure=\"%\"\n v-model=\"opacity\"\n />\n <div class=\"checkbox-item\">\n <pl-checkbox v-model=\"settings.normalize\" />\n <span>Normalize</span>\n </div>\n</template>\n"],"names":["layer","store","useStore","settings","computed","optionsState","fillColor","useDefaultAes","DEFAULT_WHITE","lineColor","DEFAULT_BLACK","onUpdate","value","colorOption","field","HEIGHT_OPTIONS","opacity","newValue"],"mappings":";;;;;;sCAeMA,IAAQ;;;AADd,UAAMC,IAAQC,EAAA,GAERC,IAAWC,EAAS,MAAMH,EAAM,MAAM,SAAS,eAAeD,CAAK,CAAC,GACpEK,IAAeD;AAAA,MACnB,MAAMH,EAAM,MAAM,SAAS;AAAA,IAAA,GAGvBK,IAAYF;AAAA,MAAS,MACzBG,EAAcJ,EAAS,MAAM,WAAWE,EAAa,OAAOG,CAAa;AAAA,IAAA,GAErEC,IAAYL;AAAA,MAAS,MACzBG,EAAcJ,EAAS,MAAM,WAAWE,EAAa,OAAOK,CAAa;AAAA,IAAA;AAG3E,aAASC,EACPC,GACAC,GACAC,GACA;AACA,MAAID,EAAY,SAAS,oBACvBZ,EAAM,MAAM,SAAS,eAAeD,CAAK,EAAEc,CAAK,IAAI;AAAA,QAClD,MAAMD,EAAY;AAAA,MAAA,IAGpBZ,EAAM,MAAM,SAAS,eAAeD,CAAK,EAAEc,CAAK,IAAIF,GAElDC,EAAY,SAAS,qBAAqB,OAAOD,KAAU,aAC7DX,EAAM,MAAM,SAAS,YAAYY,EAAY,cAAc,IAAID;AAAA,IAEnE;AAEA,UAAMG,IAAkD;AAAA,MACtD,EAAE,MAAM,OAAO,OAAO,MAAA;AAAA,MACtB,EAAE,MAAM,OAAO,OAAO,MAAA;AAAA,MACtB,EAAE,MAAM,OAAO,OAAO,MAAA;AAAA,MACtB,EAAE,MAAM,QAAQ,OAAO,OAAA;AAAA,MACvB,EAAE,MAAM,UAAU,OAAO,SAAA;AAAA,IAAS,GAG9BC,IAAUZ,EAAS;AAAA,MACvB,KAAK,MAAMD,EAAS,MAAM,UAAU;AAAA,MACpC,KAAK,CAACc,MAAqB;AACzB,QAAAd,EAAS,MAAM,UAAUc,IAAW;AAAA,MACtC;AAAA,IAAA,CACD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -152,6 +152,7 @@ export declare function composeDiscreteSettings(settings: DiscreteSettings, reac
|
|
|
152
152
|
type: "primaryGrouping" | "secondaryGrouping";
|
|
153
153
|
} | undefined;
|
|
154
154
|
} | undefined;
|
|
155
|
+
height?: "mean" | "median" | "min" | "max" | "sum" | undefined;
|
|
155
156
|
normalize?: boolean | undefined;
|
|
156
157
|
} | {
|
|
157
158
|
type: "binnedDots";
|
|
@@ -236,6 +237,7 @@ export declare function composeDiscreteSettings(settings: DiscreteSettings, reac
|
|
|
236
237
|
barsOpacity?: number | undefined;
|
|
237
238
|
areaOpacity?: number | undefined;
|
|
238
239
|
} | undefined;
|
|
240
|
+
height?: "mean" | "median" | "min" | "max" | "sum" | undefined;
|
|
239
241
|
normalize?: boolean | undefined;
|
|
240
242
|
showBars?: boolean | undefined;
|
|
241
243
|
} | {
|