@orbcharts/core 3.0.0-alpha.40 → 3.0.0-alpha.41
Sign up to get free protection for your applications and to get access to all the features.
- package/LICENSE +200 -200
- package/dist/orbcharts-core.es.js +1152 -1124
- package/dist/orbcharts-core.umd.js +2 -2
- package/dist/src/types/ChartParams.d.ts +1 -1
- package/dist/src/types/ContextObserverGrid.d.ts +1 -0
- package/dist/src/types/ContextObserverMultiGrid.d.ts +1 -0
- package/dist/src/types/ContextObserverSeries.d.ts +1 -0
- package/dist/src/types/ContextObserverTree.d.ts +1 -0
- package/dist/src/utils/observables.d.ts +1 -0
- package/package.json +41 -41
- package/src/AbstractChart.ts +48 -48
- package/src/GridChart.ts +20 -20
- package/src/MultiGridChart.ts +20 -20
- package/src/MultiValueChart.ts +20 -20
- package/src/RelationshipChart.ts +20 -20
- package/src/SeriesChart.ts +20 -20
- package/src/TreeChart.ts +20 -20
- package/src/base/createBaseChart.ts +367 -367
- package/src/base/createBasePlugin.ts +89 -89
- package/src/defaults.ts +248 -247
- package/src/defineGridPlugin.ts +3 -3
- package/src/defineMultiGridPlugin.ts +3 -3
- package/src/defineMultiValuePlugin.ts +3 -3
- package/src/defineNoneDataPlugin.ts +4 -4
- package/src/defineRelationshipPlugin.ts +3 -3
- package/src/defineSeriesPlugin.ts +3 -3
- package/src/defineTreePlugin.ts +3 -3
- package/src/grid/computeGridData.ts +205 -205
- package/src/grid/createGridContextObserver.ts +130 -124
- package/src/grid/gridObservables.ts +486 -486
- package/src/index.ts +21 -21
- package/src/multiGrid/computeMultiGridData.ts +173 -173
- package/src/multiGrid/createMultiGridContextObserver.ts +40 -34
- package/src/multiGrid/multiGridObservables.ts +285 -285
- package/src/multiValue/computeMultiValueData.ts +136 -136
- package/src/multiValue/createMultiValueContextObserver.ts +12 -12
- package/src/relationship/computeRelationshipData.ts +106 -106
- package/src/relationship/createRelationshipContextObserver.ts +12 -12
- package/src/series/computeSeriesData.ts +153 -153
- package/src/series/createSeriesContextObserver.ts +38 -33
- package/src/series/seriesObservables.ts +23 -23
- package/src/tree/computeTreeData.ts +128 -128
- package/src/tree/createTreeContextObserver.ts +61 -56
- package/src/tree/treeObservables.ts +94 -94
- package/src/types/Chart.ts +48 -48
- package/src/types/ChartParams.ts +51 -51
- package/src/types/ComputedData.ts +82 -82
- package/src/types/ComputedDataGrid.ts +13 -13
- package/src/types/ComputedDataMultiGrid.ts +2 -2
- package/src/types/ComputedDataMultiValue.ts +9 -9
- package/src/types/ComputedDataRelationship.ts +19 -19
- package/src/types/ComputedDataSeries.ts +7 -7
- package/src/types/ComputedDataTree.ts +19 -19
- package/src/types/ContextObserver.ts +38 -38
- package/src/types/ContextObserverGrid.ts +33 -33
- package/src/types/ContextObserverMultiGrid.ts +28 -27
- package/src/types/ContextObserverMultiValue.ts +4 -4
- package/src/types/ContextObserverRelationship.ts +4 -4
- package/src/types/ContextObserverSeries.ts +8 -7
- package/src/types/ContextObserverTree.ts +11 -10
- package/src/types/ContextSubject.ts +18 -18
- package/src/types/Data.ts +45 -45
- package/src/types/DataFormatter.ts +95 -95
- package/src/types/DataFormatterGrid.ts +55 -55
- package/src/types/DataFormatterMultiGrid.ts +42 -42
- package/src/types/DataFormatterMultiValue.ts +20 -20
- package/src/types/DataFormatterRelationship.ts +22 -22
- package/src/types/DataFormatterSeries.ts +29 -29
- package/src/types/DataFormatterTree.ts +12 -12
- package/src/types/DataGrid.ts +11 -11
- package/src/types/DataMultiGrid.ts +6 -6
- package/src/types/DataMultiValue.ts +12 -12
- package/src/types/DataRelationship.ts +27 -27
- package/src/types/DataSeries.ts +11 -11
- package/src/types/DataTree.ts +20 -20
- package/src/types/Event.ts +153 -153
- package/src/types/Layout.ts +11 -11
- package/src/types/Padding.ts +5 -5
- package/src/types/Plugin.ts +60 -60
- package/src/types/TransformData.ts +7 -7
- package/src/types/index.ts +37 -37
- package/src/utils/commonUtils.ts +50 -50
- package/src/utils/d3Utils.ts +89 -89
- package/src/utils/index.ts +4 -4
- package/src/utils/observables.ts +202 -181
- package/src/utils/orbchartsUtils.ts +253 -253
- package/tsconfig.json +13 -13
- package/vite.config.js +44 -44
@@ -3,6 +3,7 @@ import { ContextObserverBase } from './ContextObserver';
|
|
3
3
|
import { ComputedDatumSeries } from './ComputedDataSeries';
|
4
4
|
|
5
5
|
export interface ContextObserverSeries<PluginParams> extends ContextObserverBase<'series', PluginParams> {
|
6
|
+
textSizePx$: Observable<number>;
|
6
7
|
seriesHighlight$: Observable<ComputedDatumSeries[]>;
|
7
8
|
SeriesDataMap$: Observable<Map<string, ComputedDatumSeries[]>>;
|
8
9
|
}
|
@@ -3,6 +3,7 @@ import { ContextObserverBase } from './ContextObserver';
|
|
3
3
|
import { ComputedDataTree } from './ComputedDataTree';
|
4
4
|
|
5
5
|
export interface ContextObserverTree<PluginParams> extends ContextObserverBase<'tree', PluginParams> {
|
6
|
+
textSizePx$: Observable<number>;
|
6
7
|
treeHighlight$: Observable<ComputedDataTree[]>;
|
7
8
|
existCategoryLabels$: Observable<string[]>;
|
8
9
|
CategoryDataMap$: Observable<Map<string, ComputedDataTree[]>>;
|
@@ -15,3 +15,4 @@ export declare const groupDataMapObservable: <DatumType extends ComputedDatumTyp
|
|
15
15
|
export declare const categoryDataMapObservable: <DatumType extends ComputedDatumTypeMap<"multiValue" | "relationship" | "tree">>({ datumList$ }: {
|
16
16
|
datumList$: Observable<DatumType[]>;
|
17
17
|
}) => Observable<Map<string, DatumType[]>>;
|
18
|
+
export declare const textSizePxObservable: (chartParams$: Observable<ChartParams>) => Observable<number>;
|
package/package.json
CHANGED
@@ -1,41 +1,41 @@
|
|
1
|
-
{
|
2
|
-
"name": "@orbcharts/core",
|
3
|
-
"version": "3.0.0-alpha.
|
4
|
-
"description": "OrbCharts is an open source chart library based on d3.js and rx.js",
|
5
|
-
"author": "Blue Planet Inc.",
|
6
|
-
"license": "Apache-2.0",
|
7
|
-
"keywords": [
|
8
|
-
"d3",
|
9
|
-
"rxjs",
|
10
|
-
"svg",
|
11
|
-
"visualization",
|
12
|
-
"infographic",
|
13
|
-
"graph",
|
14
|
-
"chart"
|
15
|
-
],
|
16
|
-
"private": false,
|
17
|
-
"publishConfig": {
|
18
|
-
"access": "public",
|
19
|
-
"registry": "https://registry.npmjs.org/"
|
20
|
-
},
|
21
|
-
"files": [
|
22
|
-
"*"
|
23
|
-
],
|
24
|
-
"module": "./dist/orbcharts-core.es.js",
|
25
|
-
"types": "./dist/src/index.d.ts",
|
26
|
-
"scripts": {
|
27
|
-
"test": "echo \"Error: no test specified\" && exit 1",
|
28
|
-
"build": "vite build --mode release"
|
29
|
-
},
|
30
|
-
"devDependencies": {
|
31
|
-
"@types/d3": "^7.4.0",
|
32
|
-
"ts-loader": "^9.4.2",
|
33
|
-
"typescript": "^5.0.4",
|
34
|
-
"vite": "^5.3.5",
|
35
|
-
"vite-plugin-dts": "^3.7.3"
|
36
|
-
},
|
37
|
-
"dependencies": {
|
38
|
-
"d3": "^7.8.5",
|
39
|
-
"rxjs": "^7.8.1"
|
40
|
-
}
|
41
|
-
}
|
1
|
+
{
|
2
|
+
"name": "@orbcharts/core",
|
3
|
+
"version": "3.0.0-alpha.41",
|
4
|
+
"description": "OrbCharts is an open source chart library based on d3.js and rx.js",
|
5
|
+
"author": "Blue Planet Inc.",
|
6
|
+
"license": "Apache-2.0",
|
7
|
+
"keywords": [
|
8
|
+
"d3",
|
9
|
+
"rxjs",
|
10
|
+
"svg",
|
11
|
+
"visualization",
|
12
|
+
"infographic",
|
13
|
+
"graph",
|
14
|
+
"chart"
|
15
|
+
],
|
16
|
+
"private": false,
|
17
|
+
"publishConfig": {
|
18
|
+
"access": "public",
|
19
|
+
"registry": "https://registry.npmjs.org/"
|
20
|
+
},
|
21
|
+
"files": [
|
22
|
+
"*"
|
23
|
+
],
|
24
|
+
"module": "./dist/orbcharts-core.es.js",
|
25
|
+
"types": "./dist/src/index.d.ts",
|
26
|
+
"scripts": {
|
27
|
+
"test": "echo \"Error: no test specified\" && exit 1",
|
28
|
+
"build": "vite build --mode release"
|
29
|
+
},
|
30
|
+
"devDependencies": {
|
31
|
+
"@types/d3": "^7.4.0",
|
32
|
+
"ts-loader": "^9.4.2",
|
33
|
+
"typescript": "^5.0.4",
|
34
|
+
"vite": "^5.3.5",
|
35
|
+
"vite-plugin-dts": "^3.7.3"
|
36
|
+
},
|
37
|
+
"dependencies": {
|
38
|
+
"d3": "^7.8.5",
|
39
|
+
"rxjs": "^7.8.1"
|
40
|
+
}
|
41
|
+
}
|
package/src/AbstractChart.ts
CHANGED
@@ -1,48 +1,48 @@
|
|
1
|
-
import * as d3 from 'd3'
|
2
|
-
import {
|
3
|
-
Subject } from 'rxjs'
|
4
|
-
import type {
|
5
|
-
ComputedDataFn,
|
6
|
-
ChartEntity,
|
7
|
-
ChartType,
|
8
|
-
ChartParamsPartial,
|
9
|
-
ContextObserverFn,
|
10
|
-
ChartOptionsPartial,
|
11
|
-
DataTypeMap,
|
12
|
-
DataFormatterTypeMap,
|
13
|
-
DataFormatterPartialTypeMap,
|
14
|
-
EventTypeMap,
|
15
|
-
PluginEntity } from './types'
|
16
|
-
import { createBaseChart } from './base/createBaseChart'
|
17
|
-
|
18
|
-
export abstract class AbstractChart<T extends ChartType> implements ChartEntity<T> {
|
19
|
-
selection: d3.Selection<SVGGElement, unknown, HTMLElement, unknown>
|
20
|
-
destroy: () => void
|
21
|
-
data$: Subject<DataTypeMap<T>> = new Subject()
|
22
|
-
dataFormatter$: Subject<DataFormatterPartialTypeMap<T>> = new Subject()
|
23
|
-
plugins$: Subject<PluginEntity<T, any, any>[]> = new Subject()
|
24
|
-
chartParams$: Subject<ChartParamsPartial> = new Subject()
|
25
|
-
event$: Subject<EventTypeMap<T>> = new Subject()
|
26
|
-
|
27
|
-
constructor (
|
28
|
-
{ defaultDataFormatter, computedDataFn, contextObserverFn }: {
|
29
|
-
defaultDataFormatter: DataFormatterTypeMap<T>
|
30
|
-
computedDataFn: ComputedDataFn<T>
|
31
|
-
contextObserverFn: ContextObserverFn<T>
|
32
|
-
},
|
33
|
-
element: HTMLElement | Element,
|
34
|
-
options?: ChartOptionsPartial<T>
|
35
|
-
) {
|
36
|
-
const baseChart = createBaseChart({ defaultDataFormatter, computedDataFn, contextObserverFn })
|
37
|
-
const chartEntity = baseChart(element, options)
|
38
|
-
|
39
|
-
this.selection = chartEntity.selection
|
40
|
-
this.destroy = chartEntity.destroy
|
41
|
-
this.data$ = chartEntity.data$
|
42
|
-
this.dataFormatter$ = chartEntity.dataFormatter$
|
43
|
-
this.plugins$ = chartEntity.plugins$
|
44
|
-
this.chartParams$ = chartEntity.chartParams$
|
45
|
-
this.event$ = chartEntity.event$
|
46
|
-
}
|
47
|
-
|
48
|
-
}
|
1
|
+
import * as d3 from 'd3'
|
2
|
+
import {
|
3
|
+
Subject } from 'rxjs'
|
4
|
+
import type {
|
5
|
+
ComputedDataFn,
|
6
|
+
ChartEntity,
|
7
|
+
ChartType,
|
8
|
+
ChartParamsPartial,
|
9
|
+
ContextObserverFn,
|
10
|
+
ChartOptionsPartial,
|
11
|
+
DataTypeMap,
|
12
|
+
DataFormatterTypeMap,
|
13
|
+
DataFormatterPartialTypeMap,
|
14
|
+
EventTypeMap,
|
15
|
+
PluginEntity } from './types'
|
16
|
+
import { createBaseChart } from './base/createBaseChart'
|
17
|
+
|
18
|
+
export abstract class AbstractChart<T extends ChartType> implements ChartEntity<T> {
|
19
|
+
selection: d3.Selection<SVGGElement, unknown, HTMLElement, unknown>
|
20
|
+
destroy: () => void
|
21
|
+
data$: Subject<DataTypeMap<T>> = new Subject()
|
22
|
+
dataFormatter$: Subject<DataFormatterPartialTypeMap<T>> = new Subject()
|
23
|
+
plugins$: Subject<PluginEntity<T, any, any>[]> = new Subject()
|
24
|
+
chartParams$: Subject<ChartParamsPartial> = new Subject()
|
25
|
+
event$: Subject<EventTypeMap<T>> = new Subject()
|
26
|
+
|
27
|
+
constructor (
|
28
|
+
{ defaultDataFormatter, computedDataFn, contextObserverFn }: {
|
29
|
+
defaultDataFormatter: DataFormatterTypeMap<T>
|
30
|
+
computedDataFn: ComputedDataFn<T>
|
31
|
+
contextObserverFn: ContextObserverFn<T>
|
32
|
+
},
|
33
|
+
element: HTMLElement | Element,
|
34
|
+
options?: ChartOptionsPartial<T>
|
35
|
+
) {
|
36
|
+
const baseChart = createBaseChart({ defaultDataFormatter, computedDataFn, contextObserverFn })
|
37
|
+
const chartEntity = baseChart(element, options)
|
38
|
+
|
39
|
+
this.selection = chartEntity.selection
|
40
|
+
this.destroy = chartEntity.destroy
|
41
|
+
this.data$ = chartEntity.data$
|
42
|
+
this.dataFormatter$ = chartEntity.dataFormatter$
|
43
|
+
this.plugins$ = chartEntity.plugins$
|
44
|
+
this.chartParams$ = chartEntity.chartParams$
|
45
|
+
this.event$ = chartEntity.event$
|
46
|
+
}
|
47
|
+
|
48
|
+
}
|
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
|
}
|
package/src/MultiGridChart.ts
CHANGED
@@ -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
|
}
|
package/src/MultiValueChart.ts
CHANGED
@@ -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
|
}
|
package/src/RelationshipChart.ts
CHANGED
@@ -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
|
}
|
package/src/SeriesChart.ts
CHANGED
@@ -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
|
}
|