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

Sign up to get free protection for your applications and to get access to all the features.
Files changed (100) hide show
  1. package/LICENSE +200 -200
  2. package/dist/orbcharts-core.es.js +1905 -1896
  3. package/dist/orbcharts-core.umd.js +2 -2
  4. package/dist/src/defaults.d.ts +4 -3
  5. package/dist/src/grid/computeGridData.d.ts +4 -11
  6. package/dist/src/grid/gridObservables.d.ts +15 -18
  7. package/dist/src/multiGrid/multiGridObservables.d.ts +4 -11
  8. package/dist/src/series/seriesObservables.d.ts +26 -1
  9. package/dist/src/types/ComputedData.d.ts +1 -0
  10. package/dist/src/types/ComputedDataGrid.d.ts +0 -3
  11. package/dist/src/types/ComputedDataSeries.d.ts +1 -2
  12. package/dist/src/types/ContextObserverGrid.d.ts +11 -4
  13. package/dist/src/types/ContextObserverMultiGrid.d.ts +8 -3
  14. package/dist/src/types/ContextObserverSeries.d.ts +18 -0
  15. package/dist/src/types/DataFormatter.d.ts +8 -5
  16. package/dist/src/types/DataFormatterGrid.d.ts +13 -16
  17. package/dist/src/types/DataFormatterMultiGrid.d.ts +6 -3
  18. package/dist/src/types/DataFormatterMultiValue.d.ts +3 -0
  19. package/dist/src/types/DataFormatterRelationship.d.ts +3 -0
  20. package/dist/src/types/DataFormatterSeries.d.ts +10 -3
  21. package/dist/src/utils/orbchartsUtils.d.ts +14 -13
  22. package/package.json +41 -41
  23. package/src/AbstractChart.ts +48 -48
  24. package/src/GridChart.ts +20 -20
  25. package/src/MultiGridChart.ts +20 -20
  26. package/src/MultiValueChart.ts +20 -20
  27. package/src/RelationshipChart.ts +20 -20
  28. package/src/SeriesChart.ts +20 -20
  29. package/src/TreeChart.ts +20 -20
  30. package/src/base/createBaseChart.ts +367 -367
  31. package/src/base/createBasePlugin.ts +89 -89
  32. package/src/defaults.ts +220 -248
  33. package/src/defineGridPlugin.ts +3 -3
  34. package/src/defineMultiGridPlugin.ts +3 -3
  35. package/src/defineMultiValuePlugin.ts +3 -3
  36. package/src/defineNoneDataPlugin.ts +4 -4
  37. package/src/defineRelationshipPlugin.ts +3 -3
  38. package/src/defineSeriesPlugin.ts +3 -3
  39. package/src/defineTreePlugin.ts +3 -3
  40. package/src/grid/computeGridData.ts +134 -205
  41. package/src/grid/createGridContextObserver.ts +147 -130
  42. package/src/grid/gridObservables.ts +573 -486
  43. package/src/index.ts +21 -21
  44. package/src/multiGrid/computeMultiGridData.ts +130 -173
  45. package/src/multiGrid/createMultiGridContextObserver.ts +40 -40
  46. package/src/multiGrid/multiGridObservables.ts +350 -285
  47. package/src/multiValue/computeMultiValueData.ts +143 -136
  48. package/src/multiValue/createMultiValueContextObserver.ts +12 -12
  49. package/src/relationship/computeRelationshipData.ts +118 -106
  50. package/src/relationship/createRelationshipContextObserver.ts +12 -12
  51. package/src/series/computeSeriesData.ts +90 -153
  52. package/src/series/createSeriesContextObserver.ts +93 -38
  53. package/src/series/seriesObservables.ts +176 -24
  54. package/src/tree/computeTreeData.ts +131 -128
  55. package/src/tree/createTreeContextObserver.ts +61 -61
  56. package/src/tree/treeObservables.ts +94 -94
  57. package/src/types/Chart.ts +48 -48
  58. package/src/types/ChartParams.ts +51 -51
  59. package/src/types/ComputedData.ts +83 -82
  60. package/src/types/ComputedDataGrid.ts +13 -13
  61. package/src/types/ComputedDataMultiGrid.ts +2 -2
  62. package/src/types/ComputedDataMultiValue.ts +9 -9
  63. package/src/types/ComputedDataRelationship.ts +19 -19
  64. package/src/types/ComputedDataSeries.ts +8 -8
  65. package/src/types/ComputedDataTree.ts +19 -19
  66. package/src/types/ContextObserver.ts +38 -38
  67. package/src/types/ContextObserverGrid.ts +41 -33
  68. package/src/types/ContextObserverMultiGrid.ts +16 -28
  69. package/src/types/ContextObserverMultiValue.ts +4 -4
  70. package/src/types/ContextObserverRelationship.ts +4 -4
  71. package/src/types/ContextObserverSeries.ts +29 -9
  72. package/src/types/ContextObserverTree.ts +11 -11
  73. package/src/types/ContextSubject.ts +18 -18
  74. package/src/types/Data.ts +45 -45
  75. package/src/types/DataFormatter.ts +74 -95
  76. package/src/types/DataFormatterGrid.ts +67 -55
  77. package/src/types/DataFormatterMultiGrid.ts +44 -42
  78. package/src/types/DataFormatterMultiValue.ts +23 -20
  79. package/src/types/DataFormatterRelationship.ts +25 -22
  80. package/src/types/DataFormatterSeries.ts +20 -30
  81. package/src/types/DataFormatterTree.ts +12 -12
  82. package/src/types/DataGrid.ts +11 -11
  83. package/src/types/DataMultiGrid.ts +6 -6
  84. package/src/types/DataMultiValue.ts +12 -12
  85. package/src/types/DataRelationship.ts +27 -27
  86. package/src/types/DataSeries.ts +11 -11
  87. package/src/types/DataTree.ts +20 -20
  88. package/src/types/Event.ts +153 -153
  89. package/src/types/Layout.ts +11 -11
  90. package/src/types/Padding.ts +5 -5
  91. package/src/types/Plugin.ts +60 -60
  92. package/src/types/TransformData.ts +7 -7
  93. package/src/types/index.ts +37 -37
  94. package/src/utils/commonUtils.ts +50 -50
  95. package/src/utils/d3Utils.ts +89 -89
  96. package/src/utils/index.ts +4 -4
  97. package/src/utils/observables.ts +201 -201
  98. package/src/utils/orbchartsUtils.ts +349 -253
  99. package/tsconfig.json +13 -13
  100. package/vite.config.js +44 -44
package/src/GridChart.ts CHANGED
@@ -1,21 +1,21 @@
1
- import type {
2
- ChartEntity,
3
- ChartOptionsPartial } from './types'
4
- import { DATA_FORMATTER_GRID_DEFAULT } from './defaults'
5
- import { computeGridData } from './grid/computeGridData'
6
- import { createGridContextObserver } from './grid/createGridContextObserver'
7
- import { AbstractChart } from './AbstractChart'
8
-
9
- export class GridChart extends AbstractChart<'grid'> implements ChartEntity<'grid'> {
10
- constructor (element: HTMLElement | Element, options?: ChartOptionsPartial<'grid'>) {
11
- super(
12
- {
13
- defaultDataFormatter: DATA_FORMATTER_GRID_DEFAULT,
14
- computedDataFn: computeGridData,
15
- contextObserverFn: createGridContextObserver
16
- },
17
- element,
18
- options
19
- )
20
- }
1
+ import type {
2
+ ChartEntity,
3
+ ChartOptionsPartial } from './types'
4
+ import { DATA_FORMATTER_GRID_DEFAULT } from './defaults'
5
+ import { computeGridData } from './grid/computeGridData'
6
+ import { createGridContextObserver } from './grid/createGridContextObserver'
7
+ import { AbstractChart } from './AbstractChart'
8
+
9
+ export class GridChart extends AbstractChart<'grid'> implements ChartEntity<'grid'> {
10
+ constructor (element: HTMLElement | Element, options?: ChartOptionsPartial<'grid'>) {
11
+ super(
12
+ {
13
+ defaultDataFormatter: DATA_FORMATTER_GRID_DEFAULT,
14
+ computedDataFn: computeGridData,
15
+ contextObserverFn: createGridContextObserver
16
+ },
17
+ element,
18
+ options
19
+ )
20
+ }
21
21
  }
@@ -1,21 +1,21 @@
1
- import type {
2
- ChartEntity,
3
- ChartOptionsPartial } from './types'
4
- import { DATA_FORMATTER_MULTI_GRID_DEFAULT } from './defaults'
5
- import { computeMultiGridData } from './multiGrid/computeMultiGridData'
6
- import { createMultiGridContextObserver } from './multiGrid/createMultiGridContextObserver'
7
- import { AbstractChart } from './AbstractChart'
8
-
9
- export class MultiGridChart extends AbstractChart<'multiGrid'> implements ChartEntity<'multiGrid'> {
10
- constructor (element: HTMLElement | Element, options?: ChartOptionsPartial<'multiGrid'>) {
11
- super(
12
- {
13
- defaultDataFormatter: DATA_FORMATTER_MULTI_GRID_DEFAULT,
14
- computedDataFn: computeMultiGridData,
15
- contextObserverFn: createMultiGridContextObserver
16
- },
17
- element,
18
- options
19
- )
20
- }
1
+ import type {
2
+ ChartEntity,
3
+ ChartOptionsPartial } from './types'
4
+ import { DATA_FORMATTER_MULTI_GRID_DEFAULT } from './defaults'
5
+ import { computeMultiGridData } from './multiGrid/computeMultiGridData'
6
+ import { createMultiGridContextObserver } from './multiGrid/createMultiGridContextObserver'
7
+ import { AbstractChart } from './AbstractChart'
8
+
9
+ export class MultiGridChart extends AbstractChart<'multiGrid'> implements ChartEntity<'multiGrid'> {
10
+ constructor (element: HTMLElement | Element, options?: ChartOptionsPartial<'multiGrid'>) {
11
+ super(
12
+ {
13
+ defaultDataFormatter: DATA_FORMATTER_MULTI_GRID_DEFAULT,
14
+ computedDataFn: computeMultiGridData,
15
+ contextObserverFn: createMultiGridContextObserver
16
+ },
17
+ element,
18
+ options
19
+ )
20
+ }
21
21
  }
@@ -1,21 +1,21 @@
1
- import type {
2
- ChartEntity,
3
- ChartOptionsPartial } from './types'
4
- import { DATA_FORMATTER_MULTI_VALUE_DEFAULT } from './defaults'
5
- import { computeMultiValueData } from './multiValue/computeMultiValueData'
6
- import { createMultiValueContextObserver } from './multiValue/createMultiValueContextObserver'
7
- import { AbstractChart } from './AbstractChart'
8
-
9
- export class MultiValueChart extends AbstractChart<'multiValue'> implements ChartEntity<'multiValue'> {
10
- constructor (element: HTMLElement | Element, options?: ChartOptionsPartial<'multiValue'>) {
11
- super(
12
- {
13
- defaultDataFormatter: DATA_FORMATTER_MULTI_VALUE_DEFAULT,
14
- computedDataFn: computeMultiValueData,
15
- contextObserverFn: createMultiValueContextObserver
16
- },
17
- element,
18
- options
19
- )
20
- }
1
+ import type {
2
+ ChartEntity,
3
+ ChartOptionsPartial } from './types'
4
+ import { DATA_FORMATTER_MULTI_VALUE_DEFAULT } from './defaults'
5
+ import { computeMultiValueData } from './multiValue/computeMultiValueData'
6
+ import { createMultiValueContextObserver } from './multiValue/createMultiValueContextObserver'
7
+ import { AbstractChart } from './AbstractChart'
8
+
9
+ export class MultiValueChart extends AbstractChart<'multiValue'> implements ChartEntity<'multiValue'> {
10
+ constructor (element: HTMLElement | Element, options?: ChartOptionsPartial<'multiValue'>) {
11
+ super(
12
+ {
13
+ defaultDataFormatter: DATA_FORMATTER_MULTI_VALUE_DEFAULT,
14
+ computedDataFn: computeMultiValueData,
15
+ contextObserverFn: createMultiValueContextObserver
16
+ },
17
+ element,
18
+ options
19
+ )
20
+ }
21
21
  }
@@ -1,21 +1,21 @@
1
- import type {
2
- ChartEntity,
3
- ChartOptionsPartial } from './types'
4
- import { DATA_FORMATTER_RELATIONAL_DEFAULT} from './defaults'
5
- import { computeRelationshipData } from './relationship/computeRelationshipData'
6
- import { createRelationshipContextObserver } from './relationship/createRelationshipContextObserver'
7
- import { AbstractChart } from './AbstractChart'
8
-
9
- export class RelationshipChart extends AbstractChart<'relationship'> implements ChartEntity<'relationship'> {
10
- constructor (element: HTMLElement | Element, options?: ChartOptionsPartial<'relationship'>) {
11
- super(
12
- {
13
- defaultDataFormatter: DATA_FORMATTER_RELATIONAL_DEFAULT,
14
- computedDataFn: computeRelationshipData,
15
- contextObserverFn: createRelationshipContextObserver
16
- },
17
- element,
18
- options
19
- )
20
- }
1
+ import type {
2
+ ChartEntity,
3
+ ChartOptionsPartial } from './types'
4
+ import { DATA_FORMATTER_RELATIONAL_DEFAULT} from './defaults'
5
+ import { computeRelationshipData } from './relationship/computeRelationshipData'
6
+ import { createRelationshipContextObserver } from './relationship/createRelationshipContextObserver'
7
+ import { AbstractChart } from './AbstractChart'
8
+
9
+ export class RelationshipChart extends AbstractChart<'relationship'> implements ChartEntity<'relationship'> {
10
+ constructor (element: HTMLElement | Element, options?: ChartOptionsPartial<'relationship'>) {
11
+ super(
12
+ {
13
+ defaultDataFormatter: DATA_FORMATTER_RELATIONAL_DEFAULT,
14
+ computedDataFn: computeRelationshipData,
15
+ contextObserverFn: createRelationshipContextObserver
16
+ },
17
+ element,
18
+ options
19
+ )
20
+ }
21
21
  }
@@ -1,21 +1,21 @@
1
- import type {
2
- ChartEntity,
3
- ChartOptionsPartial } from './types'
4
- import { DATA_FORMATTER_SERIES_DEFAULT } from './defaults'
5
- import { computeSeriesData } from './series/computeSeriesData'
6
- import { createSeriesContextObserver } from './series/createSeriesContextObserver'
7
- import { AbstractChart } from './AbstractChart'
8
-
9
- export class SeriesChart extends AbstractChart<'series'> implements ChartEntity<'series'> {
10
- constructor (element: HTMLElement | Element, options?: ChartOptionsPartial<'series'>) {
11
- super(
12
- {
13
- defaultDataFormatter: DATA_FORMATTER_SERIES_DEFAULT,
14
- computedDataFn: computeSeriesData,
15
- contextObserverFn: createSeriesContextObserver
16
- },
17
- element,
18
- options
19
- )
20
- }
1
+ import type {
2
+ ChartEntity,
3
+ ChartOptionsPartial } from './types'
4
+ import { DATA_FORMATTER_SERIES_DEFAULT } from './defaults'
5
+ import { computeSeriesData } from './series/computeSeriesData'
6
+ import { createSeriesContextObserver } from './series/createSeriesContextObserver'
7
+ import { AbstractChart } from './AbstractChart'
8
+
9
+ export class SeriesChart extends AbstractChart<'series'> implements ChartEntity<'series'> {
10
+ constructor (element: HTMLElement | Element, options?: ChartOptionsPartial<'series'>) {
11
+ super(
12
+ {
13
+ defaultDataFormatter: DATA_FORMATTER_SERIES_DEFAULT,
14
+ computedDataFn: computeSeriesData,
15
+ contextObserverFn: createSeriesContextObserver
16
+ },
17
+ element,
18
+ options
19
+ )
20
+ }
21
21
  }
package/src/TreeChart.ts CHANGED
@@ -1,21 +1,21 @@
1
- import type {
2
- ChartEntity,
3
- ChartOptionsPartial } from './types'
4
- import { DATA_FORMATTER_TREE_DEFAULT } from './defaults'
5
- import { computeTreeData } from './tree/computeTreeData'
6
- import { createTreeContextObserver } from './tree/createTreeContextObserver'
7
- import { AbstractChart } from './AbstractChart'
8
-
9
- export class TreeChart extends AbstractChart<'tree'> implements ChartEntity<'tree'> {
10
- constructor (element: HTMLElement | Element, options?: ChartOptionsPartial<'tree'>) {
11
- super(
12
- {
13
- defaultDataFormatter: DATA_FORMATTER_TREE_DEFAULT,
14
- computedDataFn: computeTreeData,
15
- contextObserverFn: createTreeContextObserver
16
- },
17
- element,
18
- options
19
- )
20
- }
1
+ import type {
2
+ ChartEntity,
3
+ ChartOptionsPartial } from './types'
4
+ import { DATA_FORMATTER_TREE_DEFAULT } from './defaults'
5
+ import { computeTreeData } from './tree/computeTreeData'
6
+ import { createTreeContextObserver } from './tree/createTreeContextObserver'
7
+ import { AbstractChart } from './AbstractChart'
8
+
9
+ export class TreeChart extends AbstractChart<'tree'> implements ChartEntity<'tree'> {
10
+ constructor (element: HTMLElement | Element, options?: ChartOptionsPartial<'tree'>) {
11
+ super(
12
+ {
13
+ defaultDataFormatter: DATA_FORMATTER_TREE_DEFAULT,
14
+ computedDataFn: computeTreeData,
15
+ contextObserverFn: createTreeContextObserver
16
+ },
17
+ element,
18
+ options
19
+ )
20
+ }
21
21
  }