@orbcharts/core 3.0.0-alpha.53 → 3.0.0-alpha.55

Sign up to get free protection for your applications and to get access to all the features.
Files changed (83) hide show
  1. package/LICENSE +200 -200
  2. package/dist/orbcharts-core.es.js +290 -288
  3. package/dist/orbcharts-core.umd.js +1 -1
  4. package/package.json +41 -41
  5. package/src/AbstractChart.ts +48 -48
  6. package/src/GridChart.ts +20 -20
  7. package/src/MultiGridChart.ts +20 -20
  8. package/src/MultiValueChart.ts +20 -20
  9. package/src/RelationshipChart.ts +20 -20
  10. package/src/SeriesChart.ts +20 -20
  11. package/src/TreeChart.ts +20 -20
  12. package/src/base/createBaseChart.ts +369 -369
  13. package/src/base/createBasePlugin.ts +95 -95
  14. package/src/defaults.ts +226 -226
  15. package/src/defineGridPlugin.ts +3 -3
  16. package/src/defineMultiGridPlugin.ts +3 -3
  17. package/src/defineMultiValuePlugin.ts +3 -3
  18. package/src/defineNoneDataPlugin.ts +4 -4
  19. package/src/defineRelationshipPlugin.ts +3 -3
  20. package/src/defineSeriesPlugin.ts +3 -3
  21. package/src/defineTreePlugin.ts +3 -3
  22. package/src/grid/computeGridData.ts +134 -134
  23. package/src/grid/createGridContextObserver.ts +155 -155
  24. package/src/grid/gridObservables.ts +607 -607
  25. package/src/index.ts +21 -21
  26. package/src/multiGrid/computeMultiGridData.ts +130 -130
  27. package/src/multiGrid/createMultiGridContextObserver.ts +41 -41
  28. package/src/multiGrid/multiGridObservables.ts +365 -365
  29. package/src/multiValue/computeMultiValueData.ts +143 -143
  30. package/src/multiValue/createMultiValueContextObserver.ts +12 -12
  31. package/src/relationship/computeRelationshipData.ts +118 -118
  32. package/src/relationship/createRelationshipContextObserver.ts +12 -12
  33. package/src/series/computeSeriesData.ts +90 -90
  34. package/src/series/createSeriesContextObserver.ts +93 -93
  35. package/src/series/seriesObservables.ts +175 -175
  36. package/src/tree/computeTreeData.ts +132 -132
  37. package/src/tree/createTreeContextObserver.ts +61 -61
  38. package/src/tree/treeObservables.ts +94 -94
  39. package/src/types/Chart.ts +50 -50
  40. package/src/types/ChartParams.ts +51 -51
  41. package/src/types/ComputedData.ts +83 -83
  42. package/src/types/ComputedDataGrid.ts +13 -13
  43. package/src/types/ComputedDataMultiGrid.ts +2 -2
  44. package/src/types/ComputedDataMultiValue.ts +9 -9
  45. package/src/types/ComputedDataRelationship.ts +19 -19
  46. package/src/types/ComputedDataSeries.ts +7 -7
  47. package/src/types/ComputedDataTree.ts +19 -19
  48. package/src/types/ContextObserver.ts +38 -38
  49. package/src/types/ContextObserverGrid.ts +42 -42
  50. package/src/types/ContextObserverMultiGrid.ts +16 -16
  51. package/src/types/ContextObserverMultiValue.ts +4 -4
  52. package/src/types/ContextObserverRelationship.ts +4 -4
  53. package/src/types/ContextObserverSeries.ts +29 -29
  54. package/src/types/ContextObserverTree.ts +11 -11
  55. package/src/types/ContextSubject.ts +18 -18
  56. package/src/types/Data.ts +45 -45
  57. package/src/types/DataFormatter.ts +74 -74
  58. package/src/types/DataFormatterGrid.ts +67 -67
  59. package/src/types/DataFormatterMultiGrid.ts +44 -44
  60. package/src/types/DataFormatterMultiValue.ts +23 -23
  61. package/src/types/DataFormatterRelationship.ts +25 -25
  62. package/src/types/DataFormatterSeries.ts +20 -20
  63. package/src/types/DataFormatterTree.ts +12 -12
  64. package/src/types/DataGrid.ts +11 -11
  65. package/src/types/DataMultiGrid.ts +6 -6
  66. package/src/types/DataMultiValue.ts +12 -12
  67. package/src/types/DataRelationship.ts +27 -27
  68. package/src/types/DataSeries.ts +11 -11
  69. package/src/types/DataTree.ts +20 -20
  70. package/src/types/Event.ts +153 -153
  71. package/src/types/Layout.ts +11 -11
  72. package/src/types/Padding.ts +5 -5
  73. package/src/types/Plugin.ts +60 -60
  74. package/src/types/TransformData.ts +7 -7
  75. package/src/types/index.ts +37 -37
  76. package/src/utils/commonUtils.ts +50 -50
  77. package/src/utils/d3Utils.ts +92 -89
  78. package/src/utils/index.ts +4 -4
  79. package/src/utils/observables.ts +201 -201
  80. package/src/utils/orbchartsUtils.ts +349 -349
  81. package/tsconfig.base.json +14 -0
  82. package/tsconfig.json +2 -13
  83. package/vite.config.js +22 -22
@@ -1,84 +1,84 @@
1
- import type { ChartType } from './Chart'
2
- import type { ComputedDataSeries, ComputedDatumSeries } from './ComputedDataSeries'
3
- import type { ComputedDataGrid, ComputedDatumGrid } from './ComputedDataGrid'
4
- import type { ComputedDataMultiGrid } from './ComputedDataMultiGrid'
5
- import type { ComputedDataMultiValue, ComputedDatumMultiValue } from './ComputedDataMultiValue'
6
- import type { ComputedDataRelationship, ComputedNode } from './ComputedDataRelationship'
7
- import type { ComputedDataTree } from './ComputedDataTree'
8
- import type { DataFormatterContext } from './DataFormatter'
9
-
10
- export interface ComputedDataFn<T extends ChartType> {
11
- (dataFormatterContext: DataFormatterContext<T>): ComputedDataTypeMap<T>
12
- }
13
-
14
- // datum - 基本型本
15
- export interface ComputedDatumBase {
16
- id: string
17
- index: number
18
- label: string
19
- value: number | null
20
- visible: boolean
21
- description: string
22
- data: any // 使用者注入的資料
23
- }
24
-
25
- // datum - 單值
26
- // export interface ComputedDatumValue {
27
- // value: number | null
28
- // // valueLabel: string
29
- // }
30
-
31
- // datum - 多值
32
- // export interface ComputedDatumMultiValue {
33
- // value: number[]
34
- // valueLabels: string[]
35
- // }
36
-
37
- // datum - 圖軸
38
- // export interface ComputedDatumWithAxis {
39
- // axisX: number
40
- // axisY: number
41
- // }
42
-
43
- // datum - 序列資料
44
- export interface ComputedDatumSeriesValue {
45
- color: string
46
- seriesIndex: number
47
- seriesLabel: string
48
- seq: number
49
- }
50
-
51
- // datum - 矩陣資料
52
- export interface ComputedDatumGridValue {
53
- gridIndex: number
54
- color: string
55
- seriesIndex: number
56
- seriesLabel: string
57
- groupIndex: number
58
- groupLabel: string
59
- }
60
-
61
- // datum - 類別資料
62
- export interface ComputedDatumCategoryValue {
63
- color: string
64
- categoryIndex: number
65
- categoryLabel: string | null
66
- }
67
-
68
- // 透過類型選擇ComputedData
69
- export type ComputedDataTypeMap<T extends ChartType> = T extends 'series' ? ComputedDataSeries
70
- : T extends 'grid' ? ComputedDataGrid
71
- : T extends 'multiGrid' ? ComputedDataMultiGrid
72
- : T extends 'multiValue' ? ComputedDataMultiValue
73
- : T extends 'relationship' ? ComputedDataRelationship
74
- : T extends 'tree' ? ComputedDataTree
75
- : ComputedDatumBase
76
-
77
- // 透過類型選擇ComputedDatum
78
- export type ComputedDatumTypeMap<T extends ChartType> = T extends 'series' ? ComputedDatumSeries
79
- : T extends 'grid' ? ComputedDatumGrid
80
- : T extends 'multiGrid' ? ComputedDatumGrid
81
- : T extends 'multiValue' ? ComputedDatumMultiValue
82
- : T extends 'relationship' ? ComputedNode
83
- : T extends 'tree' ? ComputedDataTree
1
+ import type { ChartType } from './Chart'
2
+ import type { ComputedDataSeries, ComputedDatumSeries } from './ComputedDataSeries'
3
+ import type { ComputedDataGrid, ComputedDatumGrid } from './ComputedDataGrid'
4
+ import type { ComputedDataMultiGrid } from './ComputedDataMultiGrid'
5
+ import type { ComputedDataMultiValue, ComputedDatumMultiValue } from './ComputedDataMultiValue'
6
+ import type { ComputedDataRelationship, ComputedNode } from './ComputedDataRelationship'
7
+ import type { ComputedDataTree } from './ComputedDataTree'
8
+ import type { DataFormatterContext } from './DataFormatter'
9
+
10
+ export interface ComputedDataFn<T extends ChartType> {
11
+ (dataFormatterContext: DataFormatterContext<T>): ComputedDataTypeMap<T>
12
+ }
13
+
14
+ // datum - 基本型本
15
+ export interface ComputedDatumBase {
16
+ id: string
17
+ index: number
18
+ label: string
19
+ value: number | null
20
+ visible: boolean
21
+ description: string
22
+ data: any // 使用者注入的資料
23
+ }
24
+
25
+ // datum - 單值
26
+ // export interface ComputedDatumValue {
27
+ // value: number | null
28
+ // // valueLabel: string
29
+ // }
30
+
31
+ // datum - 多值
32
+ // export interface ComputedDatumMultiValue {
33
+ // value: number[]
34
+ // valueLabels: string[]
35
+ // }
36
+
37
+ // datum - 圖軸
38
+ // export interface ComputedDatumWithAxis {
39
+ // axisX: number
40
+ // axisY: number
41
+ // }
42
+
43
+ // datum - 序列資料
44
+ export interface ComputedDatumSeriesValue {
45
+ color: string
46
+ seriesIndex: number
47
+ seriesLabel: string
48
+ seq: number
49
+ }
50
+
51
+ // datum - 矩陣資料
52
+ export interface ComputedDatumGridValue {
53
+ gridIndex: number
54
+ color: string
55
+ seriesIndex: number
56
+ seriesLabel: string
57
+ groupIndex: number
58
+ groupLabel: string
59
+ }
60
+
61
+ // datum - 類別資料
62
+ export interface ComputedDatumCategoryValue {
63
+ color: string
64
+ categoryIndex: number
65
+ categoryLabel: string | null
66
+ }
67
+
68
+ // 透過類型選擇ComputedData
69
+ export type ComputedDataTypeMap<T extends ChartType> = T extends 'series' ? ComputedDataSeries
70
+ : T extends 'grid' ? ComputedDataGrid
71
+ : T extends 'multiGrid' ? ComputedDataMultiGrid
72
+ : T extends 'multiValue' ? ComputedDataMultiValue
73
+ : T extends 'relationship' ? ComputedDataRelationship
74
+ : T extends 'tree' ? ComputedDataTree
75
+ : ComputedDatumBase
76
+
77
+ // 透過類型選擇ComputedDatum
78
+ export type ComputedDatumTypeMap<T extends ChartType> = T extends 'series' ? ComputedDatumSeries
79
+ : T extends 'grid' ? ComputedDatumGrid
80
+ : T extends 'multiGrid' ? ComputedDatumGrid
81
+ : T extends 'multiValue' ? ComputedDatumMultiValue
82
+ : T extends 'relationship' ? ComputedNode
83
+ : T extends 'tree' ? ComputedDataTree
84
84
  : unknown
@@ -1,14 +1,14 @@
1
- import { ComputedDatumBase, ComputedDatumGridValue } from './ComputedData'
2
-
3
- export interface ComputedDatumGrid
4
- extends ComputedDatumBase, ComputedDatumGridValue {
5
- // accSeriesIndex: number // 每一個grid累加的seriesIndex
6
- // gridIndex: number
7
- // groupIndex: number
8
- // groupLabel: string
9
- // axisX: number
10
- // axisY: number
11
- // axisYFromZero: number
12
- }
13
-
1
+ import { ComputedDatumBase, ComputedDatumGridValue } from './ComputedData'
2
+
3
+ export interface ComputedDatumGrid
4
+ extends ComputedDatumBase, ComputedDatumGridValue {
5
+ // accSeriesIndex: number // 每一個grid累加的seriesIndex
6
+ // gridIndex: number
7
+ // groupIndex: number
8
+ // groupLabel: string
9
+ // axisX: number
10
+ // axisY: number
11
+ // axisYFromZero: number
12
+ }
13
+
14
14
  export type ComputedDataGrid = ComputedDatumGrid[][]
@@ -1,3 +1,3 @@
1
- import { ComputedDataGrid } from './ComputedDataGrid'
2
-
1
+ import { ComputedDataGrid } from './ComputedDataGrid'
2
+
3
3
  export type ComputedDataMultiGrid = ComputedDataGrid[]
@@ -1,9 +1,9 @@
1
- import type { ComputedDatumBase, ComputedDatumCategoryValue } from './ComputedData'
2
-
3
- export type ComputedDataMultiValue = ComputedDatumMultiValue[][]
4
-
5
- export interface ComputedDatumMultiValue extends ComputedDatumBase, ComputedDatumCategoryValue {
6
- axis: number
7
- }
8
-
9
-
1
+ import type { ComputedDatumBase, ComputedDatumCategoryValue } from './ComputedData'
2
+
3
+ export type ComputedDataMultiValue = ComputedDatumMultiValue[][]
4
+
5
+ export interface ComputedDatumMultiValue extends ComputedDatumBase, ComputedDatumCategoryValue {
6
+ axis: number
7
+ }
8
+
9
+
@@ -1,20 +1,20 @@
1
- import type { ComputedDatumBase, ComputedDatumCategoryValue } from './ComputedData'
2
-
3
- export type ComputedDataRelationship = {
4
- nodes: ComputedNode[]
5
- edges: ComputedEdge[]
6
- }
7
-
8
- export interface ComputedNode extends ComputedDatumBase, ComputedDatumCategoryValue {
9
- startNodes: ComputedNode[]
10
- startNodeIds: string[]
11
- endNodes: ComputedNode[]
12
- endNodeIds: string[]
13
- }
14
-
15
- export interface ComputedEdge extends ComputedDatumBase {
16
- startNode: ComputedNode
17
- startNodeId: string
18
- endNode: ComputedNode
19
- endNodeId: string
1
+ import type { ComputedDatumBase, ComputedDatumCategoryValue } from './ComputedData'
2
+
3
+ export type ComputedDataRelationship = {
4
+ nodes: ComputedNode[]
5
+ edges: ComputedEdge[]
6
+ }
7
+
8
+ export interface ComputedNode extends ComputedDatumBase, ComputedDatumCategoryValue {
9
+ startNodes: ComputedNode[]
10
+ startNodeIds: string[]
11
+ endNodes: ComputedNode[]
12
+ endNodeIds: string[]
13
+ }
14
+
15
+ export interface ComputedEdge extends ComputedDatumBase {
16
+ startNode: ComputedNode
17
+ startNodeId: string
18
+ endNode: ComputedNode
19
+ endNodeId: string
20
20
  }
@@ -1,8 +1,8 @@
1
- import { ComputedDatumBase, ComputedDatumSeriesValue } from './ComputedData'
2
-
3
- export interface ComputedDatumSeries
4
- extends ComputedDatumBase, ComputedDatumSeriesValue {
5
-
6
- }
7
-
1
+ import { ComputedDatumBase, ComputedDatumSeriesValue } from './ComputedData'
2
+
3
+ export interface ComputedDatumSeries
4
+ extends ComputedDatumBase, ComputedDatumSeriesValue {
5
+
6
+ }
7
+
8
8
  export type ComputedDataSeries = ComputedDatumSeries[][]
@@ -1,20 +1,20 @@
1
- import type { ComputedDatumBase, ComputedDatumCategoryValue } from './ComputedData'
2
-
3
- // export type ComputedDataTree = ComputedDataTreeDatum[]
4
-
5
- // export interface ComputedDataTreeDatum extends ComputedDatum {
6
- // // id: string
7
- // children: ComputedDataTreeDatum[]
8
- // childrenIds: string[]
9
- // // ChildrenMap: Map<string, ComputedDataTreeDatum>
10
- // parent: ComputedDataTreeDatum
11
- // parentId: string
12
- // value?: number
13
- // }
14
-
15
- // 樹狀結構
16
- export interface ComputedDataTree extends ComputedDatumBase, ComputedDatumCategoryValue {
17
- level: number
18
- seq: number
19
- children?: ComputedDataTree[]
1
+ import type { ComputedDatumBase, ComputedDatumCategoryValue } from './ComputedData'
2
+
3
+ // export type ComputedDataTree = ComputedDataTreeDatum[]
4
+
5
+ // export interface ComputedDataTreeDatum extends ComputedDatum {
6
+ // // id: string
7
+ // children: ComputedDataTreeDatum[]
8
+ // childrenIds: string[]
9
+ // // ChildrenMap: Map<string, ComputedDataTreeDatum>
10
+ // parent: ComputedDataTreeDatum
11
+ // parentId: string
12
+ // value?: number
13
+ // }
14
+
15
+ // 樹狀結構
16
+ export interface ComputedDataTree extends ComputedDatumBase, ComputedDatumCategoryValue {
17
+ level: number
18
+ seq: number
19
+ children?: ComputedDataTree[]
20
20
  }
@@ -1,38 +1,38 @@
1
- import { Observable, Subject, BehaviorSubject } from 'rxjs'
2
- import type { ChartType } from './Chart'
3
- import type { ChartParams } from './ChartParams'
4
- import type { DataFormatterTypeMap } from './DataFormatter'
5
- import type { ComputedDataTypeMap } from './ComputedData'
6
- import type { Layout } from './Layout'
7
- import type { ContextObserverGrid } from './ContextObserverGrid'
8
- import type { ContextObserverMultiGrid } from './ContextObserverMultiGrid'
9
- import type { ContextObserverMultiValue } from './ContextObserverMultiValue'
10
- import type { ContextObserverRelationship } from './ContextObserverRelationship'
11
- import type { ContextObserverSeries } from './ContextObserverSeries'
12
- import type { ContextObserverTree } from './ContextObserverTree'
13
- import type { ContextSubject } from './ContextSubject'
14
-
15
- export interface ContextObserverFn<T extends ChartType> {
16
- ({ subject, observer }: {
17
- subject: ContextSubject<T>
18
- observer: ContextObserverBase<T, unknown>
19
- }): ContextObserverTypeMap<T, unknown>
20
- }
21
-
22
- // ContextObserver
23
- export type ContextObserverTypeMap<T extends ChartType, PluginParams> = T extends 'series' ? ContextObserverSeries<PluginParams>
24
- : T extends 'grid' ? ContextObserverGrid<PluginParams>
25
- : T extends 'multiGrid' ? ContextObserverMultiGrid<PluginParams>
26
- : T extends 'multiValue' ? ContextObserverMultiValue<PluginParams>
27
- : T extends 'relationship' ? ContextObserverRelationship<PluginParams>
28
- : T extends 'tree' ? ContextObserverTree<PluginParams>
29
- : ContextObserverBase<ChartType, PluginParams>
30
-
31
- export interface ContextObserverBase<T extends ChartType, PluginParams> {
32
- fullParams$: Observable<PluginParams>
33
- fullChartParams$: Observable<ChartParams>
34
- fullDataFormatter$: Observable<DataFormatterTypeMap<T>>
35
- computedData$: Observable<ComputedDataTypeMap<T>>
36
- layout$: Observable<Layout>
37
- }
38
-
1
+ import { Observable, Subject, BehaviorSubject } from 'rxjs'
2
+ import type { ChartType } from './Chart'
3
+ import type { ChartParams } from './ChartParams'
4
+ import type { DataFormatterTypeMap } from './DataFormatter'
5
+ import type { ComputedDataTypeMap } from './ComputedData'
6
+ import type { Layout } from './Layout'
7
+ import type { ContextObserverGrid } from './ContextObserverGrid'
8
+ import type { ContextObserverMultiGrid } from './ContextObserverMultiGrid'
9
+ import type { ContextObserverMultiValue } from './ContextObserverMultiValue'
10
+ import type { ContextObserverRelationship } from './ContextObserverRelationship'
11
+ import type { ContextObserverSeries } from './ContextObserverSeries'
12
+ import type { ContextObserverTree } from './ContextObserverTree'
13
+ import type { ContextSubject } from './ContextSubject'
14
+
15
+ export interface ContextObserverFn<T extends ChartType> {
16
+ ({ subject, observer }: {
17
+ subject: ContextSubject<T>
18
+ observer: ContextObserverBase<T, unknown>
19
+ }): ContextObserverTypeMap<T, unknown>
20
+ }
21
+
22
+ // ContextObserver
23
+ export type ContextObserverTypeMap<T extends ChartType, PluginParams> = T extends 'series' ? ContextObserverSeries<PluginParams>
24
+ : T extends 'grid' ? ContextObserverGrid<PluginParams>
25
+ : T extends 'multiGrid' ? ContextObserverMultiGrid<PluginParams>
26
+ : T extends 'multiValue' ? ContextObserverMultiValue<PluginParams>
27
+ : T extends 'relationship' ? ContextObserverRelationship<PluginParams>
28
+ : T extends 'tree' ? ContextObserverTree<PluginParams>
29
+ : ContextObserverBase<ChartType, PluginParams>
30
+
31
+ export interface ContextObserverBase<T extends ChartType, PluginParams> {
32
+ fullParams$: Observable<PluginParams>
33
+ fullChartParams$: Observable<ChartParams>
34
+ fullDataFormatter$: Observable<DataFormatterTypeMap<T>>
35
+ computedData$: Observable<ComputedDataTypeMap<T>>
36
+ layout$: Observable<Layout>
37
+ }
38
+
@@ -1,43 +1,43 @@
1
- import { Observable } from 'rxjs'
2
- import type { ContextObserverBase } from './ContextObserver'
3
- import type { ComputedDataGrid, ComputedDatumGrid } from './ComputedDataGrid'
4
- import type { TransformData } from './TransformData'
5
-
6
- export interface ContextObserverGrid<PluginParams> extends
7
- ContextObserverBase<'grid', PluginParams>, ContextObserverGridDetail {
8
- textSizePx$: Observable<number>
9
- }
10
-
11
- export interface ContextObserverGridDetail {
12
- isSeriesSeprate$: Observable<boolean>
13
- gridContainerPosition$: Observable<GridContainerPosition[]>
14
- gridAxesTransform$: Observable<TransformData>
15
- gridAxesReverseTransform$: Observable<TransformData>
16
- gridGraphicTransform$: Observable<TransformData>
17
- gridGraphicReverseScale$: Observable<[number, number][]>
18
- gridAxesSize$: Observable<{ width: number; height: number; }>
19
- gridHighlight$: Observable<ComputedDatumGrid[]>
20
- seriesLabels$: Observable<string[]>
21
- SeriesDataMap$: Observable<Map<string, ComputedDatumGrid[]>>
22
- GroupDataMap$: Observable<Map<string, ComputedDatumGrid[]>>
23
- computedLayoutData$: Observable<ComputedLayoutDataGrid>
24
- visibleComputedData$: Observable<ComputedDataGrid>
25
- visibleComputedLayoutData$: Observable<ComputedLayoutDataGrid>
26
- computedStackedData$: Observable<ComputedDataGrid>
27
- }
28
-
29
- export type ComputedLayoutDataGrid = ComputedLayoutDatumGrid[][]
30
-
31
- export interface ComputedLayoutDatumGrid extends ComputedDatumGrid {
32
- axisX: number
33
- axisY: number
34
- axisYFromZero: number
35
- }
36
-
37
- export interface GridContainerPosition {
38
- slotIndex: number
39
- rowIndex: number
40
- columnIndex: number
41
- translate: [number, number]
42
- scale: [number, number]
1
+ import { Observable } from 'rxjs'
2
+ import type { ContextObserverBase } from './ContextObserver'
3
+ import type { ComputedDataGrid, ComputedDatumGrid } from './ComputedDataGrid'
4
+ import type { TransformData } from './TransformData'
5
+
6
+ export interface ContextObserverGrid<PluginParams> extends
7
+ ContextObserverBase<'grid', PluginParams>, ContextObserverGridDetail {
8
+ textSizePx$: Observable<number>
9
+ }
10
+
11
+ export interface ContextObserverGridDetail {
12
+ isSeriesSeprate$: Observable<boolean>
13
+ gridContainerPosition$: Observable<GridContainerPosition[]>
14
+ gridAxesTransform$: Observable<TransformData>
15
+ gridAxesReverseTransform$: Observable<TransformData>
16
+ gridGraphicTransform$: Observable<TransformData>
17
+ gridGraphicReverseScale$: Observable<[number, number][]>
18
+ gridAxesSize$: Observable<{ width: number; height: number; }>
19
+ gridHighlight$: Observable<ComputedDatumGrid[]>
20
+ seriesLabels$: Observable<string[]>
21
+ SeriesDataMap$: Observable<Map<string, ComputedDatumGrid[]>>
22
+ GroupDataMap$: Observable<Map<string, ComputedDatumGrid[]>>
23
+ computedLayoutData$: Observable<ComputedLayoutDataGrid>
24
+ visibleComputedData$: Observable<ComputedDataGrid>
25
+ visibleComputedLayoutData$: Observable<ComputedLayoutDataGrid>
26
+ computedStackedData$: Observable<ComputedDataGrid>
27
+ }
28
+
29
+ export type ComputedLayoutDataGrid = ComputedLayoutDatumGrid[][]
30
+
31
+ export interface ComputedLayoutDatumGrid extends ComputedDatumGrid {
32
+ axisX: number
33
+ axisY: number
34
+ axisYFromZero: number
35
+ }
36
+
37
+ export interface GridContainerPosition {
38
+ slotIndex: number
39
+ rowIndex: number
40
+ columnIndex: number
41
+ translate: [number, number]
42
+ scale: [number, number]
43
43
  }
@@ -1,17 +1,17 @@
1
- import { Observable } from 'rxjs'
2
- import type { ContextObserverBase } from './ContextObserver'
3
- import type { ComputedDataGrid, ComputedDatumGrid } from './ComputedDataGrid'
4
- import type { DataFormatterGrid } from './DataFormatterGrid'
5
- import type { GridContainerPosition, ContextObserverGridDetail } from './ContextObserverGrid'
6
-
7
- export interface ContextObserverMultiGrid<PluginParams> extends ContextObserverBase<'multiGrid', PluginParams> {
8
- textSizePx$: Observable<number>
9
- multiGridContainerPosition$: Observable<GridContainerPosition[][]>
10
- multiGridEachDetail$: Observable<ContextObserverMultiGridDetail[]>
11
- }
12
-
13
-
14
- export interface ContextObserverMultiGridDetail extends ContextObserverGridDetail {
15
- computedData$: Observable<ComputedDataGrid>
16
- dataFormatter$: Observable<DataFormatterGrid>
1
+ import { Observable } from 'rxjs'
2
+ import type { ContextObserverBase } from './ContextObserver'
3
+ import type { ComputedDataGrid, ComputedDatumGrid } from './ComputedDataGrid'
4
+ import type { DataFormatterGrid } from './DataFormatterGrid'
5
+ import type { GridContainerPosition, ContextObserverGridDetail } from './ContextObserverGrid'
6
+
7
+ export interface ContextObserverMultiGrid<PluginParams> extends ContextObserverBase<'multiGrid', PluginParams> {
8
+ textSizePx$: Observable<number>
9
+ multiGridContainerPosition$: Observable<GridContainerPosition[][]>
10
+ multiGridEachDetail$: Observable<ContextObserverMultiGridDetail[]>
11
+ }
12
+
13
+
14
+ export interface ContextObserverMultiGridDetail extends ContextObserverGridDetail {
15
+ computedData$: Observable<ComputedDataGrid>
16
+ dataFormatter$: Observable<DataFormatterGrid>
17
17
  }
@@ -1,5 +1,5 @@
1
- import type { ContextObserverBase } from './ContextObserver'
2
-
3
- export interface ContextObserverMultiValue<PluginParams> extends ContextObserverBase<'multiValue', PluginParams> {
4
-
1
+ import type { ContextObserverBase } from './ContextObserver'
2
+
3
+ export interface ContextObserverMultiValue<PluginParams> extends ContextObserverBase<'multiValue', PluginParams> {
4
+
5
5
  }
@@ -1,5 +1,5 @@
1
- import type { ContextObserverBase } from './ContextObserver'
2
-
3
- export interface ContextObserverRelationship<PluginParams> extends ContextObserverBase<'relationship', PluginParams> {
4
-
1
+ import type { ContextObserverBase } from './ContextObserver'
2
+
3
+ export interface ContextObserverRelationship<PluginParams> extends ContextObserverBase<'relationship', PluginParams> {
4
+
5
5
  }
@@ -1,29 +1,29 @@
1
- import { Observable } from 'rxjs'
2
- import type { ContextObserverBase } from './ContextObserver'
3
- import type { ComputedDatumSeries } from './ComputedDataSeries'
4
-
5
- export interface ContextObserverSeries<PluginParams> extends ContextObserverBase<'series', PluginParams> {
6
- textSizePx$: Observable<number>
7
- separateSeries$: Observable<boolean>
8
- visibleComputedData$: Observable<ComputedDatumSeries[][]>
9
- computedLayoutData$: Observable<ComputedDatumSeries[][]>
10
- visibleComputedLayoutData$: Observable<ComputedDatumSeries[][]>
11
- seriesHighlight$: Observable<ComputedDatumSeries[]>
12
- seriesLabels$: Observable<string[]>
13
- SeriesDataMap$: Observable<Map<string, ComputedDatumSeries[]>>
14
- seriesContainerPosition$: Observable<SeriesContainerPosition[]>
15
- SeriesContainerPositionMap$: Observable<Map<string, SeriesContainerPosition>>
16
- }
17
-
18
- export interface SeriesContainerPosition {
19
- slotIndex: number
20
- rowIndex: number
21
- columnIndex: number
22
- // translate: [number, number]
23
- startX: number
24
- startY: number
25
- centerX: number
26
- centerY: number
27
- width: number
28
- height: number
29
- }
1
+ import { Observable } from 'rxjs'
2
+ import type { ContextObserverBase } from './ContextObserver'
3
+ import type { ComputedDatumSeries } from './ComputedDataSeries'
4
+
5
+ export interface ContextObserverSeries<PluginParams> extends ContextObserverBase<'series', PluginParams> {
6
+ textSizePx$: Observable<number>
7
+ separateSeries$: Observable<boolean>
8
+ visibleComputedData$: Observable<ComputedDatumSeries[][]>
9
+ computedLayoutData$: Observable<ComputedDatumSeries[][]>
10
+ visibleComputedLayoutData$: Observable<ComputedDatumSeries[][]>
11
+ seriesHighlight$: Observable<ComputedDatumSeries[]>
12
+ seriesLabels$: Observable<string[]>
13
+ SeriesDataMap$: Observable<Map<string, ComputedDatumSeries[]>>
14
+ seriesContainerPosition$: Observable<SeriesContainerPosition[]>
15
+ SeriesContainerPositionMap$: Observable<Map<string, SeriesContainerPosition>>
16
+ }
17
+
18
+ export interface SeriesContainerPosition {
19
+ slotIndex: number
20
+ rowIndex: number
21
+ columnIndex: number
22
+ // translate: [number, number]
23
+ startX: number
24
+ startY: number
25
+ centerX: number
26
+ centerY: number
27
+ width: number
28
+ height: number
29
+ }
@@ -1,11 +1,11 @@
1
- import { Observable } from 'rxjs'
2
- import type { ContextObserverBase } from './ContextObserver'
3
- import type { ComputedDataTree } from './ComputedDataTree'
4
-
5
- export interface ContextObserverTree<PluginParams> extends ContextObserverBase<'tree', PluginParams> {
6
- textSizePx$: Observable<number>
7
- treeHighlight$: Observable<ComputedDataTree[]>
8
- existCategoryLabels$: Observable<string[]>
9
- CategoryDataMap$: Observable<Map<string, ComputedDataTree[]>>
10
- visibleComputedData$: Observable<ComputedDataTree>
11
- }
1
+ import { Observable } from 'rxjs'
2
+ import type { ContextObserverBase } from './ContextObserver'
3
+ import type { ComputedDataTree } from './ComputedDataTree'
4
+
5
+ export interface ContextObserverTree<PluginParams> extends ContextObserverBase<'tree', PluginParams> {
6
+ textSizePx$: Observable<number>
7
+ treeHighlight$: Observable<ComputedDataTree[]>
8
+ existCategoryLabels$: Observable<string[]>
9
+ CategoryDataMap$: Observable<Map<string, ComputedDataTree[]>>
10
+ visibleComputedData$: Observable<ComputedDataTree>
11
+ }