@devtable/dashboard 6.20.0 → 6.21.0

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,6 +1,6 @@
1
1
  /// <reference types="react" />
2
2
  import { Control, UseFormWatch } from 'react-hook-form';
3
- import { IBoxplotChartConf } from '../type';
3
+ import { IBoxplotChartConf } from '../../type';
4
4
  import { ITemplateVariable } from '~/utils/template';
5
5
  interface IReferenceLinesField {
6
6
  control: Control<IBoxplotChartConf, $TSFixMe>;
@@ -1,6 +1,6 @@
1
1
  /// <reference types="react" />
2
2
  import { Control, UseFieldArrayRemove } from 'react-hook-form';
3
- import { IBoxplotChartConf } from '../type';
3
+ import { IBoxplotChartConf } from '../../type';
4
4
  interface IReferenceLineField {
5
5
  control: Control<IBoxplotChartConf, $TSFixMe>;
6
6
  index: number;
@@ -0,0 +1,11 @@
1
+ /// <reference types="react" />
2
+ import { Control, UseFormWatch } from 'react-hook-form';
3
+ import { AnyObject } from '~/types';
4
+ import { IBoxplotChartConf } from '../type';
5
+ interface IXAxisField {
6
+ control: Control<IBoxplotChartConf, $TSFixMe>;
7
+ data: AnyObject[];
8
+ watch: UseFormWatch<IBoxplotChartConf>;
9
+ }
10
+ export declare const XAxisField: ({ control, data, watch }: IXAxisField) => JSX.Element;
11
+ export {};
@@ -0,0 +1,11 @@
1
+ /// <reference types="react" />
2
+ import { Control, UseFormWatch } from 'react-hook-form';
3
+ import { AnyObject } from '~/types';
4
+ import { IBoxplotChartConf } from '../type';
5
+ interface IYAxisField {
6
+ control: Control<IBoxplotChartConf, $TSFixMe>;
7
+ data: AnyObject[];
8
+ watch: UseFormWatch<IBoxplotChartConf>;
9
+ }
10
+ export declare const YAxisField: ({ control, data, watch }: IYAxisField) => JSX.Element;
11
+ export {};
@@ -0,0 +1,2 @@
1
+ import { IBoxplotDataItem } from '../type';
2
+ export declare const BOXPLOT_DATA_ITEM_KEYS: Array<keyof IBoxplotDataItem>;
@@ -0,0 +1,72 @@
1
+ import { AnyObject } from '~/types';
2
+ import { ITemplateVariable } from '~/utils/template';
3
+ import { IBoxplotChartConf, IBoxplotDataItem } from '../type';
4
+ interface IGetOption {
5
+ config: IBoxplotChartConf;
6
+ data: AnyObject[];
7
+ variables: ITemplateVariable[];
8
+ }
9
+ export declare function getOption({ config, data, variables }: IGetOption): {
10
+ dataset: {
11
+ source: IBoxplotDataItem[];
12
+ }[];
13
+ tooltip: {
14
+ trigger: string;
15
+ confine: boolean;
16
+ formatter: (params: import("echarts/types/dist/shared").TopLevelFormatterParams) => string | undefined;
17
+ };
18
+ xAxis: {
19
+ type: string;
20
+ name: string;
21
+ axisTick: {
22
+ show: boolean;
23
+ alignWithLabel: boolean;
24
+ };
25
+ }[];
26
+ yAxis: {
27
+ name: string;
28
+ axisLine: {
29
+ show: boolean;
30
+ };
31
+ axisLabel: {
32
+ formatter: (value: number) => string;
33
+ };
34
+ }[];
35
+ series: ({
36
+ name: string;
37
+ type: string;
38
+ data: never[];
39
+ markLine: {
40
+ data: {
41
+ name: string;
42
+ yAxis: number;
43
+ }[];
44
+ silent: boolean;
45
+ symbol: string[];
46
+ label: {
47
+ formatter: () => string;
48
+ position: string;
49
+ };
50
+ };
51
+ } | {
52
+ name: string;
53
+ type: string;
54
+ itemStyle: {
55
+ color: string;
56
+ borderColor: string;
57
+ borderWidth: number;
58
+ };
59
+ emphasis: {
60
+ disabled: boolean;
61
+ };
62
+ boxWidth: number[];
63
+ datasetIndex: number;
64
+ encode: {
65
+ y: (keyof IBoxplotDataItem)[];
66
+ x: string;
67
+ itemName: string[];
68
+ tooltip: (keyof IBoxplotDataItem)[];
69
+ };
70
+ })[];
71
+ };
72
+ export {};
@@ -0,0 +1,9 @@
1
+ import { TopLevelFormatterParams } from 'echarts/types/dist/shared';
2
+ import { IBoxplotChartConf } from '../type';
3
+ export declare function getTooltip({ config }: {
4
+ config: IBoxplotChartConf;
5
+ }): {
6
+ trigger: string;
7
+ confine: boolean;
8
+ formatter: (params: TopLevelFormatterParams) => string | undefined;
9
+ };
@@ -18,3 +18,11 @@ export interface IBoxplotChartConf {
18
18
  reference_lines: IBoxplotReferenceLine[];
19
19
  }
20
20
  export declare const DEFAULT_CONFIG: IBoxplotChartConf;
21
+ export interface IBoxplotDataItem {
22
+ name: string;
23
+ min: number;
24
+ q1: number;
25
+ median: number;
26
+ q3: number;
27
+ max: number;
28
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@devtable/dashboard",
3
- "version": "6.20.0",
3
+ "version": "6.21.0",
4
4
  "license": "Apache-2.0",
5
5
  "publishConfig": {
6
6
  "access": "public",