@orbcharts/core 3.0.0-alpha.43 → 3.0.0-alpha.44

Sign up to get free protection for your applications and to get access to all the features.
Files changed (85) hide show
  1. package/LICENSE +200 -200
  2. package/dist/orbcharts-core.es.js +5 -5
  3. package/dist/orbcharts-core.umd.js +1 -1
  4. package/dist/src/series/seriesObservables.d.ts +3 -3
  5. package/dist/src/types/ContextObserverSeries.d.ts +1 -1
  6. package/dist/src/types/DataFormatterSeries.d.ts +3 -3
  7. package/package.json +41 -41
  8. package/src/AbstractChart.ts +48 -48
  9. package/src/GridChart.ts +20 -20
  10. package/src/MultiGridChart.ts +20 -20
  11. package/src/MultiValueChart.ts +20 -20
  12. package/src/RelationshipChart.ts +20 -20
  13. package/src/SeriesChart.ts +20 -20
  14. package/src/TreeChart.ts +20 -20
  15. package/src/base/createBaseChart.ts +367 -367
  16. package/src/base/createBasePlugin.ts +89 -89
  17. package/src/defaults.ts +220 -220
  18. package/src/defineGridPlugin.ts +3 -3
  19. package/src/defineMultiGridPlugin.ts +3 -3
  20. package/src/defineMultiValuePlugin.ts +3 -3
  21. package/src/defineNoneDataPlugin.ts +4 -4
  22. package/src/defineRelationshipPlugin.ts +3 -3
  23. package/src/defineSeriesPlugin.ts +3 -3
  24. package/src/defineTreePlugin.ts +3 -3
  25. package/src/grid/computeGridData.ts +134 -134
  26. package/src/grid/createGridContextObserver.ts +147 -147
  27. package/src/grid/gridObservables.ts +573 -573
  28. package/src/index.ts +21 -21
  29. package/src/multiGrid/computeMultiGridData.ts +130 -130
  30. package/src/multiGrid/createMultiGridContextObserver.ts +40 -40
  31. package/src/multiGrid/multiGridObservables.ts +350 -350
  32. package/src/multiValue/computeMultiValueData.ts +143 -143
  33. package/src/multiValue/createMultiValueContextObserver.ts +12 -12
  34. package/src/relationship/computeRelationshipData.ts +118 -118
  35. package/src/relationship/createRelationshipContextObserver.ts +12 -12
  36. package/src/series/computeSeriesData.ts +90 -90
  37. package/src/series/createSeriesContextObserver.ts +93 -93
  38. package/src/series/seriesObservables.ts +175 -175
  39. package/src/tree/computeTreeData.ts +131 -131
  40. package/src/tree/createTreeContextObserver.ts +61 -61
  41. package/src/tree/treeObservables.ts +94 -94
  42. package/src/types/Chart.ts +48 -48
  43. package/src/types/ChartParams.ts +51 -51
  44. package/src/types/ComputedData.ts +83 -83
  45. package/src/types/ComputedDataGrid.ts +13 -13
  46. package/src/types/ComputedDataMultiGrid.ts +2 -2
  47. package/src/types/ComputedDataMultiValue.ts +9 -9
  48. package/src/types/ComputedDataRelationship.ts +19 -19
  49. package/src/types/ComputedDataSeries.ts +7 -7
  50. package/src/types/ComputedDataTree.ts +19 -19
  51. package/src/types/ContextObserver.ts +38 -38
  52. package/src/types/ContextObserverGrid.ts +41 -41
  53. package/src/types/ContextObserverMultiGrid.ts +15 -15
  54. package/src/types/ContextObserverMultiValue.ts +4 -4
  55. package/src/types/ContextObserverRelationship.ts +4 -4
  56. package/src/types/ContextObserverSeries.ts +29 -29
  57. package/src/types/ContextObserverTree.ts +11 -11
  58. package/src/types/ContextSubject.ts +18 -18
  59. package/src/types/Data.ts +45 -45
  60. package/src/types/DataFormatter.ts +74 -74
  61. package/src/types/DataFormatterGrid.ts +67 -67
  62. package/src/types/DataFormatterMultiGrid.ts +44 -44
  63. package/src/types/DataFormatterMultiValue.ts +23 -23
  64. package/src/types/DataFormatterRelationship.ts +25 -25
  65. package/src/types/DataFormatterSeries.ts +20 -20
  66. package/src/types/DataFormatterTree.ts +12 -12
  67. package/src/types/DataGrid.ts +11 -11
  68. package/src/types/DataMultiGrid.ts +6 -6
  69. package/src/types/DataMultiValue.ts +12 -12
  70. package/src/types/DataRelationship.ts +27 -27
  71. package/src/types/DataSeries.ts +11 -11
  72. package/src/types/DataTree.ts +20 -20
  73. package/src/types/Event.ts +153 -153
  74. package/src/types/Layout.ts +11 -11
  75. package/src/types/Padding.ts +5 -5
  76. package/src/types/Plugin.ts +60 -60
  77. package/src/types/TransformData.ts +7 -7
  78. package/src/types/index.ts +37 -37
  79. package/src/utils/commonUtils.ts +50 -50
  80. package/src/utils/d3Utils.ts +89 -89
  81. package/src/utils/index.ts +4 -4
  82. package/src/utils/observables.ts +201 -201
  83. package/src/utils/orbchartsUtils.ts +349 -349
  84. package/tsconfig.json +13 -13
  85. package/vite.config.js +44 -44
@@ -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,42 +1,42 @@
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
- gridContainerPosition$: Observable<GridContainerPosition[]>
13
- gridAxesTransform$: Observable<TransformData>
14
- gridAxesReverseTransform$: Observable<TransformData>
15
- gridGraphicTransform$: Observable<TransformData>
16
- gridGraphicReverseScale$: Observable<[number, number][]>
17
- gridAxesSize$: Observable<{ width: number; height: number; }>
18
- gridHighlight$: Observable<ComputedDatumGrid[]>
19
- seriesLabels$: Observable<string[]>
20
- SeriesDataMap$: Observable<Map<string, ComputedDatumGrid[]>>
21
- GroupDataMap$: Observable<Map<string, ComputedDatumGrid[]>>
22
- computedLayoutData$: Observable<ComputedLayoutDataGrid>
23
- visibleComputedData$: Observable<ComputedDataGrid>
24
- visibleComputedLayoutData$: Observable<ComputedLayoutDataGrid>
25
- // isSeriesSeprate$: Observable<boolean>
26
- }
27
-
28
- export type ComputedLayoutDataGrid = ComputedLayoutDatumGrid[][]
29
-
30
- export interface ComputedLayoutDatumGrid extends ComputedDatumGrid {
31
- axisX: number
32
- axisY: number
33
- axisYFromZero: number
34
- }
35
-
36
- export interface GridContainerPosition {
37
- slotIndex: number
38
- rowIndex: number
39
- columnIndex: number
40
- translate: [number, number]
41
- 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
+ gridContainerPosition$: Observable<GridContainerPosition[]>
13
+ gridAxesTransform$: Observable<TransformData>
14
+ gridAxesReverseTransform$: Observable<TransformData>
15
+ gridGraphicTransform$: Observable<TransformData>
16
+ gridGraphicReverseScale$: Observable<[number, number][]>
17
+ gridAxesSize$: Observable<{ width: number; height: number; }>
18
+ gridHighlight$: Observable<ComputedDatumGrid[]>
19
+ seriesLabels$: Observable<string[]>
20
+ SeriesDataMap$: Observable<Map<string, ComputedDatumGrid[]>>
21
+ GroupDataMap$: Observable<Map<string, ComputedDatumGrid[]>>
22
+ computedLayoutData$: Observable<ComputedLayoutDataGrid>
23
+ visibleComputedData$: Observable<ComputedDataGrid>
24
+ visibleComputedLayoutData$: Observable<ComputedLayoutDataGrid>
25
+ // isSeriesSeprate$: Observable<boolean>
26
+ }
27
+
28
+ export type ComputedLayoutDataGrid = ComputedLayoutDatumGrid[][]
29
+
30
+ export interface ComputedLayoutDatumGrid extends ComputedDatumGrid {
31
+ axisX: number
32
+ axisY: number
33
+ axisYFromZero: number
34
+ }
35
+
36
+ export interface GridContainerPosition {
37
+ slotIndex: number
38
+ rowIndex: number
39
+ columnIndex: number
40
+ translate: [number, number]
41
+ scale: [number, number]
42
42
  }
@@ -1,16 +1,16 @@
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 { ContextObserverGridDetail } from './ContextObserverGrid'
6
-
7
- export interface ContextObserverMultiGrid<PluginParams> extends ContextObserverBase<'multiGrid', PluginParams> {
8
- textSizePx$: Observable<number>
9
- multiGridEachDetail$: Observable<ContextObserverMultiGridDetail[]>
10
- }
11
-
12
-
13
- export interface ContextObserverMultiGridDetail extends ContextObserverGridDetail {
14
- computedData$: Observable<ComputedDataGrid>
15
- 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 { ContextObserverGridDetail } from './ContextObserverGrid'
6
+
7
+ export interface ContextObserverMultiGrid<PluginParams> extends ContextObserverBase<'multiGrid', PluginParams> {
8
+ textSizePx$: Observable<number>
9
+ multiGridEachDetail$: Observable<ContextObserverMultiGridDetail[]>
10
+ }
11
+
12
+
13
+ export interface ContextObserverMultiGridDetail extends ContextObserverGridDetail {
14
+ computedData$: Observable<ComputedDataGrid>
15
+ dataFormatter$: Observable<DataFormatterGrid>
16
16
  }
@@ -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
- seriesSeparate$: 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
+ }