@orbcharts/core 3.0.0-beta.5 → 3.0.0-beta.6
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.
- package/LICENSE +200 -200
- package/dist/orbcharts-core.es.js +1453 -1384
- package/dist/orbcharts-core.umd.js +4 -4
- package/dist/src/defaults.d.ts +22 -22
- package/dist/src/utils/orbchartsUtils.d.ts +7 -7
- package/dist/src/utils/relationshipObservables.d.ts +13 -0
- package/lib/core-types.ts +7 -7
- package/package.json +42 -42
- package/src/AbstractChart.ts +57 -57
- package/src/GridChart.ts +24 -24
- package/src/MultiGridChart.ts +24 -24
- package/src/MultiValueChart.ts +24 -24
- package/src/RelationshipChart.ts +24 -24
- package/src/SeriesChart.ts +24 -24
- package/src/TreeChart.ts +24 -24
- package/src/base/createBaseChart.ts +505 -505
- package/src/base/createBasePlugin.ts +153 -153
- package/src/base/validators/chartOptionsValidator.ts +23 -23
- package/src/base/validators/chartParamsValidator.ts +133 -133
- package/src/base/validators/elementValidator.ts +13 -13
- package/src/base/validators/pluginsValidator.ts +14 -14
- package/src/defaults.ts +235 -235
- 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/computedDataFn.ts +129 -129
- package/src/grid/contextObserverCallback.ts +176 -176
- package/src/grid/dataFormatterValidator.ts +101 -101
- package/src/grid/dataValidator.ts +12 -12
- package/src/index.ts +20 -20
- package/src/multiGrid/computedDataFn.ts +123 -123
- package/src/multiGrid/contextObserverCallback.ts +41 -41
- package/src/multiGrid/dataFormatterValidator.ts +115 -115
- package/src/multiGrid/dataValidator.ts +12 -12
- package/src/multiValue/computedDataFn.ts +110 -110
- package/src/multiValue/contextObserverCallback.ts +160 -160
- package/src/multiValue/dataFormatterValidator.ts +9 -9
- package/src/multiValue/dataValidator.ts +9 -9
- package/src/relationship/computedDataFn.ts +144 -125
- package/src/relationship/contextObserverCallback.ts +80 -12
- package/src/relationship/dataFormatterValidator.ts +9 -9
- package/src/relationship/dataValidator.ts +9 -9
- package/src/series/computedDataFn.ts +88 -88
- package/src/series/contextObserverCallback.ts +100 -100
- package/src/series/dataFormatterValidator.ts +41 -41
- package/src/series/dataValidator.ts +12 -12
- package/src/tree/computedDataFn.ts +129 -129
- package/src/tree/contextObserverCallback.ts +58 -58
- package/src/tree/dataFormatterValidator.ts +13 -13
- package/src/tree/dataValidator.ts +13 -13
- package/src/utils/commonUtils.ts +55 -55
- package/src/utils/d3Scale.ts +198 -198
- package/src/utils/errorMessage.ts +42 -42
- package/src/utils/gridObservables.ts +683 -683
- package/src/utils/index.ts +9 -9
- package/src/utils/multiGridObservables.ts +392 -392
- package/src/utils/multiValueObservables.ts +661 -661
- package/src/utils/observables.ts +219 -219
- package/src/utils/orbchartsUtils.ts +377 -377
- package/src/utils/relationshipObservables.ts +85 -0
- package/src/utils/seriesObservables.ts +175 -175
- package/src/utils/treeObservables.ts +105 -105
- package/src/utils/validator.ts +126 -126
- package/tsconfig.base.json +13 -13
- package/tsconfig.json +2 -2
- package/vite-env.d.ts +6 -6
- package/vite.config.js +22 -22
package/dist/src/defaults.d.ts
CHANGED
@@ -1,24 +1,24 @@
|
|
1
1
|
import { ChartOptionsPartial, DataSeries, DataGrid, DataMultiGrid, DataMultiValue, DataTree, DataRelationship, DataFormatterValueAxis, DataFormatterGroupAxis, DataFormatterContainer, DataFormatterSeries, DataFormatterGrid, DataFormatterGridGrid, DataFormatterMultiGrid, DataFormatterMultiGridGrid, DataFormatterMultiValue, DataFormatterTree, DataFormatterRelationship, ChartParams, Padding } from '../lib/core-types';
|
2
2
|
|
3
|
-
export declare const
|
4
|
-
export declare const
|
5
|
-
export declare const
|
6
|
-
export declare const
|
7
|
-
export declare const
|
8
|
-
export declare const
|
9
|
-
export declare const
|
10
|
-
export declare const
|
11
|
-
export declare const
|
12
|
-
export declare const
|
13
|
-
export declare const
|
14
|
-
export declare const
|
15
|
-
export declare const
|
16
|
-
export declare const
|
17
|
-
export declare const
|
18
|
-
export declare const
|
19
|
-
export declare const
|
20
|
-
export declare const
|
21
|
-
export declare const
|
22
|
-
export declare const
|
23
|
-
export declare const
|
24
|
-
export declare const
|
3
|
+
export declare const DEFAULT_CHART_OPTIONS: ChartOptionsPartial<any>;
|
4
|
+
export declare const DEFAULT_PADDING: Padding;
|
5
|
+
export declare const DEFAULT_CHART_PARAMS: ChartParams;
|
6
|
+
export declare const DEFAULT_CHART_WIDTH = 800;
|
7
|
+
export declare const DEFAULT_CHART_HEIGHT = 500;
|
8
|
+
export declare const DEFAULT_DATA_SERIES: DataSeries;
|
9
|
+
export declare const DEFAULT_DATA_GRID: DataGrid;
|
10
|
+
export declare const DEFAULT_DATA_MULTI_GRID: DataMultiGrid;
|
11
|
+
export declare const DEFAULT_DATA_MULTI_VALUE: DataMultiValue;
|
12
|
+
export declare const DEFAULT_DATA_TREE: DataTree;
|
13
|
+
export declare const DEFAULTL_DATA_RELATIONA: DataRelationship;
|
14
|
+
export declare const DEFAULT_DATA_FORMATTER_VALUE_AXIS: DataFormatterValueAxis;
|
15
|
+
export declare const DEFAULT_DATA_FORMATTER_GROUP_AXIS: DataFormatterGroupAxis;
|
16
|
+
export declare const DEFAULT_DATA_FORMATTER_CONTAINER: DataFormatterContainer;
|
17
|
+
export declare const DEFAULT_DATA_FORMATTER_SERIES: DataFormatterSeries;
|
18
|
+
export declare const DEFAULT_DATA_FORMATTER_GRID_GRID: DataFormatterGridGrid;
|
19
|
+
export declare const DEFAULT_DATA_FORMATTER_GRID: DataFormatterGrid;
|
20
|
+
export declare const DEFAULT_DATA_FORMATTER_MULTI_GRID_GRID: DataFormatterMultiGridGrid;
|
21
|
+
export declare const DEFAULT_DATA_FORMATTER_MULTI_GRID: DataFormatterMultiGrid;
|
22
|
+
export declare const DEFAULT_DATA_FORMATTER_MULTI_VALUE: DataFormatterMultiValue;
|
23
|
+
export declare const DEFAULT_DATA_FORMATTER_TREE: DataFormatterTree;
|
24
|
+
export declare const DEFAULT_DATA_FORMATTER_RELATIONAL: DataFormatterRelationship;
|
@@ -27,13 +27,13 @@ export declare function createMultiGridGroupLabels({ transposedDataGrid, dataFor
|
|
27
27
|
chartType?: ChartType;
|
28
28
|
gridIndex?: number;
|
29
29
|
}): string[];
|
30
|
-
export declare function
|
31
|
-
export declare function
|
32
|
-
export declare function
|
33
|
-
export declare function
|
34
|
-
export declare function
|
35
|
-
export declare function
|
36
|
-
export declare function
|
30
|
+
export declare function getMinMax(data: number[]): [number, number];
|
31
|
+
export declare function getMinMaxValue(data: DatumValue[]): [number, number];
|
32
|
+
export declare function getMinMaxSeries(data: DataSeries): [number, number];
|
33
|
+
export declare function getMinMaxGrid(data: DataGrid): [number, number];
|
34
|
+
export declare function getMinMaxMultiGrid(data: DataMultiGrid): [number, number];
|
35
|
+
export declare function getMinMaxMultiValue(data: DataMultiValue, valueIndex: number): [number, number];
|
36
|
+
export declare function getMinMaxMultiValueXY({ data, minX, maxX, minY, maxY }: {
|
37
37
|
data: ComputedLayoutDatumMultiValue[][];
|
38
38
|
minX: number;
|
39
39
|
maxX: number;
|
@@ -0,0 +1,13 @@
|
|
1
|
+
import { Observable } from 'rxjs';
|
2
|
+
import { ComputedDataRelationship, ComputedNode, ComputedEdge } from '../../lib/core-types';
|
3
|
+
|
4
|
+
export declare const categoryLabelsObservable: (CategoryNodeMap$: Observable<Map<string, ComputedNode[]>>, CategoryEdgeMap$: Observable<Map<string, ComputedEdge[]>>) => Observable<string[]>;
|
5
|
+
export declare const NodeMapObservable: (computedData$: Observable<ComputedDataRelationship>) => Observable<Map<string, ComputedNode>>;
|
6
|
+
export declare const EdgeMapObservable: (computedData$: Observable<ComputedDataRelationship>) => Observable<Map<string, ComputedEdge>>;
|
7
|
+
export declare const relationshipVisibleComputedDataObservable: ({ computedData$, NodeMap$ }: {
|
8
|
+
computedData$: Observable<ComputedDataRelationship>;
|
9
|
+
NodeMap$: Observable<Map<string, ComputedNode>>;
|
10
|
+
}) => Observable<{
|
11
|
+
nodes: ComputedNode[];
|
12
|
+
edges: ComputedEdge[];
|
13
|
+
}>;
|
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,42 +1,42 @@
|
|
1
|
-
{
|
2
|
-
"name": "@orbcharts/core",
|
3
|
-
"version": "3.0.0-beta.
|
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 production"
|
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
|
-
"@orbcharts/core-types": "^3.0.0-beta.
|
39
|
-
"d3": "^7.8.5",
|
40
|
-
"rxjs": "^7.8.1"
|
41
|
-
}
|
42
|
-
}
|
1
|
+
{
|
2
|
+
"name": "@orbcharts/core",
|
3
|
+
"version": "3.0.0-beta.6",
|
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 production"
|
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
|
+
"@orbcharts/core-types": "^3.0.0-beta.5",
|
39
|
+
"d3": "^7.8.5",
|
40
|
+
"rxjs": "^7.8.1"
|
41
|
+
}
|
42
|
+
}
|
package/src/AbstractChart.ts
CHANGED
@@ -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 {
|
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:
|
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
|
}
|
package/src/MultiGridChart.ts
CHANGED
@@ -1,25 +1,25 @@
|
|
1
|
-
import type {
|
2
|
-
ChartEntity,
|
3
|
-
ChartOptionsPartial } from '../lib/core-types'
|
4
|
-
import {
|
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:
|
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
|
}
|
package/src/MultiValueChart.ts
CHANGED
@@ -1,25 +1,25 @@
|
|
1
|
-
import type {
|
2
|
-
ChartEntity,
|
3
|
-
ChartOptionsPartial } from '../lib/core-types'
|
4
|
-
import {
|
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:
|
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
|
}
|
package/src/RelationshipChart.ts
CHANGED
@@ -1,25 +1,25 @@
|
|
1
|
-
import type {
|
2
|
-
ChartEntity,
|
3
|
-
ChartOptionsPartial } from '../lib/core-types'
|
4
|
-
import {
|
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:
|
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_RELATIONAL} 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_RELATIONAL,
|
16
|
+
dataFormatterValidator,
|
17
|
+
computedDataFn,
|
18
|
+
dataValidator,
|
19
|
+
contextObserverCallback
|
20
|
+
},
|
21
|
+
element,
|
22
|
+
options
|
23
|
+
)
|
24
|
+
}
|
25
25
|
}
|
package/src/SeriesChart.ts
CHANGED
@@ -1,25 +1,25 @@
|
|
1
|
-
import type {
|
2
|
-
ChartEntity,
|
3
|
-
ChartOptionsPartial } from '../lib/core-types'
|
4
|
-
import {
|
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:
|
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 {
|
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:
|
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
|
}
|