@orbcharts/core 3.0.0-beta.3 → 3.0.0-beta.5
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/orbcharts-core.es.js +2665 -2376
- package/dist/orbcharts-core.umd.js +4 -4
- package/dist/src/utils/d3Scale.d.ts +28 -0
- package/dist/src/utils/gridObservables.d.ts +29 -19
- package/dist/src/utils/index.d.ts +1 -1
- package/dist/src/utils/multiGridObservables.d.ts +2 -2
- package/dist/src/utils/multiValueObservables.d.ts +73 -0
- package/dist/src/utils/orbchartsUtils.d.ts +19 -5
- package/dist/src/utils/seriesObservables.d.ts +4 -4
- package/dist/src/utils/treeObservables.d.ts +2 -5
- package/package.json +2 -2
- package/src/defaults.ts +4 -1
- package/src/grid/contextObserverCallback.ts +57 -36
- package/src/multiValue/computedDataFn.ts +81 -147
- package/src/multiValue/contextObserverCallback.ts +150 -2
- package/src/relationship/computedDataFn.ts +1 -1
- package/src/tree/computedDataFn.ts +9 -10
- package/src/tree/contextObserverCallback.ts +6 -9
- package/src/utils/d3Scale.ts +198 -0
- package/src/utils/gridObservables.ts +303 -234
- package/src/utils/index.ts +1 -1
- package/src/utils/multiGridObservables.ts +68 -42
- package/src/utils/multiValueObservables.ts +662 -0
- package/src/utils/orbchartsUtils.ts +70 -45
- package/src/utils/seriesObservables.ts +7 -7
- package/src/utils/treeObservables.ts +44 -33
- package/src/utils/validator.ts +3 -2
- package/dist/src/utils/d3Utils.d.ts +0 -19
- package/src/utils/d3Utils.ts +0 -108
@@ -0,0 +1,28 @@
|
|
1
|
+
import * as d3 from 'd3';
|
2
|
+
export declare const createValueToAxisScale: ({ maxValue, minValue, axisWidth, scaleDomain, scaleRange, reverse }: {
|
3
|
+
maxValue: number;
|
4
|
+
minValue: number;
|
5
|
+
axisWidth: number;
|
6
|
+
scaleDomain: [number | "min" | "auto", number | "max" | "auto"];
|
7
|
+
scaleRange: [number, number];
|
8
|
+
reverse?: boolean;
|
9
|
+
}) => d3.ScaleLinear<number, number, never>;
|
10
|
+
export declare const createAxisToValueScale: ({ maxValue, minValue, axisWidth, scaleDomain, scaleRange, reverse }: {
|
11
|
+
maxValue: number;
|
12
|
+
minValue: number;
|
13
|
+
axisWidth: number;
|
14
|
+
scaleDomain: [number | "min" | "auto", number | "max" | "auto"];
|
15
|
+
scaleRange: [number, number];
|
16
|
+
reverse?: boolean;
|
17
|
+
}) => d3.ScaleLinear<number, number, never>;
|
18
|
+
export declare const createLabelToAxisScale: ({ axisLabels, axisWidth, padding }: {
|
19
|
+
axisLabels: string[];
|
20
|
+
axisWidth: number;
|
21
|
+
padding?: number;
|
22
|
+
}) => d3.ScalePoint<string>;
|
23
|
+
export declare const createAxisToLabelIndexScale: ({ axisLabels, axisWidth, padding, reverse }: {
|
24
|
+
axisLabels: string[] | Date[];
|
25
|
+
axisWidth: number;
|
26
|
+
padding?: number;
|
27
|
+
reverse?: boolean;
|
28
|
+
}) => d3.ScaleQuantize<number, never>;
|
@@ -1,28 +1,11 @@
|
|
1
1
|
import { Observable } from 'rxjs';
|
2
|
-
import { ComputedDataTypeMap, ComputedDataGrid, ComputedDatumGrid, DataFormatterTypeMap, DataFormatterGrid, ComputedLayoutDatumGrid, ComputedLayoutDataGrid,
|
2
|
+
import { ComputedDataTypeMap, ComputedDataGrid, ComputedDatumGrid, DataFormatterTypeMap, DataFormatterGrid, ComputedLayoutDatumGrid, ComputedLayoutDataGrid, ContainerPositionScaled, Layout, TransformData } from '../../lib/core-types';
|
3
3
|
|
4
4
|
export declare const gridComputedLayoutDataObservable: ({ computedData$, fullDataFormatter$, layout$ }: {
|
5
5
|
computedData$: Observable<ComputedDataTypeMap<"grid">>;
|
6
6
|
fullDataFormatter$: Observable<DataFormatterTypeMap<"grid">>;
|
7
7
|
layout$: Observable<Layout>;
|
8
8
|
}) => Observable<ComputedLayoutDatumGrid[][]>;
|
9
|
-
export declare const gridAxesTransformObservable: ({ fullDataFormatter$, layout$ }: {
|
10
|
-
fullDataFormatter$: Observable<DataFormatterTypeMap<"grid">>;
|
11
|
-
layout$: Observable<Layout>;
|
12
|
-
}) => Observable<TransformData>;
|
13
|
-
export declare const gridAxesReverseTransformObservable: ({ gridAxesTransform$ }: {
|
14
|
-
gridAxesTransform$: Observable<TransformData>;
|
15
|
-
}) => Observable<TransformData>;
|
16
|
-
export declare const gridGraphicTransformObservable: ({ computedData$, fullDataFormatter$, layout$ }: {
|
17
|
-
computedData$: Observable<ComputedDataTypeMap<"grid">>;
|
18
|
-
fullDataFormatter$: Observable<DataFormatterTypeMap<"grid">>;
|
19
|
-
layout$: Observable<Layout>;
|
20
|
-
}) => Observable<TransformData>;
|
21
|
-
export declare const gridGraphicReverseScaleObservable: ({ gridContainerPosition$, gridAxesTransform$, gridGraphicTransform$ }: {
|
22
|
-
gridContainerPosition$: Observable<GridContainerPosition[]>;
|
23
|
-
gridAxesTransform$: Observable<TransformData>;
|
24
|
-
gridGraphicTransform$: Observable<TransformData>;
|
25
|
-
}) => Observable<[number, number][]>;
|
26
9
|
export declare const gridAxesSizeObservable: ({ fullDataFormatter$, layout$ }: {
|
27
10
|
fullDataFormatter$: Observable<DataFormatterGrid>;
|
28
11
|
layout$: Observable<Layout>;
|
@@ -43,8 +26,35 @@ export declare const gridContainerPositionObservable: ({ computedData$, fullData
|
|
43
26
|
computedData$: Observable<ComputedDataTypeMap<"grid">>;
|
44
27
|
fullDataFormatter$: Observable<DataFormatterTypeMap<"grid">>;
|
45
28
|
layout$: Observable<Layout>;
|
46
|
-
}) => Observable<
|
29
|
+
}) => Observable<ContainerPositionScaled[]>;
|
47
30
|
export declare const computedStackedDataObservables: ({ isSeriesSeprate$, computedData$ }: {
|
48
31
|
isSeriesSeprate$: Observable<boolean>;
|
49
32
|
computedData$: Observable<ComputedDataGrid>;
|
50
33
|
}) => Observable<ComputedDataGrid>;
|
34
|
+
export declare const groupScaleDomainValueObservable: ({ computedData$, fullDataFormatter$ }: {
|
35
|
+
computedData$: Observable<ComputedDataGrid>;
|
36
|
+
fullDataFormatter$: Observable<DataFormatterTypeMap<"grid">>;
|
37
|
+
}) => Observable<[number, number]>;
|
38
|
+
export declare const filteredMinMaxValueObservable: ({ computedData$, groupScaleDomainValue$ }: {
|
39
|
+
computedData$: Observable<ComputedDataGrid>;
|
40
|
+
groupScaleDomainValue$: Observable<[number, number]>;
|
41
|
+
}) => Observable<[number, number]>;
|
42
|
+
export declare const gridAxesTransformObservable: ({ fullDataFormatter$, layout$ }: {
|
43
|
+
fullDataFormatter$: Observable<DataFormatterTypeMap<"grid">>;
|
44
|
+
layout$: Observable<Layout>;
|
45
|
+
}) => Observable<TransformData>;
|
46
|
+
export declare const gridAxesReverseTransformObservable: ({ gridAxesTransform$ }: {
|
47
|
+
gridAxesTransform$: Observable<TransformData>;
|
48
|
+
}) => Observable<TransformData>;
|
49
|
+
export declare const gridGraphicTransformObservable: ({ computedData$, groupScaleDomainValue$, filteredMinMaxValue$, fullDataFormatter$, layout$ }: {
|
50
|
+
computedData$: Observable<ComputedDataTypeMap<"grid">>;
|
51
|
+
groupScaleDomainValue$: Observable<[number, number]>;
|
52
|
+
filteredMinMaxValue$: Observable<[number, number]>;
|
53
|
+
fullDataFormatter$: Observable<DataFormatterTypeMap<"grid">>;
|
54
|
+
layout$: Observable<Layout>;
|
55
|
+
}) => Observable<TransformData>;
|
56
|
+
export declare const gridGraphicReverseScaleObservable: ({ gridContainerPosition$, gridAxesTransform$, gridGraphicTransform$ }: {
|
57
|
+
gridContainerPosition$: Observable<ContainerPositionScaled[]>;
|
58
|
+
gridAxesTransform$: Observable<TransformData>;
|
59
|
+
gridGraphicTransform$: Observable<TransformData>;
|
60
|
+
}) => Observable<[number, number][]>;
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import { Subject, Observable } from 'rxjs';
|
2
|
-
import { ChartParams, ComputedDataTypeMap, ContextObserverMultiGridDetail, DataFormatterTypeMap, EventMultiGrid,
|
2
|
+
import { ChartParams, ComputedDataTypeMap, ContextObserverMultiGridDetail, DataFormatterTypeMap, EventMultiGrid, ContainerPositionScaled, Layout } from '../../lib/core-types';
|
3
3
|
|
4
4
|
export declare const multiGridEachDetailObservable: ({ fullDataFormatter$, computedData$, layout$, fullChartParams$, event$ }: {
|
5
5
|
fullDataFormatter$: Observable<DataFormatterTypeMap<"multiGrid">>;
|
@@ -12,4 +12,4 @@ export declare const multiGridContainerObservable: ({ computedData$, fullDataFor
|
|
12
12
|
computedData$: Observable<ComputedDataTypeMap<"multiGrid">>;
|
13
13
|
fullDataFormatter$: Observable<DataFormatterTypeMap<"multiGrid">>;
|
14
14
|
layout$: Observable<Layout>;
|
15
|
-
}) => Observable<
|
15
|
+
}) => Observable<ContainerPositionScaled[][]>;
|
@@ -0,0 +1,73 @@
|
|
1
|
+
import { Observable } from 'rxjs';
|
2
|
+
import { ComputedDataTypeMap, ComputedDatumMultiValue, DataFormatterTypeMap, ComputedLayoutDatumMultiValue, ComputedLayoutDataMultiValue, ContainerPositionScaled, Layout, TransformData } from '../../lib/core-types';
|
3
|
+
|
4
|
+
export declare const minMaxXYObservable: ({ computedData$ }: {
|
5
|
+
computedData$: Observable<ComputedDataTypeMap<"multiValue">>;
|
6
|
+
}) => Observable<{
|
7
|
+
minX: number;
|
8
|
+
maxX: number;
|
9
|
+
minY: number;
|
10
|
+
maxY: number;
|
11
|
+
}>;
|
12
|
+
export declare const multiValueComputedLayoutDataObservable: ({ computedData$, minMaxXY$, fullDataFormatter$, layout$ }: {
|
13
|
+
computedData$: Observable<ComputedDataTypeMap<"multiValue">>;
|
14
|
+
minMaxXY$: Observable<{
|
15
|
+
minX: number;
|
16
|
+
maxX: number;
|
17
|
+
minY: number;
|
18
|
+
maxY: number;
|
19
|
+
}>;
|
20
|
+
fullDataFormatter$: Observable<DataFormatterTypeMap<"multiValue">>;
|
21
|
+
layout$: Observable<Layout>;
|
22
|
+
}) => Observable<ComputedLayoutDataMultiValue>;
|
23
|
+
export declare const multiValueCategoryLabelsObservable: ({ computedData$, fullDataFormatter$ }: {
|
24
|
+
computedData$: Observable<ComputedDataTypeMap<"multiValue">>;
|
25
|
+
fullDataFormatter$: Observable<DataFormatterTypeMap<"multiValue">>;
|
26
|
+
}) => Observable<string[]>;
|
27
|
+
export declare const multiValueVisibleComputedDataObservable: ({ computedData$ }: {
|
28
|
+
computedData$: Observable<ComputedDataTypeMap<"multiValue">>;
|
29
|
+
}) => Observable<ComputedDatumMultiValue[][]>;
|
30
|
+
export declare const multiValueVisibleComputedLayoutDataObservable: ({ computedLayoutData$ }: {
|
31
|
+
computedLayoutData$: Observable<ComputedLayoutDataMultiValue>;
|
32
|
+
}) => Observable<ComputedLayoutDatumMultiValue[][]>;
|
33
|
+
export declare const multiValueContainerPositionObservable: ({ computedData$, fullDataFormatter$, layout$ }: {
|
34
|
+
computedData$: Observable<ComputedDataTypeMap<"multiValue">>;
|
35
|
+
fullDataFormatter$: Observable<DataFormatterTypeMap<"multiValue">>;
|
36
|
+
layout$: Observable<Layout>;
|
37
|
+
}) => Observable<ContainerPositionScaled[]>;
|
38
|
+
export declare const filteredMinMaxXYDataObservable: ({ visibleComputedLayoutData$, minMaxXY$, fullDataFormatter$ }: {
|
39
|
+
visibleComputedLayoutData$: Observable<ComputedLayoutDataMultiValue>;
|
40
|
+
minMaxXY$: Observable<{
|
41
|
+
minX: number;
|
42
|
+
maxX: number;
|
43
|
+
minY: number;
|
44
|
+
maxY: number;
|
45
|
+
}>;
|
46
|
+
fullDataFormatter$: Observable<DataFormatterTypeMap<"multiValue">>;
|
47
|
+
}) => Observable<{
|
48
|
+
datumList: ComputedLayoutDatumMultiValue[];
|
49
|
+
minXDatum: ComputedLayoutDatumMultiValue;
|
50
|
+
maxXDatum: ComputedLayoutDatumMultiValue;
|
51
|
+
minYDatum: ComputedLayoutDatumMultiValue;
|
52
|
+
maxYDatum: ComputedLayoutDatumMultiValue;
|
53
|
+
}>;
|
54
|
+
export declare const multiValueGraphicTransformObservable: ({ minMaxXY$, filteredMinMaxXYData$, fullDataFormatter$, layout$ }: {
|
55
|
+
minMaxXY$: Observable<{
|
56
|
+
minX: number;
|
57
|
+
maxX: number;
|
58
|
+
minY: number;
|
59
|
+
maxY: number;
|
60
|
+
}>;
|
61
|
+
filteredMinMaxXYData$: Observable<{
|
62
|
+
minXDatum: ComputedLayoutDatumMultiValue;
|
63
|
+
maxXDatum: ComputedLayoutDatumMultiValue;
|
64
|
+
minYDatum: ComputedLayoutDatumMultiValue;
|
65
|
+
maxYDatum: ComputedLayoutDatumMultiValue;
|
66
|
+
}>;
|
67
|
+
fullDataFormatter$: Observable<DataFormatterTypeMap<"multiValue">>;
|
68
|
+
layout$: Observable<Layout>;
|
69
|
+
}) => Observable<TransformData>;
|
70
|
+
export declare const multiValueGraphicReverseScaleObservable: ({ multiValueContainerPosition$, multiValueGraphicTransform$ }: {
|
71
|
+
multiValueContainerPosition$: Observable<ContainerPositionScaled[]>;
|
72
|
+
multiValueGraphicTransform$: Observable<TransformData>;
|
73
|
+
}) => Observable<[number, number][]>;
|
@@ -1,9 +1,10 @@
|
|
1
|
-
import { ChartType, ChartParams, DatumValue, DataSeries, DataGrid, DataGridDatum, DataMultiGrid, DataMultiValue, DataFormatterContainer, SeriesDirection, DataFormatterGridGrid,
|
1
|
+
import { ChartType, ChartParams, DatumValue, DataSeries, DataGrid, DataGridDatum, DataMultiGrid, DataMultiValue, ComputedLayoutDatumMultiValue, DataFormatterContainer, SeriesDirection, DataFormatterGridGrid, ContainerPosition, ContainerPositionScaled, Layout } from '../../lib/core-types';
|
2
2
|
import * as d3 from 'd3';
|
3
3
|
export declare function formatValueToLabel(value: any, valueFormatter: string | ((text: d3.NumberValue) => string)): string;
|
4
|
-
export declare function createDefaultDatumId(chartTypeOrPrefix: string, levelOneIndex: number, levelTwoIndex
|
4
|
+
export declare function createDefaultDatumId(chartTypeOrPrefix: string, levelOneIndex: number, levelTwoIndex?: number, levelThreeIndex?: number): string;
|
5
5
|
export declare function createDefaultSeriesLabel(chartTypeOrPrefix: string, seriesIndex: number): string;
|
6
6
|
export declare function createDefaultGroupLabel(chartTypeOrPrefix: string, groupIndex: number): string;
|
7
|
+
export declare function createDefaultCategoryLabel(): string;
|
7
8
|
export declare function createGridSeriesLabels({ transposedDataGrid, dataFormatterGrid, chartType }: {
|
8
9
|
transposedDataGrid: DataGridDatum[][];
|
9
10
|
dataFormatterGrid: DataFormatterGridGrid;
|
@@ -31,8 +32,21 @@ export declare function getMinAndMaxValue(data: DatumValue[]): [number, number];
|
|
31
32
|
export declare function getMinAndMaxSeries(data: DataSeries): [number, number];
|
32
33
|
export declare function getMinAndMaxGrid(data: DataGrid): [number, number];
|
33
34
|
export declare function getMinAndMaxMultiGrid(data: DataMultiGrid): [number, number];
|
34
|
-
export declare function getMinAndMaxMultiValue(data: DataMultiValue, valueIndex
|
35
|
+
export declare function getMinAndMaxMultiValue(data: DataMultiValue, valueIndex: number): [number, number];
|
36
|
+
export declare function getMinAndMaxMultiValueXY({ data, minX, maxX, minY, maxY }: {
|
37
|
+
data: ComputedLayoutDatumMultiValue[][];
|
38
|
+
minX: number;
|
39
|
+
maxX: number;
|
40
|
+
minY: number;
|
41
|
+
maxY: number;
|
42
|
+
}): {
|
43
|
+
minXDatum: ComputedLayoutDatumMultiValue;
|
44
|
+
maxXDatum: ComputedLayoutDatumMultiValue;
|
45
|
+
minYDatum: ComputedLayoutDatumMultiValue;
|
46
|
+
maxYDatum: ComputedLayoutDatumMultiValue;
|
47
|
+
filteredData: ComputedLayoutDatumMultiValue[][];
|
48
|
+
};
|
35
49
|
export declare function transposeData<T>(seriesDirection: SeriesDirection, data: T[][]): T[][];
|
36
50
|
export declare function seriesColorPredicate(seriesIndex: number, chartParams: ChartParams): string;
|
37
|
-
export declare function calcSeriesContainerLayout(layout: Layout, container: DataFormatterContainer, amount: number):
|
38
|
-
export declare function calcGridContainerLayout(layout: Layout, container: DataFormatterContainer, amount: number):
|
51
|
+
export declare function calcSeriesContainerLayout(layout: Layout, container: DataFormatterContainer, amount: number): ContainerPosition[];
|
52
|
+
export declare function calcGridContainerLayout(layout: Layout, container: DataFormatterContainer, amount: number): ContainerPositionScaled[];
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import { Observable } from 'rxjs';
|
2
|
-
import { ComputedDatumSeries, ComputedDataTypeMap, DataFormatterTypeMap,
|
2
|
+
import { ComputedDatumSeries, ComputedDataTypeMap, DataFormatterTypeMap, ContainerPosition, Layout } from '../../lib/core-types';
|
3
3
|
|
4
4
|
export declare const separateSeriesObservable: ({ fullDataFormatter$ }: {
|
5
5
|
fullDataFormatter$: Observable<DataFormatterTypeMap<"series">>;
|
@@ -18,9 +18,9 @@ export declare const seriesContainerPositionObservable: ({ computedData$, fullDa
|
|
18
18
|
computedData$: Observable<ComputedDataTypeMap<"series">>;
|
19
19
|
fullDataFormatter$: Observable<DataFormatterTypeMap<"series">>;
|
20
20
|
layout$: Observable<Layout>;
|
21
|
-
}) => Observable<
|
21
|
+
}) => Observable<ContainerPosition[]>;
|
22
22
|
export declare const seriesContainerPositionMapObservable: ({ seriesContainerPosition$, seriesLabels$, separateSeries$ }: {
|
23
|
-
seriesContainerPosition$: Observable<
|
23
|
+
seriesContainerPosition$: Observable<ContainerPosition[]>;
|
24
24
|
seriesLabels$: Observable<string[]>;
|
25
25
|
separateSeries$: Observable<boolean>;
|
26
|
-
}) => Observable<Map<string,
|
26
|
+
}) => Observable<Map<string, ContainerPosition>>;
|
@@ -1,13 +1,10 @@
|
|
1
1
|
import { Observable } from 'rxjs';
|
2
|
-
import { ComputedDataTree
|
2
|
+
import { ComputedDataTree } from '../../lib/core-types';
|
3
3
|
|
4
4
|
export declare const nodeListObservable: ({ computedData$ }: {
|
5
5
|
computedData$: Observable<ComputedDataTree>;
|
6
6
|
}) => Observable<ComputedDataTree[]>;
|
7
|
-
export declare const
|
8
|
-
nodeList$: Observable<ComputedDataTree[]>;
|
9
|
-
fullDataFormatter$: Observable<DataFormatterTree>;
|
10
|
-
}) => Observable<string[]>;
|
7
|
+
export declare const categoryLabelsObservable: (CategoryDataMap$: Observable<Map<string, ComputedDataTree[]>>) => Observable<string[]>;
|
11
8
|
export declare const treeVisibleComputedDataObservable: ({ computedData$ }: {
|
12
9
|
computedData$: Observable<ComputedDataTree>;
|
13
10
|
}) => Observable<ComputedDataTree>;
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@orbcharts/core",
|
3
|
-
"version": "3.0.0-beta.
|
3
|
+
"version": "3.0.0-beta.5",
|
4
4
|
"description": "OrbCharts is an open source chart library based on d3.js and rx.js",
|
5
5
|
"author": "Blue Planet Inc.",
|
6
6
|
"license": "Apache-2.0",
|
@@ -35,7 +35,7 @@
|
|
35
35
|
"vite-plugin-dts": "^3.7.3"
|
36
36
|
},
|
37
37
|
"dependencies": {
|
38
|
-
"@orbcharts/core-types": "^3.0.0-beta.
|
38
|
+
"@orbcharts/core-types": "^3.0.0-beta.4",
|
39
39
|
"d3": "^7.8.5",
|
40
40
|
"rxjs": "^7.8.1"
|
41
41
|
}
|
package/src/defaults.ts
CHANGED
@@ -201,9 +201,12 @@ export const DATA_FORMATTER_MULTI_VALUE_DEFAULT: DataFormatterMultiValue = {
|
|
201
201
|
type: 'multiValue',
|
202
202
|
visibleFilter: (datum, context) => true,
|
203
203
|
categoryLabels: [],
|
204
|
-
multiValue: [],
|
205
204
|
xAxis: { ...DATA_FORMATTER_VALUE_AXIS_DEFAULT },
|
206
205
|
yAxis: { ...DATA_FORMATTER_VALUE_AXIS_DEFAULT },
|
206
|
+
container: {
|
207
|
+
...DATA_FORMATTER_CONTAINER_DEFAULT
|
208
|
+
},
|
209
|
+
separateCategory: false
|
207
210
|
}
|
208
211
|
DATA_FORMATTER_MULTI_VALUE_DEFAULT.visibleFilter.toString = () => `(datum, context) => true`
|
209
212
|
|
@@ -7,17 +7,20 @@ import {
|
|
7
7
|
textSizePxObservable } from '../utils/observables'
|
8
8
|
import {
|
9
9
|
gridComputedLayoutDataObservable,
|
10
|
-
gridAxesTransformObservable,
|
11
|
-
gridAxesReverseTransformObservable,
|
12
|
-
gridGraphicTransformObservable,
|
13
|
-
gridGraphicReverseScaleObservable,
|
14
10
|
gridAxesSizeObservable,
|
15
11
|
gridSeriesLabelsObservable,
|
16
12
|
gridVisibleComputedDataObservable,
|
17
13
|
gridVisibleComputedLayoutDataObservable,
|
18
14
|
// isSeriesSeprateObservable,
|
19
15
|
gridContainerPositionObservable,
|
20
|
-
computedStackedDataObservables
|
16
|
+
computedStackedDataObservables,
|
17
|
+
groupScaleDomainValueObservable,
|
18
|
+
filteredMinMaxValueObservable,
|
19
|
+
gridAxesTransformObservable,
|
20
|
+
gridAxesReverseTransformObservable,
|
21
|
+
gridGraphicTransformObservable,
|
22
|
+
gridGraphicReverseScaleObservable,
|
23
|
+
} from '../utils/gridObservables'
|
21
24
|
|
22
25
|
export const contextObserverCallback: ContextObserverCallback<'grid'> = ({ subject, observer }) => {
|
23
26
|
|
@@ -37,33 +40,6 @@ export const contextObserverCallback: ContextObserverCallback<'grid'> = ({ subje
|
|
37
40
|
layout$: observer.layout$,
|
38
41
|
})
|
39
42
|
|
40
|
-
const gridAxesTransform$ = gridAxesTransformObservable({
|
41
|
-
fullDataFormatter$: observer.fullDataFormatter$,
|
42
|
-
layout$: observer.layout$
|
43
|
-
}).pipe(
|
44
|
-
shareReplay(1)
|
45
|
-
)
|
46
|
-
|
47
|
-
const gridAxesReverseTransform$ = gridAxesReverseTransformObservable({
|
48
|
-
gridAxesTransform$
|
49
|
-
}).pipe(
|
50
|
-
shareReplay(1)
|
51
|
-
)
|
52
|
-
|
53
|
-
const gridGraphicTransform$ = gridGraphicTransformObservable({
|
54
|
-
computedData$: observer.computedData$,
|
55
|
-
fullDataFormatter$: observer.fullDataFormatter$,
|
56
|
-
layout$: observer.layout$
|
57
|
-
}).pipe(
|
58
|
-
shareReplay(1)
|
59
|
-
)
|
60
|
-
|
61
|
-
const gridGraphicReverseScale$ = gridGraphicReverseScaleObservable({
|
62
|
-
gridContainerPosition$: gridContainerPosition$,
|
63
|
-
gridAxesTransform$: gridAxesTransform$,
|
64
|
-
gridGraphicTransform$: gridGraphicTransform$,
|
65
|
-
})
|
66
|
-
|
67
43
|
const gridAxesSize$ = gridAxesSizeObservable({
|
68
44
|
fullDataFormatter$: observer.fullDataFormatter$,
|
69
45
|
layout$: observer.layout$
|
@@ -128,6 +104,49 @@ export const contextObserverCallback: ContextObserverCallback<'grid'> = ({ subje
|
|
128
104
|
shareReplay(1)
|
129
105
|
)
|
130
106
|
|
107
|
+
const groupScaleDomainValue$ = groupScaleDomainValueObservable({
|
108
|
+
computedData$: observer.computedData$,
|
109
|
+
fullDataFormatter$: observer.fullDataFormatter$,
|
110
|
+
}).pipe(
|
111
|
+
shareReplay(1)
|
112
|
+
)
|
113
|
+
|
114
|
+
const filteredMinMaxValue$ = filteredMinMaxValueObservable({
|
115
|
+
computedData$: observer.computedData$,
|
116
|
+
groupScaleDomainValue$: groupScaleDomainValue$,
|
117
|
+
}).pipe(
|
118
|
+
shareReplay(1)
|
119
|
+
)
|
120
|
+
|
121
|
+
const gridAxesTransform$ = gridAxesTransformObservable({
|
122
|
+
fullDataFormatter$: observer.fullDataFormatter$,
|
123
|
+
layout$: observer.layout$
|
124
|
+
}).pipe(
|
125
|
+
shareReplay(1)
|
126
|
+
)
|
127
|
+
|
128
|
+
const gridAxesReverseTransform$ = gridAxesReverseTransformObservable({
|
129
|
+
gridAxesTransform$
|
130
|
+
}).pipe(
|
131
|
+
shareReplay(1)
|
132
|
+
)
|
133
|
+
|
134
|
+
const gridGraphicTransform$ = gridGraphicTransformObservable({
|
135
|
+
computedData$: observer.computedData$,
|
136
|
+
groupScaleDomainValue$: groupScaleDomainValue$,
|
137
|
+
filteredMinMaxValue$: filteredMinMaxValue$,
|
138
|
+
fullDataFormatter$: observer.fullDataFormatter$,
|
139
|
+
layout$: observer.layout$
|
140
|
+
}).pipe(
|
141
|
+
shareReplay(1)
|
142
|
+
)
|
143
|
+
|
144
|
+
const gridGraphicReverseScale$ = gridGraphicReverseScaleObservable({
|
145
|
+
gridContainerPosition$: gridContainerPosition$,
|
146
|
+
gridAxesTransform$: gridAxesTransform$,
|
147
|
+
gridGraphicTransform$: gridGraphicTransform$,
|
148
|
+
})
|
149
|
+
|
131
150
|
|
132
151
|
return {
|
133
152
|
fullParams$: observer.fullParams$,
|
@@ -138,10 +157,6 @@ export const contextObserverCallback: ContextObserverCallback<'grid'> = ({ subje
|
|
138
157
|
textSizePx$,
|
139
158
|
isSeriesSeprate$,
|
140
159
|
gridContainerPosition$,
|
141
|
-
gridAxesTransform$,
|
142
|
-
gridAxesReverseTransform$,
|
143
|
-
gridGraphicTransform$,
|
144
|
-
gridGraphicReverseScale$,
|
145
160
|
gridAxesSize$,
|
146
161
|
gridHighlight$,
|
147
162
|
seriesLabels$,
|
@@ -151,5 +166,11 @@ export const contextObserverCallback: ContextObserverCallback<'grid'> = ({ subje
|
|
151
166
|
visibleComputedData$,
|
152
167
|
visibleComputedLayoutData$,
|
153
168
|
computedStackedData$,
|
169
|
+
groupScaleDomainValue$,
|
170
|
+
filteredMinMaxValue$,
|
171
|
+
gridAxesTransform$,
|
172
|
+
gridAxesReverseTransform$,
|
173
|
+
gridGraphicTransform$,
|
174
|
+
gridGraphicReverseScale$,
|
154
175
|
}
|
155
176
|
}
|