@orbcharts/plugins-basic 3.0.0-alpha.30 → 3.0.0-alpha.32
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/orbcharts-plugins-basic.es.js +15995 -15706
- package/dist/orbcharts-plugins-basic.umd.js +8 -8
- package/dist/src/base/BaseBarStack.d.ts +29 -0
- package/dist/src/base/BaseBars.d.ts +29 -0
- package/dist/src/base/BaseBarsTriangle.d.ts +28 -0
- package/dist/src/base/BaseLegend.d.ts +17 -6
- package/dist/src/base/BaseLines.d.ts +27 -0
- package/dist/src/base/types.d.ts +2 -2
- package/dist/src/grid/defaults.d.ts +10 -10
- package/dist/src/grid/plugins/BarStack.d.ts +1 -3
- package/dist/src/grid/plugins/Bars.d.ts +1 -3
- package/dist/src/grid/plugins/BarsTriangle.d.ts +1 -3
- package/dist/src/grid/plugins/Lines.d.ts +1 -3
- package/dist/src/grid/types.d.ts +10 -2
- package/dist/src/index.d.ts +1 -0
- package/dist/src/multiGrid/defaults.d.ts +4 -0
- package/dist/src/multiGrid/index.d.ts +4 -0
- package/dist/src/multiGrid/plugins/BarsAndLines.d.ts +1 -0
- package/dist/src/multiGrid/plugins/MultiGridLegend.d.ts +1 -0
- package/dist/src/multiGrid/types.d.ts +24 -0
- package/dist/src/series/defaults.d.ts +2 -2
- package/dist/src/series/types.d.ts +10 -2
- package/package.json +2 -2
- package/src/base/BaseBarStack.ts +699 -0
- package/src/base/BaseBars.ts +639 -0
- package/src/base/BaseBarsTriangle.ts +626 -0
- package/src/base/BaseLegend.ts +50 -20
- package/src/base/BaseLines.ts +566 -0
- package/src/base/types.ts +2 -2
- package/src/grid/defaults.ts +10 -10
- package/src/grid/plugins/BarStack.ts +18 -645
- package/src/grid/plugins/Bars.ts +17 -588
- package/src/grid/plugins/BarsTriangle.ts +16 -579
- package/src/grid/plugins/Dots.ts +2 -2
- package/src/grid/plugins/GridLegend.ts +19 -1
- package/src/grid/plugins/GroupArea.ts +2 -2
- package/src/grid/plugins/GroupAxis.ts +2 -2
- package/src/grid/plugins/Lines.ts +15 -509
- package/src/grid/plugins/ScalingArea.ts +2 -2
- package/src/grid/plugins/ValueAxis.ts +2 -2
- package/src/grid/plugins/ValueStackAxis.ts +2 -2
- package/src/grid/types.ts +12 -2
- package/src/index.ts +1 -0
- package/src/multiGrid/defaults.ts +33 -0
- package/src/multiGrid/index.ts +4 -0
- package/src/multiGrid/plugins/BarsAndLines.ts +110 -0
- package/src/multiGrid/plugins/BarsTriangleAndLines.ts +0 -0
- package/src/multiGrid/plugins/DivergingValueAxes.ts +0 -0
- package/src/multiGrid/plugins/FirstGroupScaleAxis.ts +0 -0
- package/src/multiGrid/plugins/MultiGridLegend.ts +89 -0
- package/src/multiGrid/plugins/TwoValueScaleAxes.ts +0 -0
- package/src/multiGrid/types.ts +27 -0
- package/src/series/defaults.ts +2 -2
- package/src/series/plugins/Bubbles.ts +2 -2
- package/src/series/plugins/Pie.ts +2 -2
- package/src/series/plugins/SeriesLegend.ts +19 -1
- package/src/series/types.ts +12 -2
- /package/dist/src/multiGrid/plugins/{DivergingAxes.d.ts → BarStackAndLines.d.ts} +0 -0
- /package/dist/src/multiGrid/plugins/{TwoScaleAxes.d.ts → BarsTriangleAndLines.d.ts} +0 -0
- /package/dist/src/multiGrid/plugins/{TwoScales.d.ts → DivergingValueAxes.d.ts} +0 -0
- /package/{src/multiGrid/plugins/DivergingAxes.ts → dist/src/multiGrid/plugins/FirstGroupScaleAxis.d.ts} +0 -0
- /package/{src/multiGrid/plugins/TwoScaleAxes.ts → dist/src/multiGrid/plugins/TwoValueScaleAxes.d.ts} +0 -0
- /package/src/multiGrid/plugins/{TwoScales.ts → BarStackAndLines.ts} +0 -0
@@ -0,0 +1,29 @@
|
|
1
|
+
import { Observable, Subject } from 'rxjs';
|
2
|
+
import { BasePluginFn } from './types';
|
3
|
+
import { ComputedDatumGrid, ComputedDataGrid, DataFormatterGrid, EventGrid, ChartParams, TransformData } from '@orbcharts/core';
|
4
|
+
import * as d3 from 'd3';
|
5
|
+
export interface BaseBarStackParams {
|
6
|
+
barWidth: number;
|
7
|
+
barGroupPadding: number;
|
8
|
+
barRadius: number | boolean;
|
9
|
+
}
|
10
|
+
interface BaseBarStackContext {
|
11
|
+
selection: d3.Selection<any, unknown, any, unknown>;
|
12
|
+
computedData$: Observable<ComputedDataGrid>;
|
13
|
+
visibleComputedData$: Observable<ComputedDatumGrid[][]>;
|
14
|
+
SeriesDataMap$: Observable<Map<string, ComputedDatumGrid[]>>;
|
15
|
+
GroupDataMap$: Observable<Map<string, ComputedDatumGrid[]>>;
|
16
|
+
fullParams$: Observable<BaseBarStackParams>;
|
17
|
+
fullDataFormatter$: Observable<DataFormatterGrid>;
|
18
|
+
fullChartParams$: Observable<ChartParams>;
|
19
|
+
gridAxesTransform$: Observable<TransformData>;
|
20
|
+
gridGraphicTransform$: Observable<TransformData>;
|
21
|
+
gridAxesSize$: Observable<{
|
22
|
+
width: number;
|
23
|
+
height: number;
|
24
|
+
}>;
|
25
|
+
gridHighlight$: Observable<string[]>;
|
26
|
+
event$: Subject<EventGrid>;
|
27
|
+
}
|
28
|
+
export declare const createBaseBarStack: BasePluginFn<BaseBarStackContext>;
|
29
|
+
export {};
|
@@ -0,0 +1,29 @@
|
|
1
|
+
import { Observable, Subject } from 'rxjs';
|
2
|
+
import { BasePluginFn } from './types';
|
3
|
+
import { ComputedDatumGrid, ComputedDataGrid, EventGrid, ChartParams, TransformData } from '@orbcharts/core';
|
4
|
+
import * as d3 from 'd3';
|
5
|
+
export interface BaseBarsParams {
|
6
|
+
barWidth: number;
|
7
|
+
barPadding: number;
|
8
|
+
barGroupPadding: number;
|
9
|
+
barRadius: number | boolean;
|
10
|
+
}
|
11
|
+
interface BaseBarsContext {
|
12
|
+
selection: d3.Selection<any, unknown, any, unknown>;
|
13
|
+
computedData$: Observable<ComputedDataGrid>;
|
14
|
+
visibleComputedData$: Observable<ComputedDatumGrid[][]>;
|
15
|
+
SeriesDataMap$: Observable<Map<string, ComputedDatumGrid[]>>;
|
16
|
+
GroupDataMap$: Observable<Map<string, ComputedDatumGrid[]>>;
|
17
|
+
fullParams$: Observable<BaseBarsParams>;
|
18
|
+
fullChartParams$: Observable<ChartParams>;
|
19
|
+
gridAxesTransform$: Observable<TransformData>;
|
20
|
+
gridGraphicTransform$: Observable<TransformData>;
|
21
|
+
gridAxesSize$: Observable<{
|
22
|
+
width: number;
|
23
|
+
height: number;
|
24
|
+
}>;
|
25
|
+
gridHighlight$: Observable<string[]>;
|
26
|
+
event$: Subject<EventGrid>;
|
27
|
+
}
|
28
|
+
export declare const createBaseBars: BasePluginFn<BaseBarsContext>;
|
29
|
+
export {};
|
@@ -0,0 +1,28 @@
|
|
1
|
+
import { Observable, Subject } from 'rxjs';
|
2
|
+
import { BasePluginFn } from './types';
|
3
|
+
import { ComputedDatumGrid, ComputedDataGrid, EventGrid, ChartParams, TransformData } from '@orbcharts/core';
|
4
|
+
import * as d3 from 'd3';
|
5
|
+
export interface BaseBarsTriangleParams {
|
6
|
+
barWidth: number;
|
7
|
+
barPadding: number;
|
8
|
+
barGroupPadding: number;
|
9
|
+
linearGradientOpacity: [number, number];
|
10
|
+
}
|
11
|
+
interface BaseBarsContext {
|
12
|
+
selection: d3.Selection<any, unknown, any, unknown>;
|
13
|
+
computedData$: Observable<ComputedDataGrid>;
|
14
|
+
SeriesDataMap$: Observable<Map<string, ComputedDatumGrid[]>>;
|
15
|
+
GroupDataMap$: Observable<Map<string, ComputedDatumGrid[]>>;
|
16
|
+
fullParams$: Observable<BaseBarsTriangleParams>;
|
17
|
+
fullChartParams$: Observable<ChartParams>;
|
18
|
+
gridAxesTransform$: Observable<TransformData>;
|
19
|
+
gridGraphicTransform$: Observable<TransformData>;
|
20
|
+
gridAxesSize$: Observable<{
|
21
|
+
width: number;
|
22
|
+
height: number;
|
23
|
+
}>;
|
24
|
+
gridHighlight$: Observable<string[]>;
|
25
|
+
event$: Subject<EventGrid>;
|
26
|
+
}
|
27
|
+
export declare const createBaseBarsTriangle: BasePluginFn<BaseBarsContext>;
|
28
|
+
export {};
|
@@ -1,6 +1,7 @@
|
|
1
|
+
import { Observable } from 'rxjs';
|
1
2
|
import { BasePluginFn } from './types';
|
2
|
-
import { ColorType } from '@orbcharts/core';
|
3
|
-
|
3
|
+
import { ChartParams, Layout, ColorType } from '@orbcharts/core';
|
4
|
+
import * as d3 from 'd3';
|
4
5
|
export interface BaseLegendParams {
|
5
6
|
position: 'top' | 'bottom' | 'left' | 'right';
|
6
7
|
justify: 'start' | 'center' | 'end';
|
@@ -8,8 +9,18 @@ export interface BaseLegendParams {
|
|
8
9
|
backgroundFill: ColorType;
|
9
10
|
backgroundStroke: ColorType;
|
10
11
|
gap: number;
|
11
|
-
|
12
|
-
|
13
|
-
|
12
|
+
seriesList: Array<{
|
13
|
+
listRectWidth: number;
|
14
|
+
listRectHeight: number;
|
15
|
+
listRectRadius: number;
|
16
|
+
}>;
|
14
17
|
}
|
15
|
-
|
18
|
+
interface BaseLegendContext {
|
19
|
+
rootSelection: d3.Selection<any, unknown, any, unknown>;
|
20
|
+
seriesLabels$: Observable<string[]>;
|
21
|
+
fullParams$: Observable<BaseLegendParams>;
|
22
|
+
layout$: Observable<Layout>;
|
23
|
+
fullChartParams$: Observable<ChartParams>;
|
24
|
+
}
|
25
|
+
export declare const createBaseLegend: BasePluginFn<BaseLegendContext>;
|
26
|
+
export {};
|
@@ -0,0 +1,27 @@
|
|
1
|
+
import { Observable, Subject } from 'rxjs';
|
2
|
+
import { BasePluginFn } from './types';
|
3
|
+
import { ComputedDatumGrid, ComputedDataGrid, DataFormatterGrid, EventGrid, ChartParams, TransformData } from '@orbcharts/core';
|
4
|
+
import * as d3 from 'd3';
|
5
|
+
export interface BaseLinesParams {
|
6
|
+
lineCurve: string;
|
7
|
+
lineWidth: number;
|
8
|
+
}
|
9
|
+
interface BaseLinesContext {
|
10
|
+
selection: d3.Selection<any, unknown, any, unknown>;
|
11
|
+
computedData$: Observable<ComputedDataGrid>;
|
12
|
+
SeriesDataMap$: Observable<Map<string, ComputedDatumGrid[]>>;
|
13
|
+
GroupDataMap$: Observable<Map<string, ComputedDatumGrid[]>>;
|
14
|
+
fullDataFormatter$: Observable<DataFormatterGrid>;
|
15
|
+
fullParams$: Observable<BaseLinesParams>;
|
16
|
+
fullChartParams$: Observable<ChartParams>;
|
17
|
+
gridAxesTransform$: Observable<TransformData>;
|
18
|
+
gridGraphicTransform$: Observable<TransformData>;
|
19
|
+
gridAxesSize$: Observable<{
|
20
|
+
width: number;
|
21
|
+
height: number;
|
22
|
+
}>;
|
23
|
+
gridHighlight$: Observable<string[]>;
|
24
|
+
event$: Subject<EventGrid>;
|
25
|
+
}
|
26
|
+
export declare const createBaseLines: BasePluginFn<BaseLinesContext>;
|
27
|
+
export {};
|
package/dist/src/base/types.d.ts
CHANGED
@@ -1,3 +1,3 @@
|
|
1
|
-
export interface BasePluginFn {
|
2
|
-
(pluginName: string, context:
|
1
|
+
export interface BasePluginFn<Context> {
|
2
|
+
(pluginName: string, context: Context): () => void;
|
3
3
|
}
|
@@ -1,13 +1,13 @@
|
|
1
1
|
import { LinesParams, GroupAreaParams, DotsParams, BarsParams, BarStackParams, BarsTriangleParams, GroupAxisParams, ValueAxisParams, ValueStackAxisParams, ScalingAreaParams, GridLegendParams } from './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
|
3
|
+
export declare const DEFAULT_LINES_PARAMS: LinesParams;
|
4
|
+
export declare const DEFAULT_DOTS_PARAMS: DotsParams;
|
5
|
+
export declare const DEFAULT_GROUP_AREA_PARAMS: GroupAreaParams;
|
6
|
+
export declare const DEFAULT_BARS_PARAMS: BarsParams;
|
7
|
+
export declare const DEFAULT_BAR_STACK_PARAMS: BarStackParams;
|
8
|
+
export declare const DEFAULT_BARS_TRIANGLE_PARAMS: BarsTriangleParams;
|
9
|
+
export declare const DEFAULT_GROUPING_AXIS_PARAMS: GroupAxisParams;
|
10
|
+
export declare const DEFAULT_VALUE_AXIS_PARAMS: ValueAxisParams;
|
11
|
+
export declare const DEFAULT_VALUE_STACK_AXIS_PARAMS: ValueStackAxisParams;
|
12
|
+
export declare const DEFAULT_SCALING_AREA_PARAMS: ScalingAreaParams;
|
13
13
|
export declare const DEFAULT_GRID_LEGEND_PARAMS: GridLegendParams;
|
@@ -1,3 +1 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
export declare const BarStack: import('@orbcharts/core').PluginConstructor<"grid", string, BarStackParams>;
|
1
|
+
export declare const BarStack: import('@orbcharts/core').PluginConstructor<"grid", string, import('..').BarStackParams>;
|
@@ -1,3 +1 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
export declare const BarsTriangle: import('@orbcharts/core').PluginConstructor<"grid", string, BarsTriangleParams>;
|
1
|
+
export declare const BarsTriangle: import('@orbcharts/core').PluginConstructor<"grid", string, import('..').BarsTriangleParams>;
|
package/dist/src/grid/types.d.ts
CHANGED
@@ -1,5 +1,4 @@
|
|
1
1
|
import { ColorType } from '@orbcharts/core';
|
2
|
-
import { BaseLegendParams } from '../base/BaseLegend';
|
3
2
|
|
4
3
|
export interface LinesParams {
|
5
4
|
lineCurve: string;
|
@@ -72,5 +71,14 @@ export interface ValueStackAxisParams extends ValueAxisParams {
|
|
72
71
|
}
|
73
72
|
export interface ScalingAreaParams {
|
74
73
|
}
|
75
|
-
export interface GridLegendParams
|
74
|
+
export interface GridLegendParams {
|
75
|
+
position: 'top' | 'bottom' | 'left' | 'right';
|
76
|
+
justify: 'start' | 'center' | 'end';
|
77
|
+
padding: number;
|
78
|
+
backgroundFill: ColorType;
|
79
|
+
backgroundStroke: ColorType;
|
80
|
+
gap: number;
|
81
|
+
listRectWidth: number;
|
82
|
+
listRectHeight: number;
|
83
|
+
listRectRadius: number;
|
76
84
|
}
|
package/dist/src/index.d.ts
CHANGED
@@ -0,0 +1 @@
|
|
1
|
+
export declare const BarsAndLines: import('@orbcharts/core').PluginConstructor<"multiGrid", string, import('..').BarsAndLinesParams>;
|
@@ -0,0 +1 @@
|
|
1
|
+
export declare const MultiGridLegend: import('@orbcharts/core').PluginConstructor<"multiGrid", string, import('..').MultiGridLegendParams>;
|
@@ -0,0 +1,24 @@
|
|
1
|
+
import { BaseBarsParams } from '../base/BaseBars';
|
2
|
+
import { BaseLinesParams } from '../base/BaseLines';
|
3
|
+
import { ColorType } from '@orbcharts/core';
|
4
|
+
|
5
|
+
export interface BarsAndLinesParams {
|
6
|
+
bars: BaseBarsParams;
|
7
|
+
lines: BaseLinesParams;
|
8
|
+
}
|
9
|
+
export interface MultiGridLegendParams {
|
10
|
+
position: 'top' | 'bottom' | 'left' | 'right';
|
11
|
+
justify: 'start' | 'center' | 'end';
|
12
|
+
padding: number;
|
13
|
+
backgroundFill: ColorType;
|
14
|
+
backgroundStroke: ColorType;
|
15
|
+
gap: number;
|
16
|
+
listRectWidth: number;
|
17
|
+
listRectHeight: number;
|
18
|
+
listRectRadius: number;
|
19
|
+
gridList: Array<{
|
20
|
+
listRectWidth: number;
|
21
|
+
listRectHeight: number;
|
22
|
+
listRectRadius: number;
|
23
|
+
}>;
|
24
|
+
}
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import { BubblesParams, PieParams, PieEventTextsParams, PieLabelsParams, SeriesLegendParams } from './types';
|
2
2
|
|
3
|
-
export declare const
|
4
|
-
export declare const
|
3
|
+
export declare const DEFAULT_BUBBLES_PARAMS: BubblesParams;
|
4
|
+
export declare const DEFAULT_PIE_PARAMS: PieParams;
|
5
5
|
export declare const DEFAULT_PIE_EVENT_TEXTS_PARAMS: PieEventTextsParams;
|
6
6
|
export declare const DEFAULT_PIE_LABELS_PARAMS: PieLabelsParams;
|
7
7
|
export declare const DEFAULT_SERIES_LEGEND_PARAMS: SeriesLegendParams;
|
@@ -1,5 +1,4 @@
|
|
1
1
|
import { ComputedDatumSeries, EventSeries, EventName, ColorType } from '@orbcharts/core';
|
2
|
-
import { BaseLegendParams } from '../base/BaseLegend';
|
3
2
|
|
4
3
|
export type BubbleScaleType = 'area' | 'radius';
|
5
4
|
export interface BubblesParams {
|
@@ -44,5 +43,14 @@ export interface PieLabelsParams {
|
|
44
43
|
labelFn: ((d: ComputedDatumSeries) => string);
|
45
44
|
labelColorType: ColorType;
|
46
45
|
}
|
47
|
-
export interface SeriesLegendParams
|
46
|
+
export interface SeriesLegendParams {
|
47
|
+
position: 'top' | 'bottom' | 'left' | 'right';
|
48
|
+
justify: 'start' | 'center' | 'end';
|
49
|
+
padding: number;
|
50
|
+
backgroundFill: ColorType;
|
51
|
+
backgroundStroke: ColorType;
|
52
|
+
gap: number;
|
53
|
+
listRectWidth: number;
|
54
|
+
listRectHeight: number;
|
55
|
+
listRectRadius: number;
|
48
56
|
}
|
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.32",
|
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.29",
|
39
39
|
"d3": "^7.8.5",
|
40
40
|
"rxjs": "^7.8.1"
|
41
41
|
}
|