@devtable/dashboard 6.33.0 → 6.34.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.
@@ -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 = 3;
4
+ readonly VERSION = 4;
5
5
  configVersions(): void;
6
6
  }
7
7
  export declare const CartesianVizComponent: VizComponent;
@@ -1,5 +1,5 @@
1
1
  import { ICartesianChartConf } from '../type';
2
2
  export declare function getGrid(conf: ICartesianChartConf): {
3
- bottom: number;
4
3
  top: number;
4
+ bottom: number;
5
5
  };
@@ -0,0 +1,35 @@
1
+ import { TEchartsDataZoomConfig } from './types';
2
+ export declare function getEchartsDataZoomOption(conf: TEchartsDataZoomConfig): ({
3
+ type: string;
4
+ xAxisIndex: number[];
5
+ filterMode: string;
6
+ minSpan: number;
7
+ yAxisIndex?: undefined;
8
+ bottom?: undefined;
9
+ top?: undefined;
10
+ height?: undefined;
11
+ moveHandleSize?: undefined;
12
+ showDataShadow?: undefined;
13
+ } | {
14
+ type: string;
15
+ yAxisIndex: number[];
16
+ filterMode: string;
17
+ minSpan: number;
18
+ xAxisIndex?: undefined;
19
+ bottom?: undefined;
20
+ top?: undefined;
21
+ height?: undefined;
22
+ moveHandleSize?: undefined;
23
+ showDataShadow?: undefined;
24
+ } | {
25
+ type: string;
26
+ xAxisIndex: number[];
27
+ filterMode: string;
28
+ bottom: string;
29
+ top: number;
30
+ height: number;
31
+ moveHandleSize: number;
32
+ showDataShadow: boolean;
33
+ minSpan: number;
34
+ yAxisIndex?: undefined;
35
+ })[];
@@ -0,0 +1,8 @@
1
+ /// <reference types="react" />
2
+ import { TEchartsDataZoomConfig } from './types';
3
+ interface IEchartsZoomingField {
4
+ value: TEchartsDataZoomConfig;
5
+ onChange: (v: TEchartsDataZoomConfig) => void;
6
+ }
7
+ export declare const EchartsZoomingField: import("react").ForwardRefExoticComponent<IEchartsZoomingField & import("react").RefAttributes<unknown>>;
8
+ export {};
@@ -0,0 +1,12 @@
1
+ export declare type TEchartsDataZoomConfig = {
2
+ x_axis_scroll: boolean;
3
+ y_axis_scroll: boolean;
4
+ x_axis_slider: boolean;
5
+ y_axis_slider: boolean;
6
+ };
7
+ export declare const DEFAULT_DATA_ZOOM_CONFIG: {
8
+ x_axis_scroll: boolean;
9
+ y_axis_scroll: boolean;
10
+ x_axis_slider: boolean;
11
+ y_axis_slider: boolean;
12
+ };
@@ -1,4 +1,5 @@
1
1
  import { TNumbroFormat } from '~/panel/settings/common/numbro-format-selector';
2
+ import { TEchartsDataZoomConfig } from './panel/echarts-zooming-field/types';
2
3
  import { TScatterSize } from './panel/scatter-size-select/types';
3
4
  import { IXAxisLabelFormatter } from './panel/x-axis/x-axis-label-formatter/types';
4
5
  export interface ICartesianChartSeriesItem {
@@ -88,5 +89,6 @@ export interface ICartesianChartConf {
88
89
  };
89
90
  reference_lines: ICartesianReferenceLine[];
90
91
  reference_areas: ICartesianReferenceArea[];
92
+ dataZoom: TEchartsDataZoomConfig;
91
93
  }
92
94
  export declare const DEFAULT_CONFIG: ICartesianChartConf;
@@ -0,0 +1,129 @@
1
+ import { ITemplateVariable } from '~/utils/template';
2
+ import { IParetoChartConf } from '../type';
3
+ export declare function getOption(conf: IParetoChartConf, data: $TSFixMe[], _variables: ITemplateVariable[]): {
4
+ dataZoom: ({
5
+ type: string;
6
+ xAxisIndex: number[];
7
+ filterMode: string;
8
+ minSpan: number;
9
+ yAxisIndex?: undefined;
10
+ bottom?: undefined;
11
+ top?: undefined;
12
+ height?: undefined;
13
+ moveHandleSize?: undefined;
14
+ showDataShadow?: undefined;
15
+ } | {
16
+ type: string;
17
+ yAxisIndex: number[];
18
+ filterMode: string;
19
+ minSpan: number;
20
+ xAxisIndex?: undefined;
21
+ bottom?: undefined;
22
+ top?: undefined;
23
+ height?: undefined;
24
+ moveHandleSize?: undefined;
25
+ showDataShadow?: undefined;
26
+ } | {
27
+ type: string;
28
+ xAxisIndex: number[];
29
+ filterMode: string;
30
+ bottom: string;
31
+ top: number;
32
+ height: number;
33
+ moveHandleSize: number;
34
+ showDataShadow: boolean;
35
+ minSpan: number;
36
+ yAxisIndex?: undefined;
37
+ })[];
38
+ tooltip: {
39
+ trigger: string;
40
+ formatter: (params: import("echarts/types/dist/shared").CallbackDataParams) => string;
41
+ };
42
+ xAxis: {
43
+ type: string;
44
+ name: string;
45
+ nameLocation: string;
46
+ nameGap: number;
47
+ nameTextStyle: {
48
+ fontWeight: string;
49
+ align: string;
50
+ };
51
+ splitLine: {
52
+ show: boolean;
53
+ };
54
+ axisTick: {
55
+ show: boolean;
56
+ alignWithLabel: boolean;
57
+ };
58
+ }[];
59
+ yAxis: ({
60
+ name: string;
61
+ nameGap: number;
62
+ nameTextStyle: {
63
+ fontWeight: string;
64
+ align: string;
65
+ };
66
+ position: string;
67
+ axisLine: {
68
+ show: boolean;
69
+ };
70
+ splitLine: {
71
+ show: boolean;
72
+ };
73
+ axisLabel?: undefined;
74
+ } | {
75
+ name: string;
76
+ nameGap: number;
77
+ nameTextStyle: {
78
+ fontWeight: string;
79
+ align: string;
80
+ };
81
+ position: string;
82
+ axisLine: {
83
+ show: boolean;
84
+ };
85
+ axisLabel: {
86
+ show: boolean;
87
+ formatter: typeof import("./utils").formatPercentage;
88
+ };
89
+ splitLine: {
90
+ show: boolean;
91
+ };
92
+ })[];
93
+ series: ({
94
+ name: string;
95
+ type: string;
96
+ itemStyle: {
97
+ color: string;
98
+ };
99
+ yAxisIndex: number;
100
+ data: any[][];
101
+ symbolSize?: undefined;
102
+ lineStyle?: undefined;
103
+ label?: undefined;
104
+ } | {
105
+ name: string;
106
+ type: string;
107
+ itemStyle: {
108
+ color: string;
109
+ };
110
+ symbolSize: number;
111
+ lineStyle: {
112
+ width: number;
113
+ };
114
+ label: {
115
+ show: boolean;
116
+ position: string;
117
+ formatter: (payload: any) => any;
118
+ };
119
+ yAxisIndex: number;
120
+ data: any[][];
121
+ })[];
122
+ grid: {
123
+ top: number;
124
+ left: number;
125
+ right: number;
126
+ bottom: number;
127
+ containLabel: boolean;
128
+ };
129
+ };
@@ -0,0 +1,33 @@
1
+ import { AnyObject } from '~/types';
2
+ import { IParetoChartConf } from '../type';
3
+ declare function formatterForLine(payload: $TSFixMe): any;
4
+ export declare function getSeries(conf: IParetoChartConf, data: AnyObject[]): ({
5
+ name: string;
6
+ type: string;
7
+ itemStyle: {
8
+ color: string;
9
+ };
10
+ yAxisIndex: number;
11
+ data: any[][];
12
+ symbolSize?: undefined;
13
+ lineStyle?: undefined;
14
+ label?: undefined;
15
+ } | {
16
+ name: string;
17
+ type: string;
18
+ itemStyle: {
19
+ color: string;
20
+ };
21
+ symbolSize: number;
22
+ lineStyle: {
23
+ width: number;
24
+ };
25
+ label: {
26
+ show: boolean;
27
+ position: string;
28
+ formatter: typeof formatterForLine;
29
+ };
30
+ yAxisIndex: number;
31
+ data: any[][];
32
+ })[];
33
+ export {};
@@ -0,0 +1,8 @@
1
+ import { CallbackDataParams } from 'echarts/types/dist/shared';
2
+ import { IParetoChartConf } from '../type';
3
+ declare function tooltipFormatter(params: CallbackDataParams): string;
4
+ export declare function getTooltip(conf: IParetoChartConf): {
5
+ trigger: string;
6
+ formatter: typeof tooltipFormatter;
7
+ };
8
+ export {};
@@ -0,0 +1 @@
1
+ export declare function formatPercentage(value: number): string;
@@ -0,0 +1,18 @@
1
+ import { IParetoChartConf } from '../type';
2
+ export declare function getXAxis(conf: IParetoChartConf): {
3
+ type: string;
4
+ name: string;
5
+ nameLocation: string;
6
+ nameGap: number;
7
+ nameTextStyle: {
8
+ fontWeight: string;
9
+ align: string;
10
+ };
11
+ splitLine: {
12
+ show: boolean;
13
+ };
14
+ axisTick: {
15
+ show: boolean;
16
+ alignWithLabel: boolean;
17
+ };
18
+ }[];
@@ -0,0 +1,36 @@
1
+ import { IParetoChartConf } from '../type';
2
+ import { formatPercentage } from './utils';
3
+ export declare function getYAxes(conf: IParetoChartConf): ({
4
+ name: string;
5
+ nameGap: number;
6
+ nameTextStyle: {
7
+ fontWeight: string;
8
+ align: string;
9
+ };
10
+ position: string;
11
+ axisLine: {
12
+ show: boolean;
13
+ };
14
+ splitLine: {
15
+ show: boolean;
16
+ };
17
+ axisLabel?: undefined;
18
+ } | {
19
+ name: string;
20
+ nameGap: number;
21
+ nameTextStyle: {
22
+ fontWeight: string;
23
+ align: string;
24
+ };
25
+ position: string;
26
+ axisLine: {
27
+ show: boolean;
28
+ };
29
+ axisLabel: {
30
+ show: boolean;
31
+ formatter: typeof formatPercentage;
32
+ };
33
+ splitLine: {
34
+ show: boolean;
35
+ };
36
+ })[];
@@ -1,3 +1,4 @@
1
+ import { TEchartsDataZoomConfig } from '../cartesian/panel/echarts-zooming-field/types';
1
2
  export interface IParetoChartConf {
2
3
  x_axis: {
3
4
  name: string;
@@ -12,5 +13,6 @@ export interface IParetoChartConf {
12
13
  name: string;
13
14
  color: string;
14
15
  };
16
+ dataZoom: TEchartsDataZoomConfig;
15
17
  }
16
18
  export declare const DEFAULT_CONFIG: IParetoChartConf;
@@ -1,5 +1,5 @@
1
1
  import { IScatterChartConf } from '../type';
2
2
  export declare function getGrid(conf: IScatterChartConf): {
3
- bottom: number;
4
3
  top: number;
4
+ bottom: number;
5
5
  };
@@ -1,3 +1,4 @@
1
+ import { TEchartsDataZoomConfig } from '../cartesian/panel/echarts-zooming-field/types';
1
2
  import { ICartesianReferenceArea, ICartesianReferenceLine, IYAxisConf } from '../cartesian/type';
2
3
  import { TScatterSize } from './editors/scatter/scatter-size-select/types';
3
4
  import { IXAxisLabelFormatter } from './editors/x-axis/x-axis-label-formatter/types';
@@ -34,5 +35,6 @@ export interface IScatterChartConf {
34
35
  };
35
36
  reference_lines: ICartesianReferenceLine[];
36
37
  reference_areas: ICartesianReferenceArea[];
38
+ dataZoom: TEchartsDataZoomConfig;
37
39
  }
38
40
  export declare const DEFAULT_CONFIG: IScatterChartConf;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@devtable/dashboard",
3
- "version": "6.33.0",
3
+ "version": "6.34.1",
4
4
  "license": "Apache-2.0",
5
5
  "publishConfig": {
6
6
  "access": "public",
@@ -1 +0,0 @@
1
- export { ClickEchartSeries } from './click-echart';