@orbcharts/plugins-basic 3.0.0-alpha.24 → 3.0.0-alpha.25
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/orbcharts-plugins-basic.es.js +20211 -0
- package/dist/orbcharts-plugins-basic.umd.js +12 -0
- package/dist/src/grid/defaults.d.ts +12 -0
- package/dist/src/grid/gridObservables.d.ts +15 -0
- package/dist/src/grid/index.d.ts +12 -0
- package/dist/src/grid/plugins/BarStack.d.ts +3 -0
- package/dist/src/grid/plugins/Bars.d.ts +3 -0
- package/dist/src/grid/plugins/BarsTriangle.d.ts +3 -0
- package/dist/src/grid/plugins/Dots.d.ts +3 -0
- package/dist/src/grid/plugins/GroupArea.d.ts +3 -0
- package/dist/src/grid/plugins/GroupAxis.d.ts +3 -0
- package/dist/src/grid/plugins/Lines.d.ts +3 -0
- package/dist/src/grid/plugins/Ranking.d.ts +0 -0
- package/dist/src/grid/plugins/RankingAxis.d.ts +0 -0
- package/dist/src/grid/plugins/ScalingArea.d.ts +1 -0
- package/dist/src/grid/plugins/ValueAxis.d.ts +3 -0
- package/dist/src/grid/plugins/ValueStackAxis.d.ts +3 -0
- package/dist/src/grid/types.d.ts +73 -0
- package/dist/src/index.d.ts +3 -0
- package/dist/src/multiGrid/index.d.ts +0 -0
- package/dist/src/multiGrid/plugins/Diverging.d.ts +0 -0
- package/dist/src/multiGrid/plugins/DivergingAxes.d.ts +0 -0
- package/dist/src/multiGrid/plugins/TwoScaleAxes.d.ts +0 -0
- package/dist/src/multiGrid/plugins/TwoScales.d.ts +0 -0
- package/dist/src/multiValue/index.d.ts +0 -0
- package/dist/src/multiValue/plugins/Scatter.d.ts +0 -0
- package/dist/src/multiValue/plugins/ScatterAxes.d.ts +0 -0
- package/dist/src/noneData/defaults.d.ts +4 -0
- package/dist/src/noneData/index.d.ts +4 -0
- package/dist/src/noneData/plugins/Container.d.ts +1 -0
- package/dist/src/noneData/plugins/Tooltip.d.ts +3 -0
- package/dist/src/noneData/types.d.ts +24 -0
- package/dist/src/relationship/index.d.ts +0 -0
- package/dist/src/relationship/plugins/Relationship.d.ts +0 -0
- package/dist/src/series/defaults.d.ts +6 -0
- package/dist/src/series/index.d.ts +6 -0
- package/dist/src/series/plugins/Bubbles.d.ts +3 -0
- package/dist/src/series/plugins/Pie.d.ts +3 -0
- package/dist/src/series/plugins/PieEventTexts.d.ts +1 -0
- package/dist/src/series/plugins/PieLabels.d.ts +3 -0
- package/dist/src/series/plugins/Waffle.d.ts +0 -0
- package/dist/src/series/seriesUtils.d.ts +19 -0
- package/dist/src/series/types.d.ts +45 -0
- package/dist/src/tree/index.d.ts +0 -0
- package/dist/src/tree/plugins/TreeMap.d.ts +0 -0
- package/dist/src/utils/commonUtils.d.ts +2 -0
- package/dist/src/utils/d3Graphics.d.ts +13 -0
- package/dist/src/utils/d3Utils.d.ts +13 -0
- package/dist/src/utils/observables.d.ts +3 -0
- package/dist/src/utils/orbchartsUtils.d.ts +20 -0
- package/dist/vite.config.d.ts +2 -0
- package/package.json +1 -1
@@ -0,0 +1,12 @@
|
|
1
|
+
import { LinesPluginParams, GroupAreaPluginParams, DotsPluginParams, BarsPluginParams, BarStackPluginParams, BarsTrianglePluginParams, GroupingAxisParams, ValueAxisParams, ValueStackAxisParams, ScalingAreaParams } from './types';
|
2
|
+
|
3
|
+
export declare const DEFAULT_LINES_PLUGIN_PARAMS: LinesPluginParams;
|
4
|
+
export declare const DEFAULT_DOTS_PLUGIN_PARAMS: DotsPluginParams;
|
5
|
+
export declare const DEFAULT_GROUP_AREA_PLUGIN_PARAMS: GroupAreaPluginParams;
|
6
|
+
export declare const DEFAULT_BARS_PLUGIN_PARAMS: BarsPluginParams;
|
7
|
+
export declare const DEFAULT_BAR_STACK_PLUGIN_PARAMS: BarStackPluginParams;
|
8
|
+
export declare const DEFAULT_BARS_TRIANGLE_PLUGIN_PARAMS: BarsTrianglePluginParams;
|
9
|
+
export declare const DEFAULT_GROUPING_AXIS_PLUGIN_PARAMS: GroupingAxisParams;
|
10
|
+
export declare const DEFAULT_VALUE_AXIS_PLUGIN_PARAMS: ValueAxisParams;
|
11
|
+
export declare const DEFAULT_VALUE_STACK_AXIS_PLUGIN_PARAMS: ValueStackAxisParams;
|
12
|
+
export declare const DEFAULT_SCALING_AREA_PLUGIN_PARAMS: ScalingAreaParams;
|
@@ -0,0 +1,15 @@
|
|
1
|
+
import { Observable } from 'rxjs';
|
2
|
+
import { ChartParams, DataFormatterGrid, ComputedDataGrid } from '@orbcharts/core';
|
3
|
+
|
4
|
+
export declare function gridGroupPositionFnObservable({ fullDataFormatter$, gridAxesSize$, computedData$, fullChartParams$ }: {
|
5
|
+
fullDataFormatter$: Observable<DataFormatterGrid>;
|
6
|
+
gridAxesSize$: Observable<{
|
7
|
+
width: number;
|
8
|
+
height: number;
|
9
|
+
}>;
|
10
|
+
computedData$: Observable<ComputedDataGrid>;
|
11
|
+
fullChartParams$: Observable<ChartParams>;
|
12
|
+
}): Observable<(event: any) => {
|
13
|
+
groupIndex: number;
|
14
|
+
groupLabel: string;
|
15
|
+
}>;
|
@@ -0,0 +1,12 @@
|
|
1
|
+
export * from './defaults';
|
2
|
+
export * from './types';
|
3
|
+
export { Lines } from './plugins/Lines';
|
4
|
+
export { Bars } from './plugins/Bars';
|
5
|
+
export { BarStack } from './plugins/BarStack';
|
6
|
+
export { BarsTriangle } from './plugins/BarsTriangle';
|
7
|
+
export { Dots } from './plugins/Dots';
|
8
|
+
export { GroupAxis } from './plugins/GroupAxis';
|
9
|
+
export { ValueAxis } from './plugins/ValueAxis';
|
10
|
+
export { ValueStackAxis } from './plugins/ValueStackAxis';
|
11
|
+
export { ScalingArea } from './plugins/ScalingArea';
|
12
|
+
export { GroupArea } from './plugins/GroupArea';
|
File without changes
|
File without changes
|
@@ -0,0 +1 @@
|
|
1
|
+
export declare const ScalingArea: import('@orbcharts/core').PluginConstructor<"grid", string, import('..').ScalingAreaParams>;
|
@@ -0,0 +1,73 @@
|
|
1
|
+
import { ColorType } from '@orbcharts/core';
|
2
|
+
|
3
|
+
export interface LinesPluginParams {
|
4
|
+
lineCurve: string;
|
5
|
+
lineWidth: number;
|
6
|
+
}
|
7
|
+
export interface DotsPluginParams {
|
8
|
+
radius: number;
|
9
|
+
fillColorType: ColorType;
|
10
|
+
strokeColorType: ColorType;
|
11
|
+
strokeWidth: number;
|
12
|
+
onlyShowHighlighted: boolean;
|
13
|
+
}
|
14
|
+
export interface GroupAreaPluginParams {
|
15
|
+
showLine: boolean;
|
16
|
+
showLabel: boolean;
|
17
|
+
lineDashArray: string;
|
18
|
+
lineColorType: ColorType;
|
19
|
+
labelColorType: ColorType;
|
20
|
+
labelTextColorType: ColorType;
|
21
|
+
labelTextFormat: string | ((text: any) => string);
|
22
|
+
labelPadding: number;
|
23
|
+
}
|
24
|
+
export interface BarsPluginParams {
|
25
|
+
barWidth: number;
|
26
|
+
barPadding: number;
|
27
|
+
barGroupPadding: number;
|
28
|
+
barRadius: number | boolean;
|
29
|
+
}
|
30
|
+
export interface BarStackPluginParams {
|
31
|
+
barWidth: number;
|
32
|
+
barGroupPadding: number;
|
33
|
+
barRadius: number | boolean;
|
34
|
+
}
|
35
|
+
export interface BarsTrianglePluginParams {
|
36
|
+
barWidth: number;
|
37
|
+
barPadding: number;
|
38
|
+
barGroupPadding: number;
|
39
|
+
linearGradientOpacity: [number, number];
|
40
|
+
}
|
41
|
+
export interface GroupingAxisParams {
|
42
|
+
labelOffset: [number, number];
|
43
|
+
labelColorType: ColorType;
|
44
|
+
axisLineVisible: boolean;
|
45
|
+
axisLineColorType: ColorType;
|
46
|
+
tickFormat: string | ((text: any) => string);
|
47
|
+
tickLineVisible: boolean;
|
48
|
+
tickPadding: number;
|
49
|
+
tickFullLine: boolean;
|
50
|
+
tickFullLineDasharray: string;
|
51
|
+
tickColorType: ColorType;
|
52
|
+
tickTextRotate: number;
|
53
|
+
tickTextColorType: ColorType;
|
54
|
+
}
|
55
|
+
export interface ValueAxisParams {
|
56
|
+
labelOffset: [number, number];
|
57
|
+
labelColorType: ColorType;
|
58
|
+
axisLineVisible: boolean;
|
59
|
+
axisLineColorType: ColorType;
|
60
|
+
ticks: number;
|
61
|
+
tickFormat: string | ((text: d3.NumberValue) => string);
|
62
|
+
tickLineVisible: boolean;
|
63
|
+
tickPadding: number;
|
64
|
+
tickFullLine: boolean;
|
65
|
+
tickFullLineDasharray: string;
|
66
|
+
tickColorType: ColorType;
|
67
|
+
tickTextRotate: number;
|
68
|
+
tickTextColorType: ColorType;
|
69
|
+
}
|
70
|
+
export interface ValueStackAxisParams extends ValueAxisParams {
|
71
|
+
}
|
72
|
+
export interface ScalingAreaParams {
|
73
|
+
}
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
@@ -0,0 +1 @@
|
|
1
|
+
export declare const Container: import('@orbcharts/core').PluginConstructor<any, string, import('..').ContainerPluginParams>;
|
@@ -0,0 +1,24 @@
|
|
1
|
+
import { ColorType, ChartType, EventTypeMap } from '@orbcharts/core';
|
2
|
+
|
3
|
+
export interface ContainerPluginParams {
|
4
|
+
header: {
|
5
|
+
height: number;
|
6
|
+
text: string[];
|
7
|
+
textStyle: string[];
|
8
|
+
};
|
9
|
+
footer: {
|
10
|
+
height: number;
|
11
|
+
text: string[];
|
12
|
+
textStyle: string[];
|
13
|
+
};
|
14
|
+
}
|
15
|
+
export type TooltipParams = {
|
16
|
+
backgroundColorType: ColorType;
|
17
|
+
backgroundOpacity: number;
|
18
|
+
strokeColorType: ColorType;
|
19
|
+
textColorType: ColorType;
|
20
|
+
offset: [number, number];
|
21
|
+
padding: number;
|
22
|
+
textRenderFn: <T extends ChartType>(eventData: EventTypeMap<T>) => string[];
|
23
|
+
svgRenderFn: (<T extends ChartType>(eventData: EventTypeMap<T>) => string) | null;
|
24
|
+
};
|
File without changes
|
File without changes
|
@@ -0,0 +1,6 @@
|
|
1
|
+
import { BubblesPluginParams, PiePluginParams, PieEventTextsPluginParams, PieLabelsPluginParams } from './types';
|
2
|
+
|
3
|
+
export declare const DEFAULT_BUBBLES_PLUGIN_PARAMS: BubblesPluginParams;
|
4
|
+
export declare const DEFAULT_PIE_PLUGIN_PARAMS: PiePluginParams;
|
5
|
+
export declare const DEFAULT_PIE_EVENT_TEXTS_PARAMS: PieEventTextsPluginParams;
|
6
|
+
export declare const DEFAULT_PIE_LABELS_PARAMS: PieLabelsPluginParams;
|
@@ -0,0 +1 @@
|
|
1
|
+
export declare const PieEventTexts: import('@orbcharts/core').PluginConstructor<"series", string, import('..').PieEventTextsPluginParams>;
|
File without changes
|
@@ -0,0 +1,19 @@
|
|
1
|
+
import { ComputedDataSeries, ComputedDatumSeries } from '@orbcharts/core';
|
2
|
+
|
3
|
+
export interface D3PieDatum {
|
4
|
+
data: any;
|
5
|
+
index: number;
|
6
|
+
value: number;
|
7
|
+
startAngle: number;
|
8
|
+
endAngle: number;
|
9
|
+
padAngle: number;
|
10
|
+
}
|
11
|
+
export interface PieDatum extends D3PieDatum {
|
12
|
+
data: ComputedDatumSeries;
|
13
|
+
id: string;
|
14
|
+
}
|
15
|
+
export declare function makePieData({ computedDataSeries, startAngle, endAngle }: {
|
16
|
+
computedDataSeries: ComputedDataSeries;
|
17
|
+
startAngle: number;
|
18
|
+
endAngle: number;
|
19
|
+
}): PieDatum[];
|
@@ -0,0 +1,45 @@
|
|
1
|
+
import { ComputedDatumSeries, EventSeries, EventName, ColorType } from '@orbcharts/core';
|
2
|
+
|
3
|
+
export type ScaleType = 'area' | 'radius';
|
4
|
+
export interface BubblesPluginParams {
|
5
|
+
force: {
|
6
|
+
strength: number;
|
7
|
+
velocityDecay: number;
|
8
|
+
collisionSpacing: number;
|
9
|
+
};
|
10
|
+
bubbleText: {
|
11
|
+
fillRate: number;
|
12
|
+
lineHeight: number;
|
13
|
+
lineLengthMin: number;
|
14
|
+
};
|
15
|
+
highlightRIncrease: number;
|
16
|
+
scaleType: ScaleType;
|
17
|
+
}
|
18
|
+
export interface PiePluginParams {
|
19
|
+
outerRadius: number;
|
20
|
+
innerRadius: number;
|
21
|
+
outerMouseoverRadius: number;
|
22
|
+
enterDuration: number;
|
23
|
+
startAngle: number;
|
24
|
+
endAngle: number;
|
25
|
+
padAngle: number;
|
26
|
+
cornerRadius: number;
|
27
|
+
}
|
28
|
+
export interface PieEventTextsPluginParams {
|
29
|
+
eventFn: (d: EventSeries, eventName: EventName, t: number) => string[];
|
30
|
+
textAttrs: Array<{
|
31
|
+
[key: string]: string | number;
|
32
|
+
}>;
|
33
|
+
textStyles: Array<{
|
34
|
+
[key: string]: string | number;
|
35
|
+
}>;
|
36
|
+
}
|
37
|
+
export interface PieLabelsPluginParams {
|
38
|
+
outerRadius: number;
|
39
|
+
outerMouseoverRadius: number;
|
40
|
+
startAngle: number;
|
41
|
+
endAngle: number;
|
42
|
+
labelCentroid: number;
|
43
|
+
labelFn: ((d: ComputedDatumSeries) => string);
|
44
|
+
labelColorType: ColorType;
|
45
|
+
}
|
File without changes
|
File without changes
|
@@ -0,0 +1,13 @@
|
|
1
|
+
type RenderCircleTextParams = {
|
2
|
+
text: string;
|
3
|
+
radius: number;
|
4
|
+
lineHeight: number;
|
5
|
+
isBreakAll: boolean;
|
6
|
+
limit?: number;
|
7
|
+
};
|
8
|
+
type Line = {
|
9
|
+
width: number;
|
10
|
+
text: string;
|
11
|
+
};
|
12
|
+
export declare function renderCircleText(selection: d3.Selection<any, any, any, any>, { text, radius, lineHeight, isBreakAll, limit }: RenderCircleTextParams): d3.Selection<SVGTSpanElement, Line, SVGTextElement, any> | undefined;
|
13
|
+
export {};
|
@@ -0,0 +1,13 @@
|
|
1
|
+
import * as d3 from 'd3';
|
2
|
+
export declare function getSvgGElementSize(selection: d3.Selection<SVGGElement, any, any, any>): DOMRect;
|
3
|
+
export declare function appendSvg(selection: d3.Selection<any, any, any, any>, svgString: string): void;
|
4
|
+
export declare function getD3TransitionEase(easeName: string): any;
|
5
|
+
export declare function makeD3Arc({ axisWidth, innerRadius, outerRadius, padAngle, cornerRadius }: {
|
6
|
+
axisWidth: number;
|
7
|
+
innerRadius: number;
|
8
|
+
outerRadius: number;
|
9
|
+
padAngle: number;
|
10
|
+
cornerRadius: number;
|
11
|
+
}): d3.Arc<any, d3.DefaultArcObject>;
|
12
|
+
export declare const parseTickFormatValue: (value: any, tickFormat: string | ((text: d3.NumberValue) => string)) => string;
|
13
|
+
export declare const parseDateTickFormatValue: (value: any, tickFormat: string | ((text: d3.NumberValue) => string)) => string;
|
@@ -0,0 +1,20 @@
|
|
1
|
+
import { AxisPosition, ColorType, ChartParams, ComputedDatumBase } from '@orbcharts/core';
|
2
|
+
|
3
|
+
export declare function getMinAndMaxValue(data: ComputedDatumBase[]): [number, number];
|
4
|
+
export declare function getColor(colorType: ColorType, fullChartParams: ChartParams): string;
|
5
|
+
export declare function getDatumColor({ datum, colorType, fullChartParams }: {
|
6
|
+
datum: ComputedDatumBase;
|
7
|
+
colorType: ColorType;
|
8
|
+
fullChartParams: ChartParams;
|
9
|
+
}): string;
|
10
|
+
export declare function getClassName(pluginName: string, elementName: string, modifier?: string): string;
|
11
|
+
export declare function getUniID(pluginName: string, elementName: string): string;
|
12
|
+
export declare function calcAxesSize({ xAxisPosition, yAxisPosition, width, height }: {
|
13
|
+
xAxisPosition: AxisPosition;
|
14
|
+
yAxisPosition: AxisPosition;
|
15
|
+
width: number;
|
16
|
+
height: number;
|
17
|
+
}): {
|
18
|
+
width: number;
|
19
|
+
height: number;
|
20
|
+
};
|