@orbcharts/plugins-basic 3.0.0-alpha.44 → 3.0.0-alpha.46
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/orbcharts-plugins-basic.es.js +7770 -7580
- package/dist/orbcharts-plugins-basic.umd.js +8 -8
- package/dist/src/base/BaseBarStack.d.ts +6 -4
- package/dist/src/base/BaseBars.d.ts +6 -4
- package/dist/src/base/BaseBarsTriangle.d.ts +7 -4
- package/dist/src/base/BaseDots.d.ts +5 -3
- package/dist/src/base/BaseGroupAxis.d.ts +3 -3
- package/dist/src/base/BaseLineAreas.d.ts +6 -3
- package/dist/src/base/BaseLines.d.ts +6 -3
- package/dist/src/base/BaseValueAxis.d.ts +3 -3
- package/dist/src/grid/gridObservables.d.ts +4 -4
- package/dist/src/multiGrid/multiGridObservables.d.ts +2 -6
- package/dist/src/series/plugins/PieEventTexts.d.ts +3 -1
- package/dist/src/series/seriesObservables.d.ts +21 -0
- package/dist/src/series/seriesUtils.d.ts +3 -3
- package/package.json +2 -2
- package/src/base/BaseBarStack.ts +105 -208
- package/src/base/BaseBars.ts +78 -64
- package/src/base/BaseBarsTriangle.ts +76 -63
- package/src/base/BaseDots.ts +41 -178
- package/src/base/BaseGroupAxis.ts +13 -13
- package/src/base/BaseLineAreas.ts +85 -81
- package/src/base/BaseLines.ts +82 -75
- package/src/base/BaseValueAxis.ts +14 -15
- package/src/grid/gridObservables.ts +22 -38
- package/src/grid/plugins/BarStack.ts +16 -3
- package/src/grid/plugins/Bars.ts +18 -4
- package/src/grid/plugins/BarsDiverging.ts +6 -4
- package/src/grid/plugins/BarsTriangle.ts +20 -4
- package/src/grid/plugins/Dots.ts +4 -2
- package/src/grid/plugins/GroupAux.ts +1 -2
- package/src/grid/plugins/GroupAxis.ts +15 -3
- package/src/grid/plugins/LineAreas.ts +5 -2
- package/src/grid/plugins/Lines.ts +5 -2
- package/src/grid/plugins/ScalingArea.ts +0 -1
- package/src/grid/plugins/ValueAxis.ts +15 -3
- package/src/grid/plugins/ValueStackAxis.ts +14 -5
- package/src/multiGrid/multiGridObservables.ts +14 -261
- package/src/multiGrid/plugins/MultiBarStack.ts +22 -8
- package/src/multiGrid/plugins/MultiBars.ts +21 -7
- package/src/multiGrid/plugins/MultiBarsTriangle.ts +22 -7
- package/src/multiGrid/plugins/MultiDots.ts +7 -5
- package/src/multiGrid/plugins/MultiGridLegend.ts +1 -1
- package/src/multiGrid/plugins/MultiGroupAxis.ts +19 -7
- package/src/multiGrid/plugins/MultiLineAreas.ts +9 -6
- package/src/multiGrid/plugins/MultiLines.ts +9 -6
- package/src/multiGrid/plugins/MultiValueAxis.ts +19 -7
- package/src/multiGrid/plugins/OverlappingValueAxes.ts +52 -47
- package/src/noneData/defaults.ts +3 -0
- package/src/series/defaults.ts +13 -3
- package/src/series/plugins/Bubbles.ts +139 -88
- package/src/series/plugins/Pie.ts +307 -352
- package/src/series/plugins/PieEventTexts.ts +102 -38
- package/src/series/plugins/PieLabels.ts +95 -48
- package/src/series/seriesObservables.ts +145 -0
- package/src/series/seriesUtils.ts +4 -4
- package/tsconfig.json +1 -1
@@ -1,6 +1,6 @@
|
|
1
1
|
import { Observable, Subject } from 'rxjs';
|
2
2
|
import { BasePluginFn } from './types';
|
3
|
-
import { ComputedDatumGrid, ComputedDataGrid, DataFormatterGrid, EventGrid, ChartParams,
|
3
|
+
import { ComputedDatumGrid, ComputedDataGrid, ComputedLayoutDataGrid, DataFormatterGrid, EventGrid, ChartParams, GridContainerPosition, TransformData } from '@orbcharts/core';
|
4
4
|
import * as d3 from 'd3';
|
5
5
|
export interface BaseBarStackParams {
|
6
6
|
barWidth: number;
|
@@ -10,8 +10,10 @@ export interface BaseBarStackParams {
|
|
10
10
|
interface BaseBarStackContext {
|
11
11
|
selection: d3.Selection<any, unknown, any, unknown>;
|
12
12
|
computedData$: Observable<ComputedDataGrid>;
|
13
|
+
computedLayoutData$: Observable<ComputedLayoutDataGrid>;
|
13
14
|
visibleComputedData$: Observable<ComputedDatumGrid[][]>;
|
14
|
-
|
15
|
+
visibleComputedLayoutData$: Observable<ComputedLayoutDataGrid>;
|
16
|
+
seriesLabels$: Observable<string[]>;
|
15
17
|
SeriesDataMap$: Observable<Map<string, ComputedDatumGrid[]>>;
|
16
18
|
GroupDataMap$: Observable<Map<string, ComputedDatumGrid[]>>;
|
17
19
|
fullParams$: Observable<BaseBarStackParams>;
|
@@ -25,8 +27,8 @@ interface BaseBarStackContext {
|
|
25
27
|
height: number;
|
26
28
|
}>;
|
27
29
|
gridHighlight$: Observable<ComputedDatumGrid[]>;
|
28
|
-
|
29
|
-
|
30
|
+
gridContainerPosition$: Observable<GridContainerPosition[]>;
|
31
|
+
isSeriesSeprate$: Observable<boolean>;
|
30
32
|
event$: Subject<EventGrid>;
|
31
33
|
}
|
32
34
|
export declare const createBaseBarStack: BasePluginFn<BaseBarStackContext>;
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import { Observable, Subject } from 'rxjs';
|
2
2
|
import { BasePluginFn } from './types';
|
3
|
-
import { ComputedDatumGrid, ComputedDataGrid,
|
3
|
+
import { ComputedDatumGrid, ComputedDataGrid, ComputedLayoutDataGrid, GridContainerPosition, EventGrid, ChartParams, TransformData } from '@orbcharts/core';
|
4
4
|
import * as d3 from 'd3';
|
5
5
|
export interface BaseBarsParams {
|
6
6
|
barWidth: number;
|
@@ -11,8 +11,10 @@ export interface BaseBarsParams {
|
|
11
11
|
interface BaseBarsContext {
|
12
12
|
selection: d3.Selection<any, unknown, any, unknown>;
|
13
13
|
computedData$: Observable<ComputedDataGrid>;
|
14
|
+
computedLayoutData$: Observable<ComputedLayoutDataGrid>;
|
14
15
|
visibleComputedData$: Observable<ComputedDatumGrid[][]>;
|
15
|
-
|
16
|
+
visibleComputedLayoutData$: Observable<ComputedLayoutDataGrid>;
|
17
|
+
seriesLabels$: Observable<string[]>;
|
16
18
|
SeriesDataMap$: Observable<Map<string, ComputedDatumGrid[]>>;
|
17
19
|
GroupDataMap$: Observable<Map<string, ComputedDatumGrid[]>>;
|
18
20
|
fullParams$: Observable<BaseBarsParams>;
|
@@ -25,8 +27,8 @@ interface BaseBarsContext {
|
|
25
27
|
height: number;
|
26
28
|
}>;
|
27
29
|
gridHighlight$: Observable<ComputedDatumGrid[]>;
|
28
|
-
|
29
|
-
|
30
|
+
gridContainerPosition$: Observable<GridContainerPosition[]>;
|
31
|
+
isSeriesSeprate$: Observable<boolean>;
|
30
32
|
event$: Subject<EventGrid>;
|
31
33
|
}
|
32
34
|
export declare const createBaseBars: BasePluginFn<BaseBarsContext>;
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import { Observable, Subject } from 'rxjs';
|
2
2
|
import { BasePluginFn } from './types';
|
3
|
-
import { ComputedDatumGrid, ComputedDataGrid, EventGrid, ChartParams,
|
3
|
+
import { ComputedDatumGrid, ComputedDataGrid, ComputedLayoutDataGrid, DataFormatterTypeMap, EventGrid, ChartParams, GridContainerPosition, TransformData } from '@orbcharts/core';
|
4
4
|
import * as d3 from 'd3';
|
5
5
|
export interface BaseBarsTriangleParams {
|
6
6
|
barWidth: number;
|
@@ -11,8 +11,11 @@ export interface BaseBarsTriangleParams {
|
|
11
11
|
interface BaseBarsContext {
|
12
12
|
selection: d3.Selection<any, unknown, any, unknown>;
|
13
13
|
computedData$: Observable<ComputedDataGrid>;
|
14
|
+
computedLayoutData$: Observable<ComputedLayoutDataGrid>;
|
14
15
|
visibleComputedData$: Observable<ComputedDatumGrid[][]>;
|
15
|
-
|
16
|
+
visibleComputedLayoutData$: Observable<ComputedLayoutDataGrid>;
|
17
|
+
fullDataFormatter$: Observable<DataFormatterTypeMap<'grid'>>;
|
18
|
+
seriesLabels$: Observable<string[]>;
|
16
19
|
SeriesDataMap$: Observable<Map<string, ComputedDatumGrid[]>>;
|
17
20
|
GroupDataMap$: Observable<Map<string, ComputedDatumGrid[]>>;
|
18
21
|
fullParams$: Observable<BaseBarsTriangleParams>;
|
@@ -24,8 +27,8 @@ interface BaseBarsContext {
|
|
24
27
|
height: number;
|
25
28
|
}>;
|
26
29
|
gridHighlight$: Observable<ComputedDatumGrid[]>;
|
27
|
-
|
28
|
-
|
30
|
+
gridContainerPosition$: Observable<GridContainerPosition[]>;
|
31
|
+
isSeriesSeprate$: Observable<boolean>;
|
29
32
|
event$: Subject<EventGrid>;
|
30
33
|
}
|
31
34
|
export declare const createBaseBarsTriangle: BasePluginFn<BaseBarsContext>;
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import { Observable, Subject } from 'rxjs';
|
2
2
|
import { BasePluginFn } from './types';
|
3
|
-
import { ComputedDatumGrid, ComputedDataGrid, EventGrid, ChartParams,
|
3
|
+
import { ComputedDatumGrid, ComputedDataGrid, ComputedLayoutDataGrid, EventGrid, ChartParams, GridContainerPosition, TransformData, ColorType } from '@orbcharts/core';
|
4
4
|
import * as d3 from 'd3';
|
5
5
|
export interface BaseDotsParams {
|
6
6
|
radius: number;
|
@@ -12,8 +12,10 @@ export interface BaseDotsParams {
|
|
12
12
|
interface BaseDotsContext {
|
13
13
|
selection: d3.Selection<any, unknown, any, unknown>;
|
14
14
|
computedData$: Observable<ComputedDataGrid>;
|
15
|
+
computedLayoutData$: Observable<ComputedLayoutDataGrid>;
|
15
16
|
visibleComputedData$: Observable<ComputedDatumGrid[][]>;
|
16
|
-
|
17
|
+
visibleComputedLayoutData$: Observable<ComputedLayoutDataGrid>;
|
18
|
+
seriesLabels$: Observable<string[]>;
|
17
19
|
SeriesDataMap$: Observable<Map<string, ComputedDatumGrid[]>>;
|
18
20
|
GroupDataMap$: Observable<Map<string, ComputedDatumGrid[]>>;
|
19
21
|
fullParams$: Observable<BaseDotsParams>;
|
@@ -26,7 +28,7 @@ interface BaseDotsContext {
|
|
26
28
|
height: number;
|
27
29
|
}>;
|
28
30
|
gridHighlight$: Observable<ComputedDatumGrid[]>;
|
29
|
-
|
31
|
+
gridContainerPosition$: Observable<GridContainerPosition[]>;
|
30
32
|
event$: Subject<EventGrid>;
|
31
33
|
}
|
32
34
|
export declare const createBaseDots: BasePluginFn<BaseDotsContext>;
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import { Observable } from 'rxjs';
|
2
|
-
import { ColorType, ComputedDataGrid,
|
2
|
+
import { ColorType, ComputedDataGrid, GridContainerPosition, DataFormatterGrid, ChartParams, TransformData } from '@orbcharts/core';
|
3
3
|
import { BasePluginFn } from './types';
|
4
4
|
import * as d3 from 'd3';
|
5
5
|
export interface BaseGroupAxisParams {
|
@@ -28,8 +28,8 @@ interface BaseGroupAxisContext {
|
|
28
28
|
width: number;
|
29
29
|
height: number;
|
30
30
|
}>;
|
31
|
-
|
32
|
-
|
31
|
+
gridContainerPosition$: Observable<GridContainerPosition[]>;
|
32
|
+
isSeriesSeprate$: Observable<boolean>;
|
33
33
|
}
|
34
34
|
export declare const createBaseGroupAxis: BasePluginFn<BaseGroupAxisContext>;
|
35
35
|
export {};
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import { Observable, Subject } from 'rxjs';
|
2
2
|
import { BasePluginFn } from './types';
|
3
|
-
import { ComputedDatumGrid, ComputedDataGrid, DataFormatterGrid, EventGrid,
|
3
|
+
import { ComputedDatumGrid, ComputedDataGrid, ComputedLayoutDataGrid, DataFormatterGrid, EventGrid, GridContainerPosition, ChartParams, Layout, TransformData } from '@orbcharts/core';
|
4
4
|
import * as d3 from 'd3';
|
5
5
|
export interface BaseLineAreasParams {
|
6
6
|
lineCurve: string;
|
@@ -9,7 +9,10 @@ export interface BaseLineAreasParams {
|
|
9
9
|
interface BaseLineAreasContext {
|
10
10
|
selection: d3.Selection<any, unknown, any, unknown>;
|
11
11
|
computedData$: Observable<ComputedDataGrid>;
|
12
|
-
|
12
|
+
computedLayoutData$: Observable<ComputedLayoutDataGrid>;
|
13
|
+
visibleComputedData$: Observable<ComputedDatumGrid[][]>;
|
14
|
+
visibleComputedLayoutData$: Observable<ComputedLayoutDataGrid>;
|
15
|
+
seriesLabels$: Observable<string[]>;
|
13
16
|
SeriesDataMap$: Observable<Map<string, ComputedDatumGrid[]>>;
|
14
17
|
GroupDataMap$: Observable<Map<string, ComputedDatumGrid[]>>;
|
15
18
|
fullDataFormatter$: Observable<DataFormatterGrid>;
|
@@ -22,7 +25,7 @@ interface BaseLineAreasContext {
|
|
22
25
|
height: number;
|
23
26
|
}>;
|
24
27
|
gridHighlight$: Observable<ComputedDatumGrid[]>;
|
25
|
-
|
28
|
+
gridContainerPosition$: Observable<GridContainerPosition[]>;
|
26
29
|
layout$: Observable<Layout>;
|
27
30
|
event$: Subject<EventGrid>;
|
28
31
|
}
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import { Observable, Subject } from 'rxjs';
|
2
2
|
import { BasePluginFn } from './types';
|
3
|
-
import { ComputedDatumGrid, ComputedDataGrid, DataFormatterGrid, EventGrid,
|
3
|
+
import { ComputedDatumGrid, ComputedDataGrid, ComputedLayoutDataGrid, DataFormatterGrid, EventGrid, GridContainerPosition, ChartParams, TransformData } from '@orbcharts/core';
|
4
4
|
import * as d3 from 'd3';
|
5
5
|
export interface BaseLinesParams {
|
6
6
|
lineCurve: string;
|
@@ -9,7 +9,10 @@ export interface BaseLinesParams {
|
|
9
9
|
interface BaseLinesContext {
|
10
10
|
selection: d3.Selection<any, unknown, any, unknown>;
|
11
11
|
computedData$: Observable<ComputedDataGrid>;
|
12
|
-
|
12
|
+
computedLayoutData$: Observable<ComputedLayoutDataGrid>;
|
13
|
+
visibleComputedData$: Observable<ComputedDatumGrid[][]>;
|
14
|
+
visibleComputedLayoutData$: Observable<ComputedLayoutDataGrid>;
|
15
|
+
seriesLabels$: Observable<string[]>;
|
13
16
|
SeriesDataMap$: Observable<Map<string, ComputedDatumGrid[]>>;
|
14
17
|
GroupDataMap$: Observable<Map<string, ComputedDatumGrid[]>>;
|
15
18
|
fullDataFormatter$: Observable<DataFormatterGrid>;
|
@@ -22,7 +25,7 @@ interface BaseLinesContext {
|
|
22
25
|
height: number;
|
23
26
|
}>;
|
24
27
|
gridHighlight$: Observable<ComputedDatumGrid[]>;
|
25
|
-
|
28
|
+
gridContainerPosition$: Observable<GridContainerPosition[]>;
|
26
29
|
event$: Subject<EventGrid>;
|
27
30
|
}
|
28
31
|
export declare const createBaseLines: BasePluginFn<BaseLinesContext>;
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import { Observable } from 'rxjs';
|
2
2
|
import { BasePluginFn } from './types';
|
3
|
-
import { ComputedDataGrid, DataFormatterGrid, ChartParams,
|
3
|
+
import { ComputedDataGrid, DataFormatterGrid, ChartParams, GridContainerPosition, TransformData, ColorType } from '@orbcharts/core';
|
4
4
|
import * as d3 from 'd3';
|
5
5
|
export interface BaseValueAxisParams {
|
6
6
|
labelOffset: [number, number];
|
@@ -29,8 +29,8 @@ interface BaseLinesContext {
|
|
29
29
|
width: number;
|
30
30
|
height: number;
|
31
31
|
}>;
|
32
|
-
|
33
|
-
|
32
|
+
gridContainerPosition$: Observable<GridContainerPosition[]>;
|
33
|
+
isSeriesSeprate$: Observable<boolean>;
|
34
34
|
}
|
35
35
|
export declare const createBaseValueAxis: BasePluginFn<BaseLinesContext>;
|
36
36
|
export {};
|
@@ -1,12 +1,12 @@
|
|
1
1
|
import { Observable } from 'rxjs';
|
2
|
-
import { ChartParams, DataFormatterGrid, ComputedDataGrid, TransformData,
|
2
|
+
import { ChartParams, DataFormatterGrid, ComputedDataGrid, TransformData, GridContainerPosition } from '@orbcharts/core';
|
3
3
|
import * as d3 from 'd3';
|
4
|
-
export declare const gridSelectionsObservable: ({ selection, pluginName, clipPathID,
|
4
|
+
export declare const gridSelectionsObservable: ({ selection, pluginName, clipPathID, seriesLabels$, gridContainerPosition$, gridAxesTransform$, gridGraphicTransform$ }: {
|
5
5
|
selection: d3.Selection<any, unknown, any, unknown>;
|
6
6
|
pluginName: string;
|
7
7
|
clipPathID: string;
|
8
|
-
|
9
|
-
|
8
|
+
seriesLabels$: Observable<string[]>;
|
9
|
+
gridContainerPosition$: Observable<GridContainerPosition[]>;
|
10
10
|
gridAxesTransform$: Observable<TransformData>;
|
11
11
|
gridGraphicTransform$: Observable<TransformData>;
|
12
12
|
}) => {
|
@@ -1,12 +1,8 @@
|
|
1
1
|
import { Observable } from 'rxjs';
|
2
|
-
import { ContextObserverMultiGrid,
|
2
|
+
import { ContextObserverMultiGrid, ContextObserverMultiGridDetail } from '@orbcharts/core';
|
3
3
|
|
4
4
|
interface MultiGridPluginParams {
|
5
5
|
gridIndexes: number[];
|
6
6
|
}
|
7
|
-
|
8
|
-
gridComputedData$: Observable<ComputedDataGrid>;
|
9
|
-
gridDataFormatter$: Observable<DataFormatterGrid>;
|
10
|
-
}
|
11
|
-
export declare const multiGridDetailObservables: (observer: ContextObserverMultiGrid<MultiGridPluginParams>) => Observable<MultiGridDetailObservables[]>;
|
7
|
+
export declare const multiGridPluginObservables: (observer: ContextObserverMultiGrid<MultiGridPluginParams>) => Observable<ContextObserverMultiGridDetail[]>;
|
12
8
|
export {};
|
@@ -1 +1,3 @@
|
|
1
|
-
|
1
|
+
import { PieEventTextsParams } from '../types';
|
2
|
+
|
3
|
+
export declare const PieEventTexts: import('@orbcharts/core').PluginConstructor<"series", string, PieEventTextsParams>;
|
@@ -0,0 +1,21 @@
|
|
1
|
+
import { Observable } from 'rxjs';
|
2
|
+
import { SeriesContainerPosition } from '@orbcharts/core';
|
3
|
+
import * as d3 from 'd3';
|
4
|
+
export declare const seriesStartSelectionObservable: ({ selection, pluginName, separateSeries$, seriesLabels$, seriesContainerPosition$ }: {
|
5
|
+
selection: d3.Selection<any, unknown, any, unknown>;
|
6
|
+
pluginName: string;
|
7
|
+
separateSeries$: Observable<boolean>;
|
8
|
+
seriesLabels$: Observable<string[]>;
|
9
|
+
seriesContainerPosition$: Observable<SeriesContainerPosition[]>;
|
10
|
+
}) => {
|
11
|
+
seriesStartSelection$: Observable<d3.Selection<SVGGElement, string, any, unknown>>;
|
12
|
+
};
|
13
|
+
export declare const seriesCenterSelectionObservable: ({ selection, pluginName, separateSeries$, seriesLabels$, seriesContainerPosition$ }: {
|
14
|
+
selection: d3.Selection<any, unknown, any, unknown>;
|
15
|
+
pluginName: string;
|
16
|
+
separateSeries$: Observable<boolean>;
|
17
|
+
seriesLabels$: Observable<string[]>;
|
18
|
+
seriesContainerPosition$: Observable<SeriesContainerPosition[]>;
|
19
|
+
}) => {
|
20
|
+
seriesCenterSelection$: Observable<d3.Selection<SVGGElement, string, any, unknown>>;
|
21
|
+
};
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import {
|
1
|
+
import { ComputedDatumSeries } from '@orbcharts/core';
|
2
2
|
|
3
3
|
export interface D3PieDatum {
|
4
4
|
data: any;
|
@@ -12,8 +12,8 @@ export interface PieDatum extends D3PieDatum {
|
|
12
12
|
data: ComputedDatumSeries;
|
13
13
|
id: string;
|
14
14
|
}
|
15
|
-
export declare function makePieData({
|
16
|
-
|
15
|
+
export declare function makePieData({ data, startAngle, endAngle }: {
|
16
|
+
data: ComputedDatumSeries[];
|
17
17
|
startAngle: number;
|
18
18
|
endAngle: number;
|
19
19
|
}): PieDatum[];
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@orbcharts/plugins-basic",
|
3
|
-
"version": "3.0.0-alpha.
|
3
|
+
"version": "3.0.0-alpha.46",
|
4
4
|
"description": "plugins for OrbCharts",
|
5
5
|
"author": "Blue Planet Inc.",
|
6
6
|
"license": "Apache-2.0",
|
@@ -35,7 +35,7 @@
|
|
35
35
|
"vite-plugin-dts": "^3.7.3"
|
36
36
|
},
|
37
37
|
"dependencies": {
|
38
|
-
"@orbcharts/core": "^3.0.0-alpha.
|
38
|
+
"@orbcharts/core": "^3.0.0-alpha.44",
|
39
39
|
"d3": "^7.8.5",
|
40
40
|
"rxjs": "^7.8.1"
|
41
41
|
}
|