@devtable/dashboard 8.3.0 → 8.4.1
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/dist/dashboard.es.js +5083 -5034
- package/dist/dashboard.umd.js +55 -55
- package/dist/panel/settings/common/aggregation-selector.d.ts +2 -0
- package/dist/plugins/viz-components/cartesian/index.d.ts +1 -1
- package/dist/plugins/viz-components/cartesian/option/series/index.d.ts +4 -0
- package/dist/plugins/viz-components/cartesian/option/series/reference_areas.d.ts +16 -0
- package/dist/plugins/viz-components/cartesian/option/series/reference_lines.d.ts +32 -0
- package/dist/plugins/viz-components/cartesian/option/series/series_items.d.ts +4 -0
- package/dist/plugins/viz-components/cartesian/option/series/types.d.ts +1 -0
- package/dist/plugins/viz-components/cartesian/type.d.ts +2 -0
- package/dist/utils/aggregation.d.ts +1 -0
- package/package.json +1 -1
- package/dist/plugins/viz-components/cartesian/option/series.d.ts +0 -3
|
@@ -1,9 +1,11 @@
|
|
|
1
|
+
import { SpacingValue, SystemProp } from '@mantine/core';
|
|
1
2
|
import React from 'react';
|
|
2
3
|
import { AggregationType } from '../../../utils/aggregation';
|
|
3
4
|
interface IAggregationSelector {
|
|
4
5
|
value: AggregationType;
|
|
5
6
|
onChange: (v: AggregationType) => void;
|
|
6
7
|
label: string;
|
|
8
|
+
pt?: SystemProp<SpacingValue>;
|
|
7
9
|
}
|
|
8
10
|
export declare const AggregationSelector: React.ForwardRefExoticComponent<IAggregationSelector & React.RefAttributes<unknown>>;
|
|
9
11
|
export {};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { VizComponent } from '~/types/plugin';
|
|
2
2
|
import { VersionBasedMigrator } from '~/plugins/plugin-data-migrator';
|
|
3
3
|
export declare class VizCartesianMigrator extends VersionBasedMigrator {
|
|
4
|
-
readonly VERSION =
|
|
4
|
+
readonly VERSION = 8;
|
|
5
5
|
configVersions(): void;
|
|
6
6
|
}
|
|
7
7
|
export declare const CartesianVizComponent: VizComponent;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { AnyObject } from '~/types';
|
|
2
|
+
import { ITemplateVariable } from '~/utils/template';
|
|
3
|
+
import { ICartesianChartConf } from '../../type';
|
|
4
|
+
export declare function getSeries(conf: ICartesianChartConf, xAxisData: string[], valueTypedXAxis: boolean, data: AnyObject[], labelFormatters: Record<string, $TSFixMe>, variables: ITemplateVariable[], variableValueMap: Record<string, string | number>): any[];
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { ICartesianReferenceArea } from '../../type';
|
|
2
|
+
export declare function getReferenceAreas(reference_areas: ICartesianReferenceArea[], variableValueMap: Record<string, string | number>): {
|
|
3
|
+
name: string;
|
|
4
|
+
type: string;
|
|
5
|
+
hide_in_legend: boolean;
|
|
6
|
+
data: never[];
|
|
7
|
+
markArea: {
|
|
8
|
+
itemStyle: {
|
|
9
|
+
color: string;
|
|
10
|
+
};
|
|
11
|
+
data: {
|
|
12
|
+
yAxis: string | number;
|
|
13
|
+
}[][];
|
|
14
|
+
silent: boolean;
|
|
15
|
+
};
|
|
16
|
+
}[];
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { AnyObject } from '~/types';
|
|
2
|
+
import { ITemplateVariable } from '~/utils/template';
|
|
3
|
+
import { ICartesianReferenceLine } from '../../type';
|
|
4
|
+
export declare function getReferenceLines(reference_lines: ICartesianReferenceLine[], variables: ITemplateVariable[], variableValueMap: Record<string, string | number>, data: AnyObject[]): {
|
|
5
|
+
name: string;
|
|
6
|
+
type: string;
|
|
7
|
+
hide_in_legend: boolean;
|
|
8
|
+
yAxisIndex: number;
|
|
9
|
+
data: never[];
|
|
10
|
+
lineStyle: {
|
|
11
|
+
type: "dashed" | "dotted" | "solid";
|
|
12
|
+
width: number;
|
|
13
|
+
color: string;
|
|
14
|
+
};
|
|
15
|
+
markLine: {
|
|
16
|
+
data: {
|
|
17
|
+
[x: string]: string | number;
|
|
18
|
+
name: string;
|
|
19
|
+
}[];
|
|
20
|
+
silent: boolean;
|
|
21
|
+
symbol: string[];
|
|
22
|
+
lineStyle: {
|
|
23
|
+
type: "dashed" | "dotted" | "solid";
|
|
24
|
+
width: number;
|
|
25
|
+
color: string;
|
|
26
|
+
};
|
|
27
|
+
label: {
|
|
28
|
+
formatter: () => string;
|
|
29
|
+
position: string;
|
|
30
|
+
};
|
|
31
|
+
};
|
|
32
|
+
}[];
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { AnyObject } from '~/types';
|
|
2
|
+
import { ICartesianChartConf, ICartesianChartSeriesItem } from '../../type';
|
|
3
|
+
import { DataTemplateType } from './types';
|
|
4
|
+
export declare function getSeriesItemOrItems({ x_axis_data_key }: ICartesianChartConf, { y_axis_data_key, yAxisIndex, label_position, name, group_by_key, aggregation_on_group, stack, color, display_name_on_line, symbolSize, hide_in_legend, ...rest }: ICartesianChartSeriesItem, dataTemplate: DataTemplateType[], valueTypedXAxis: boolean, data: AnyObject[], variableValueMap: Record<string, string | number>, labelFormatters: Record<string, $TSFixMe>): any;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare type DataTemplateType = [string, 0];
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { TNumbroFormat } from '~/panel/settings/common/numbro-format-selector';
|
|
2
|
+
import { AggregationType } from '~/utils/aggregation';
|
|
2
3
|
import { TEchartsDataZoomConfig } from './panel/echarts-zooming-field/types';
|
|
3
4
|
import { TScatterSize } from './panel/scatter-size-select/types';
|
|
4
5
|
import { IXAxisLabelFormatter } from './panel/x-axis/x-axis-label-formatter/types';
|
|
@@ -19,6 +20,7 @@ export interface ICartesianChartSeriesItem {
|
|
|
19
20
|
smooth: boolean;
|
|
20
21
|
step: false | 'start' | 'middle' | 'end';
|
|
21
22
|
group_by_key: string;
|
|
23
|
+
aggregation_on_group?: AggregationType;
|
|
22
24
|
lineStyle: {
|
|
23
25
|
type: 'solid' | 'dashed' | 'dotted';
|
|
24
26
|
width: number;
|
|
@@ -7,4 +7,5 @@ export declare type AggregationType = {
|
|
|
7
7
|
p: number;
|
|
8
8
|
};
|
|
9
9
|
};
|
|
10
|
+
export declare const DefaultAggregation: AggregationType;
|
|
10
11
|
export declare function aggregateValue(data: Record<string, number>[], data_field: string, aggregation: AggregationType): number | number[] | null;
|
package/package.json
CHANGED
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import { ITemplateVariable } from '~/utils/template';
|
|
2
|
-
import { ICartesianChartConf } from '../type';
|
|
3
|
-
export declare function getSeries(conf: ICartesianChartConf, xAxisData: $TSFixMe[], valueTypedXAxis: boolean, data: $TSFixMe[], labelFormatters: Record<string, $TSFixMe>, variables: ITemplateVariable[], variableValueMap: Record<string, string | number>): any[];
|