@orbcharts/core 3.0.4 → 3.0.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.
Files changed (69) hide show
  1. package/LICENSE +200 -200
  2. package/dist/orbcharts-core.es.js +1685 -1636
  3. package/dist/orbcharts-core.umd.js +4 -4
  4. package/dist/src/series/seriesObservables.d.ts +18 -7
  5. package/lib/core-types.ts +7 -7
  6. package/package.json +46 -46
  7. package/src/AbstractChart.ts +57 -57
  8. package/src/GridChart.ts +24 -24
  9. package/src/MultiGridChart.ts +24 -24
  10. package/src/MultiValueChart.ts +24 -24
  11. package/src/RelationshipChart.ts +24 -24
  12. package/src/SeriesChart.ts +24 -24
  13. package/src/TreeChart.ts +24 -24
  14. package/src/base/createBaseChart.ts +524 -524
  15. package/src/base/createBasePlugin.ts +154 -154
  16. package/src/base/validators/chartOptionsValidator.ts +23 -23
  17. package/src/base/validators/chartParamsValidator.ts +133 -133
  18. package/src/base/validators/elementValidator.ts +13 -13
  19. package/src/base/validators/pluginsValidator.ts +14 -14
  20. package/src/defaults.ts +284 -283
  21. package/src/defineGridPlugin.ts +3 -3
  22. package/src/defineMultiGridPlugin.ts +3 -3
  23. package/src/defineMultiValuePlugin.ts +3 -3
  24. package/src/defineNoneDataPlugin.ts +4 -4
  25. package/src/defineRelationshipPlugin.ts +3 -3
  26. package/src/defineSeriesPlugin.ts +3 -3
  27. package/src/defineTreePlugin.ts +3 -3
  28. package/src/grid/computedDataFn.ts +129 -129
  29. package/src/grid/contextObserverCallback.ts +201 -201
  30. package/src/grid/dataFormatterValidator.ts +125 -125
  31. package/src/grid/dataValidator.ts +12 -12
  32. package/src/grid/gridObservables.ts +694 -718
  33. package/src/index.ts +20 -20
  34. package/src/multiGrid/computedDataFn.ts +123 -123
  35. package/src/multiGrid/contextObserverCallback.ts +75 -75
  36. package/src/multiGrid/dataFormatterValidator.ts +120 -120
  37. package/src/multiGrid/dataValidator.ts +12 -12
  38. package/src/multiGrid/multiGridObservables.ts +357 -401
  39. package/src/multiValue/computedDataFn.ts +113 -113
  40. package/src/multiValue/contextObserverCallback.ts +328 -328
  41. package/src/multiValue/dataFormatterValidator.ts +94 -94
  42. package/src/multiValue/dataValidator.ts +12 -12
  43. package/src/multiValue/multiValueObservables.ts +865 -1219
  44. package/src/relationship/computedDataFn.ts +159 -159
  45. package/src/relationship/contextObserverCallback.ts +80 -80
  46. package/src/relationship/dataFormatterValidator.ts +13 -13
  47. package/src/relationship/dataValidator.ts +13 -13
  48. package/src/relationship/relationshipObservables.ts +84 -84
  49. package/src/series/computedDataFn.ts +88 -88
  50. package/src/series/contextObserverCallback.ts +132 -107
  51. package/src/series/dataFormatterValidator.ts +46 -46
  52. package/src/series/dataValidator.ts +12 -12
  53. package/src/series/seriesObservables.ts +209 -175
  54. package/src/tree/computedDataFn.ts +129 -129
  55. package/src/tree/contextObserverCallback.ts +58 -58
  56. package/src/tree/dataFormatterValidator.ts +13 -13
  57. package/src/tree/dataValidator.ts +13 -13
  58. package/src/tree/treeObservables.ts +105 -105
  59. package/src/utils/commonUtils.ts +55 -55
  60. package/src/utils/d3Scale.ts +198 -198
  61. package/src/utils/errorMessage.ts +40 -40
  62. package/src/utils/index.ts +3 -3
  63. package/src/utils/observables.ts +308 -293
  64. package/src/utils/orbchartsUtils.ts +396 -396
  65. package/src/utils/validator.ts +126 -126
  66. package/tsconfig.base.json +13 -13
  67. package/tsconfig.json +2 -2
  68. package/vite-env.d.ts +6 -6
  69. package/vite.config.js +22 -22
@@ -1,26 +1,37 @@
1
1
  import { Observable } from 'rxjs';
2
2
  import { ComputedDatumSeries, ComputedDataTypeMap, DataFormatterTypeMap, ContainerPosition, Layout } from '../../lib/core-types';
3
3
 
4
+ export declare const datumLabelsObservable: ({ computedData$ }: {
5
+ computedData$: Observable<ComputedDataTypeMap<"series">>;
6
+ }) => Observable<string[]>;
4
7
  export declare const separateSeriesObservable: ({ fullDataFormatter$ }: {
5
8
  fullDataFormatter$: Observable<DataFormatterTypeMap<"series">>;
6
9
  }) => Observable<boolean>;
10
+ export declare const separateLabelObservable: ({ fullDataFormatter$ }: {
11
+ fullDataFormatter$: Observable<DataFormatterTypeMap<"series">>;
12
+ }) => Observable<boolean>;
13
+ export declare const sumSeriesObservable: ({ fullDataFormatter$ }: {
14
+ fullDataFormatter$: Observable<DataFormatterTypeMap<"series">>;
15
+ }) => Observable<boolean>;
7
16
  export declare const seriesLabelsObservable: ({ computedData$ }: {
8
17
  computedData$: Observable<ComputedDataTypeMap<"series">>;
9
18
  }) => Observable<string[]>;
10
19
  export declare const seriesVisibleComputedDataObservable: ({ computedData$ }: {
11
20
  computedData$: Observable<ComputedDataTypeMap<"series">>;
12
21
  }) => Observable<ComputedDatumSeries[][]>;
13
- export declare const seriesComputedSortedDataObservable: ({ computedData$, fullDataFormatter$ }: {
22
+ export declare const seriesComputedSortedDataObservable: ({ computedData$, separateSeries$, separateLabel$, sumSeries$, datumLabels$ }: {
14
23
  computedData$: Observable<ComputedDataTypeMap<"series">>;
15
- fullDataFormatter$: Observable<DataFormatterTypeMap<"series">>;
24
+ separateSeries$: Observable<boolean>;
25
+ separateLabel$: Observable<boolean>;
26
+ sumSeries$: Observable<boolean>;
27
+ datumLabels$: Observable<string[]>;
16
28
  }) => Observable<ComputedDatumSeries[][]>;
17
- export declare const seriesContainerPositionObservable: ({ computedData$, fullDataFormatter$, layout$ }: {
18
- computedData$: Observable<ComputedDataTypeMap<"series">>;
29
+ export declare const seriesContainerPositionObservable: ({ computedSortedData$, fullDataFormatter$, layout$ }: {
30
+ computedSortedData$: Observable<ComputedDatumSeries[][]>;
19
31
  fullDataFormatter$: Observable<DataFormatterTypeMap<"series">>;
20
32
  layout$: Observable<Layout>;
21
33
  }) => Observable<ContainerPosition[]>;
22
- export declare const seriesContainerPositionMapObservable: ({ seriesContainerPosition$, seriesLabels$, separateSeries$ }: {
34
+ export declare const datumContainerPositionMapObservable: ({ seriesContainerPosition$, computedSortedData$ }: {
23
35
  seriesContainerPosition$: Observable<ContainerPosition[]>;
24
- seriesLabels$: Observable<string[]>;
25
- separateSeries$: Observable<boolean>;
36
+ computedSortedData$: Observable<ComputedDatumSeries[][]>;
26
37
  }) => Observable<Map<string, ContainerPosition>>;
package/lib/core-types.ts CHANGED
@@ -1,7 +1,7 @@
1
-
2
-
3
- export * from '@orbcharts/core-types'
4
-
5
- // test
6
- // export * from '../../orbcharts-core-types/src'
7
-
1
+
2
+
3
+ export * from '@orbcharts/core-types'
4
+
5
+ // test
6
+ // export * from '../../orbcharts-core-types/src'
7
+
package/package.json CHANGED
@@ -1,46 +1,46 @@
1
- {
2
- "name": "@orbcharts/core",
3
- "version": "3.0.4",
4
- "description": "Core codes for OrbCharts",
5
- "author": "Blue Planet Inc.",
6
- "license": "Apache-2.0",
7
- "keywords": [
8
- "d3",
9
- "rxjs",
10
- "typescript",
11
- "svg",
12
- "visualization",
13
- "infographic",
14
- "graph",
15
- "chart"
16
- ],
17
- "private": false,
18
- "publishConfig": {
19
- "access": "public",
20
- "registry": "https://registry.npmjs.org/"
21
- },
22
- "files": [
23
- "*"
24
- ],
25
- "main": "./dist/orbcharts-core.umd.js",
26
- "module": "./dist/orbcharts-core.es.js",
27
- "types": "./dist/src/index.d.ts",
28
- "unpkg": "./dist/orbcharts-core.umd.js",
29
- "jsdelivr": "./dist/orbcharts-core.umd.js",
30
- "scripts": {
31
- "test": "echo \"Error: no test specified\" && exit 1",
32
- "build": "vite build --mode production"
33
- },
34
- "devDependencies": {
35
- "@types/d3": "^7.4.0",
36
- "ts-loader": "^9.4.2",
37
- "typescript": "^5.0.4",
38
- "vite": "^5.3.5",
39
- "vite-plugin-dts": "^3.7.3"
40
- },
41
- "dependencies": {
42
- "@orbcharts/core-types": "^3.0.2",
43
- "d3": "^7.8.5",
44
- "rxjs": "^7.8.1"
45
- }
46
- }
1
+ {
2
+ "name": "@orbcharts/core",
3
+ "version": "3.0.5",
4
+ "description": "Core codes for OrbCharts",
5
+ "author": "Blue Planet Inc.",
6
+ "license": "Apache-2.0",
7
+ "keywords": [
8
+ "d3",
9
+ "rxjs",
10
+ "typescript",
11
+ "svg",
12
+ "visualization",
13
+ "infographic",
14
+ "graph",
15
+ "chart"
16
+ ],
17
+ "private": false,
18
+ "publishConfig": {
19
+ "access": "public",
20
+ "registry": "https://registry.npmjs.org/"
21
+ },
22
+ "files": [
23
+ "*"
24
+ ],
25
+ "main": "./dist/orbcharts-core.umd.js",
26
+ "module": "./dist/orbcharts-core.es.js",
27
+ "types": "./dist/src/index.d.ts",
28
+ "unpkg": "./dist/orbcharts-core.umd.js",
29
+ "jsdelivr": "./dist/orbcharts-core.umd.js",
30
+ "scripts": {
31
+ "test": "echo \"Error: no test specified\" && exit 1",
32
+ "build": "vite build --mode production"
33
+ },
34
+ "devDependencies": {
35
+ "@types/d3": "^7.4.0",
36
+ "ts-loader": "^9.4.2",
37
+ "typescript": "^5.0.4",
38
+ "vite": "^5.3.5",
39
+ "vite-plugin-dts": "^3.7.3"
40
+ },
41
+ "dependencies": {
42
+ "@orbcharts/core-types": "^3.0.3",
43
+ "d3": "^7.8.5",
44
+ "rxjs": "^7.8.1"
45
+ }
46
+ }
@@ -1,57 +1,57 @@
1
- import * as d3 from 'd3'
2
- import {
3
- Subject } from 'rxjs'
4
- import type {
5
- ComputedDataFn,
6
- DataValidator,
7
- ChartEntity,
8
- ChartType,
9
- ChartParamsPartial,
10
- ContextObserverCallback,
11
- ChartOptionsPartial,
12
- DataTypeMap,
13
- DataFormatterTypeMap,
14
- DataFormatterPartialTypeMap,
15
- DataFormatterValidator,
16
- EventTypeMap,
17
- PluginEntity } from '../lib/core-types'
18
- import { createBaseChart } from './base/createBaseChart'
19
- import { createOrbChartsErrorMessage } from './utils/errorMessage'
20
-
21
- export abstract class AbstractChart<T extends ChartType> implements ChartEntity<T> {
22
- selection: d3.Selection<SVGGElement, unknown, HTMLElement, unknown>
23
- destroy: () => void
24
- data$: Subject<DataTypeMap<T>> = new Subject()
25
- dataFormatter$: Subject<DataFormatterPartialTypeMap<T>> = new Subject()
26
- plugins$: Subject<PluginEntity<T, any, any>[]> = new Subject()
27
- chartParams$: Subject<ChartParamsPartial> = new Subject()
28
- event$: Subject<EventTypeMap<T>> = new Subject()
29
-
30
- constructor (
31
- { defaultDataFormatter, dataFormatterValidator, computedDataFn, dataValidator, contextObserverCallback }: {
32
- defaultDataFormatter: DataFormatterTypeMap<T>
33
- dataFormatterValidator: DataFormatterValidator<T>
34
- computedDataFn: ComputedDataFn<T>
35
- dataValidator: DataValidator<T>
36
- contextObserverCallback: ContextObserverCallback<T>
37
- },
38
- element: HTMLElement | Element,
39
- options?: ChartOptionsPartial<T>
40
- ) {
41
- try {
42
- const baseChart = createBaseChart({ defaultDataFormatter, dataFormatterValidator, computedDataFn, dataValidator, contextObserverCallback })
43
- const chartEntity = baseChart(element, options)
44
-
45
- this.selection = chartEntity.selection
46
- this.destroy = chartEntity.destroy
47
- this.data$ = chartEntity.data$
48
- this.dataFormatter$ = chartEntity.dataFormatter$
49
- this.plugins$ = chartEntity.plugins$
50
- this.chartParams$ = chartEntity.chartParams$
51
- this.event$ = chartEntity.event$
52
- } catch (e) {
53
- console.error(createOrbChartsErrorMessage(e))
54
- }
55
- }
56
-
57
- }
1
+ import * as d3 from 'd3'
2
+ import {
3
+ Subject } from 'rxjs'
4
+ import type {
5
+ ComputedDataFn,
6
+ DataValidator,
7
+ ChartEntity,
8
+ ChartType,
9
+ ChartParamsPartial,
10
+ ContextObserverCallback,
11
+ ChartOptionsPartial,
12
+ DataTypeMap,
13
+ DataFormatterTypeMap,
14
+ DataFormatterPartialTypeMap,
15
+ DataFormatterValidator,
16
+ EventTypeMap,
17
+ PluginEntity } from '../lib/core-types'
18
+ import { createBaseChart } from './base/createBaseChart'
19
+ import { createOrbChartsErrorMessage } from './utils/errorMessage'
20
+
21
+ export abstract class AbstractChart<T extends ChartType> implements ChartEntity<T> {
22
+ selection: d3.Selection<SVGGElement, unknown, HTMLElement, unknown>
23
+ destroy: () => void
24
+ data$: Subject<DataTypeMap<T>> = new Subject()
25
+ dataFormatter$: Subject<DataFormatterPartialTypeMap<T>> = new Subject()
26
+ plugins$: Subject<PluginEntity<T, any, any>[]> = new Subject()
27
+ chartParams$: Subject<ChartParamsPartial> = new Subject()
28
+ event$: Subject<EventTypeMap<T>> = new Subject()
29
+
30
+ constructor (
31
+ { defaultDataFormatter, dataFormatterValidator, computedDataFn, dataValidator, contextObserverCallback }: {
32
+ defaultDataFormatter: DataFormatterTypeMap<T>
33
+ dataFormatterValidator: DataFormatterValidator<T>
34
+ computedDataFn: ComputedDataFn<T>
35
+ dataValidator: DataValidator<T>
36
+ contextObserverCallback: ContextObserverCallback<T>
37
+ },
38
+ element: HTMLElement | Element,
39
+ options?: ChartOptionsPartial<T>
40
+ ) {
41
+ try {
42
+ const baseChart = createBaseChart({ defaultDataFormatter, dataFormatterValidator, computedDataFn, dataValidator, contextObserverCallback })
43
+ const chartEntity = baseChart(element, options)
44
+
45
+ this.selection = chartEntity.selection
46
+ this.destroy = chartEntity.destroy
47
+ this.data$ = chartEntity.data$
48
+ this.dataFormatter$ = chartEntity.dataFormatter$
49
+ this.plugins$ = chartEntity.plugins$
50
+ this.chartParams$ = chartEntity.chartParams$
51
+ this.event$ = chartEntity.event$
52
+ } catch (e) {
53
+ console.error(createOrbChartsErrorMessage(e))
54
+ }
55
+ }
56
+
57
+ }
package/src/GridChart.ts CHANGED
@@ -1,25 +1,25 @@
1
- import type {
2
- ChartEntity,
3
- ChartOptionsPartial } from '../lib/core-types'
4
- import { DEFAULT_DATA_FORMATTER_GRID } from './defaults'
5
- import { dataFormatterValidator } from './grid/dataFormatterValidator'
6
- import { computedDataFn } from './grid/computedDataFn'
7
- import { dataValidator } from './grid/dataValidator'
8
- import { contextObserverCallback } from './grid/contextObserverCallback'
9
- import { AbstractChart } from './AbstractChart'
10
-
11
- export class GridChart extends AbstractChart<'grid'> implements ChartEntity<'grid'> {
12
- constructor (element: HTMLElement | Element, options?: ChartOptionsPartial<'grid'>) {
13
- super(
14
- {
15
- defaultDataFormatter: DEFAULT_DATA_FORMATTER_GRID,
16
- dataFormatterValidator,
17
- computedDataFn,
18
- dataValidator,
19
- contextObserverCallback
20
- },
21
- element,
22
- options
23
- )
24
- }
1
+ import type {
2
+ ChartEntity,
3
+ ChartOptionsPartial } from '../lib/core-types'
4
+ import { DEFAULT_DATA_FORMATTER_GRID } from './defaults'
5
+ import { dataFormatterValidator } from './grid/dataFormatterValidator'
6
+ import { computedDataFn } from './grid/computedDataFn'
7
+ import { dataValidator } from './grid/dataValidator'
8
+ import { contextObserverCallback } from './grid/contextObserverCallback'
9
+ import { AbstractChart } from './AbstractChart'
10
+
11
+ export class GridChart extends AbstractChart<'grid'> implements ChartEntity<'grid'> {
12
+ constructor (element: HTMLElement | Element, options?: ChartOptionsPartial<'grid'>) {
13
+ super(
14
+ {
15
+ defaultDataFormatter: DEFAULT_DATA_FORMATTER_GRID,
16
+ dataFormatterValidator,
17
+ computedDataFn,
18
+ dataValidator,
19
+ contextObserverCallback
20
+ },
21
+ element,
22
+ options
23
+ )
24
+ }
25
25
  }
@@ -1,25 +1,25 @@
1
- import type {
2
- ChartEntity,
3
- ChartOptionsPartial } from '../lib/core-types'
4
- import { DEFAULT_DATA_FORMATTER_MULTI_GRID } from './defaults'
5
- import { dataFormatterValidator } from './multiGrid/dataFormatterValidator'
6
- import { computedDataFn } from './multiGrid/computedDataFn'
7
- import { dataValidator } from './multiGrid/dataValidator'
8
- import { contextObserverCallback } from './multiGrid/contextObserverCallback'
9
- import { AbstractChart } from './AbstractChart'
10
-
11
- export class MultiGridChart extends AbstractChart<'multiGrid'> implements ChartEntity<'multiGrid'> {
12
- constructor (element: HTMLElement | Element, options?: ChartOptionsPartial<'multiGrid'>) {
13
- super(
14
- {
15
- defaultDataFormatter: DEFAULT_DATA_FORMATTER_MULTI_GRID,
16
- dataFormatterValidator,
17
- computedDataFn,
18
- dataValidator,
19
- contextObserverCallback
20
- },
21
- element,
22
- options
23
- )
24
- }
1
+ import type {
2
+ ChartEntity,
3
+ ChartOptionsPartial } from '../lib/core-types'
4
+ import { DEFAULT_DATA_FORMATTER_MULTI_GRID } from './defaults'
5
+ import { dataFormatterValidator } from './multiGrid/dataFormatterValidator'
6
+ import { computedDataFn } from './multiGrid/computedDataFn'
7
+ import { dataValidator } from './multiGrid/dataValidator'
8
+ import { contextObserverCallback } from './multiGrid/contextObserverCallback'
9
+ import { AbstractChart } from './AbstractChart'
10
+
11
+ export class MultiGridChart extends AbstractChart<'multiGrid'> implements ChartEntity<'multiGrid'> {
12
+ constructor (element: HTMLElement | Element, options?: ChartOptionsPartial<'multiGrid'>) {
13
+ super(
14
+ {
15
+ defaultDataFormatter: DEFAULT_DATA_FORMATTER_MULTI_GRID,
16
+ dataFormatterValidator,
17
+ computedDataFn,
18
+ dataValidator,
19
+ contextObserverCallback
20
+ },
21
+ element,
22
+ options
23
+ )
24
+ }
25
25
  }
@@ -1,25 +1,25 @@
1
- import type {
2
- ChartEntity,
3
- ChartOptionsPartial } from '../lib/core-types'
4
- import { DEFAULT_DATA_FORMATTER_MULTI_VALUE } from './defaults'
5
- import { dataFormatterValidator } from './multiValue/dataFormatterValidator'
6
- import { computedDataFn } from './multiValue/computedDataFn'
7
- import { dataValidator } from './multiValue/dataValidator'
8
- import { contextObserverCallback } from './multiValue/contextObserverCallback'
9
- import { AbstractChart } from './AbstractChart'
10
-
11
- export class MultiValueChart extends AbstractChart<'multiValue'> implements ChartEntity<'multiValue'> {
12
- constructor (element: HTMLElement | Element, options?: ChartOptionsPartial<'multiValue'>) {
13
- super(
14
- {
15
- defaultDataFormatter: DEFAULT_DATA_FORMATTER_MULTI_VALUE,
16
- dataFormatterValidator,
17
- computedDataFn,
18
- dataValidator,
19
- contextObserverCallback
20
- },
21
- element,
22
- options
23
- )
24
- }
1
+ import type {
2
+ ChartEntity,
3
+ ChartOptionsPartial } from '../lib/core-types'
4
+ import { DEFAULT_DATA_FORMATTER_MULTI_VALUE } from './defaults'
5
+ import { dataFormatterValidator } from './multiValue/dataFormatterValidator'
6
+ import { computedDataFn } from './multiValue/computedDataFn'
7
+ import { dataValidator } from './multiValue/dataValidator'
8
+ import { contextObserverCallback } from './multiValue/contextObserverCallback'
9
+ import { AbstractChart } from './AbstractChart'
10
+
11
+ export class MultiValueChart extends AbstractChart<'multiValue'> implements ChartEntity<'multiValue'> {
12
+ constructor (element: HTMLElement | Element, options?: ChartOptionsPartial<'multiValue'>) {
13
+ super(
14
+ {
15
+ defaultDataFormatter: DEFAULT_DATA_FORMATTER_MULTI_VALUE,
16
+ dataFormatterValidator,
17
+ computedDataFn,
18
+ dataValidator,
19
+ contextObserverCallback
20
+ },
21
+ element,
22
+ options
23
+ )
24
+ }
25
25
  }
@@ -1,25 +1,25 @@
1
- import type {
2
- ChartEntity,
3
- ChartOptionsPartial } from '../lib/core-types'
4
- import { DEFAULT_DATA_FORMATTER_RELATIONSHIP} from './defaults'
5
- import { dataFormatterValidator } from './relationship/dataFormatterValidator'
6
- import { computedDataFn } from './relationship/computedDataFn'
7
- import { dataValidator } from './relationship/dataValidator'
8
- import { contextObserverCallback } from './relationship/contextObserverCallback'
9
- import { AbstractChart } from './AbstractChart'
10
-
11
- export class RelationshipChart extends AbstractChart<'relationship'> implements ChartEntity<'relationship'> {
12
- constructor (element: HTMLElement | Element, options?: ChartOptionsPartial<'relationship'>) {
13
- super(
14
- {
15
- defaultDataFormatter: DEFAULT_DATA_FORMATTER_RELATIONSHIP,
16
- dataFormatterValidator,
17
- computedDataFn,
18
- dataValidator,
19
- contextObserverCallback
20
- },
21
- element,
22
- options
23
- )
24
- }
1
+ import type {
2
+ ChartEntity,
3
+ ChartOptionsPartial } from '../lib/core-types'
4
+ import { DEFAULT_DATA_FORMATTER_RELATIONSHIP} from './defaults'
5
+ import { dataFormatterValidator } from './relationship/dataFormatterValidator'
6
+ import { computedDataFn } from './relationship/computedDataFn'
7
+ import { dataValidator } from './relationship/dataValidator'
8
+ import { contextObserverCallback } from './relationship/contextObserverCallback'
9
+ import { AbstractChart } from './AbstractChart'
10
+
11
+ export class RelationshipChart extends AbstractChart<'relationship'> implements ChartEntity<'relationship'> {
12
+ constructor (element: HTMLElement | Element, options?: ChartOptionsPartial<'relationship'>) {
13
+ super(
14
+ {
15
+ defaultDataFormatter: DEFAULT_DATA_FORMATTER_RELATIONSHIP,
16
+ dataFormatterValidator,
17
+ computedDataFn,
18
+ dataValidator,
19
+ contextObserverCallback
20
+ },
21
+ element,
22
+ options
23
+ )
24
+ }
25
25
  }
@@ -1,25 +1,25 @@
1
- import type {
2
- ChartEntity,
3
- ChartOptionsPartial } from '../lib/core-types'
4
- import { DEFAULT_DATA_FORMATTER_SERIES } from './defaults'
5
- import { dataFormatterValidator } from './series/dataFormatterValidator'
6
- import { computedDataFn } from './series/computedDataFn'
7
- import { dataValidator } from './series/dataValidator'
8
- import { contextObserverCallback } from './series/contextObserverCallback'
9
- import { AbstractChart } from './AbstractChart'
10
-
11
- export class SeriesChart extends AbstractChart<'series'> implements ChartEntity<'series'> {
12
- constructor (element: HTMLElement | Element, options?: ChartOptionsPartial<'series'>) {
13
- super(
14
- {
15
- defaultDataFormatter: DEFAULT_DATA_FORMATTER_SERIES,
16
- dataFormatterValidator,
17
- computedDataFn,
18
- dataValidator,
19
- contextObserverCallback
20
- },
21
- element,
22
- options
23
- )
24
- }
1
+ import type {
2
+ ChartEntity,
3
+ ChartOptionsPartial } from '../lib/core-types'
4
+ import { DEFAULT_DATA_FORMATTER_SERIES } from './defaults'
5
+ import { dataFormatterValidator } from './series/dataFormatterValidator'
6
+ import { computedDataFn } from './series/computedDataFn'
7
+ import { dataValidator } from './series/dataValidator'
8
+ import { contextObserverCallback } from './series/contextObserverCallback'
9
+ import { AbstractChart } from './AbstractChart'
10
+
11
+ export class SeriesChart extends AbstractChart<'series'> implements ChartEntity<'series'> {
12
+ constructor (element: HTMLElement | Element, options?: ChartOptionsPartial<'series'>) {
13
+ super(
14
+ {
15
+ defaultDataFormatter: DEFAULT_DATA_FORMATTER_SERIES,
16
+ dataFormatterValidator,
17
+ computedDataFn,
18
+ dataValidator,
19
+ contextObserverCallback
20
+ },
21
+ element,
22
+ options
23
+ )
24
+ }
25
25
  }
package/src/TreeChart.ts CHANGED
@@ -1,25 +1,25 @@
1
- import type {
2
- ChartEntity,
3
- ChartOptionsPartial } from '../lib/core-types'
4
- import { DEFAULT_DATA_FORMATTER_TREE } from './defaults'
5
- import { dataFormatterValidator } from './tree/dataFormatterValidator'
6
- import { computedDataFn } from './tree/computedDataFn'
7
- import { dataValidator } from './tree/dataValidator'
8
- import { contextObserverCallback } from './tree/contextObserverCallback'
9
- import { AbstractChart } from './AbstractChart'
10
-
11
- export class TreeChart extends AbstractChart<'tree'> implements ChartEntity<'tree'> {
12
- constructor (element: HTMLElement | Element, options?: ChartOptionsPartial<'tree'>) {
13
- super(
14
- {
15
- defaultDataFormatter: DEFAULT_DATA_FORMATTER_TREE,
16
- dataFormatterValidator,
17
- computedDataFn,
18
- dataValidator,
19
- contextObserverCallback
20
- },
21
- element,
22
- options
23
- )
24
- }
1
+ import type {
2
+ ChartEntity,
3
+ ChartOptionsPartial } from '../lib/core-types'
4
+ import { DEFAULT_DATA_FORMATTER_TREE } from './defaults'
5
+ import { dataFormatterValidator } from './tree/dataFormatterValidator'
6
+ import { computedDataFn } from './tree/computedDataFn'
7
+ import { dataValidator } from './tree/dataValidator'
8
+ import { contextObserverCallback } from './tree/contextObserverCallback'
9
+ import { AbstractChart } from './AbstractChart'
10
+
11
+ export class TreeChart extends AbstractChart<'tree'> implements ChartEntity<'tree'> {
12
+ constructor (element: HTMLElement | Element, options?: ChartOptionsPartial<'tree'>) {
13
+ super(
14
+ {
15
+ defaultDataFormatter: DEFAULT_DATA_FORMATTER_TREE,
16
+ dataFormatterValidator,
17
+ computedDataFn,
18
+ dataValidator,
19
+ contextObserverCallback
20
+ },
21
+ element,
22
+ options
23
+ )
24
+ }
25
25
  }