@devtable/dashboard 8.34.0 → 8.35.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.
@@ -0,0 +1,16 @@
1
+ /// <reference types="react" />
2
+ import { IEchartsReferenceArea } from './types';
3
+ declare type SelectorOptionType = {
4
+ label: string;
5
+ value: string;
6
+ description?: string;
7
+ };
8
+ interface IReferenceAreaField {
9
+ value: IEchartsReferenceArea;
10
+ onChange: (v: IEchartsReferenceArea) => void;
11
+ variableOptions: SelectorOptionType[];
12
+ xAxisOptions?: SelectorOptionType[];
13
+ yAxisOptions?: SelectorOptionType[];
14
+ }
15
+ export declare const ReferenceAreaField: import("react").ForwardRefExoticComponent<IReferenceAreaField & import("react").RefAttributes<unknown>>;
16
+ export {};
@@ -0,0 +1,34 @@
1
+ import { IEchartsReferenceArea } from './types';
2
+ interface IProps {
3
+ reference_areas: IEchartsReferenceArea[];
4
+ variableValueMap: Record<string, string | number>;
5
+ }
6
+ export declare function getReferenceAreasSeries({ reference_areas, variableValueMap }: IProps): {
7
+ type: string;
8
+ name: string;
9
+ silent: boolean;
10
+ data: never[];
11
+ markArea: {
12
+ data: ({
13
+ name: string;
14
+ value: string;
15
+ itemStyle: {
16
+ color: string;
17
+ };
18
+ label: {
19
+ position: import("../label-position").IEchartsLabelPosition;
20
+ color: string;
21
+ };
22
+ xAxis: string | number | undefined;
23
+ yAxis: string | number | undefined;
24
+ } | {
25
+ xAxis: string | number | undefined;
26
+ yAxis: string | number | undefined;
27
+ name?: undefined;
28
+ value?: undefined;
29
+ itemStyle?: undefined;
30
+ label?: undefined;
31
+ })[][];
32
+ };
33
+ };
34
+ export {};
@@ -0,0 +1,25 @@
1
+ import { IEchartsLabelPosition } from '../label-position';
2
+ export interface IEchartsReferenceArea {
3
+ id: string;
4
+ content: {
5
+ text: string;
6
+ };
7
+ itemStyle: {
8
+ color: string;
9
+ };
10
+ label: {
11
+ position: IEchartsLabelPosition;
12
+ color: string;
13
+ };
14
+ leftBottomPoint: {
15
+ x_data_key: string;
16
+ y_data_key: string;
17
+ };
18
+ rightTopPoint: {
19
+ x_data_key: string;
20
+ y_data_key: string;
21
+ };
22
+ xAxisIndex: string;
23
+ yAxisIndex: string;
24
+ }
25
+ export declare function getNewReferenceArea(): IEchartsReferenceArea;
@@ -0,0 +1,11 @@
1
+ /// <reference types="react" />
2
+ import { Control, UseFormWatch } from 'react-hook-form';
3
+ import { ITemplateVariable } from '~/utils/template';
4
+ import { IScatterChartConf } from '../../type';
5
+ interface IReferenceAreasField {
6
+ control: Control<IScatterChartConf, $TSFixMe>;
7
+ watch: UseFormWatch<IScatterChartConf>;
8
+ variables: ITemplateVariable[];
9
+ }
10
+ export declare function ReferenceAreasField({ control, watch, variables }: IReferenceAreasField): JSX.Element;
11
+ export {};
@@ -1,10 +1,11 @@
1
1
  import { TEchartsDataZoomConfig } from '../cartesian/panel/echarts-zooming-field/types';
2
2
  import { TSeriesColor } from './editors/scatter/series-color-select/types';
3
3
  import { IEchartsOverflow } from '~/plugins/common-echarts-fields/axis-label-overflow';
4
- import { ICartesianReferenceArea, ICartesianReferenceLine, IYAxisConf } from '../cartesian/type';
4
+ import { IEchartsReferenceArea } from '~/plugins/common-echarts-fields/reference-area/types';
5
+ import { IEchartsTooltipMetric } from '~/plugins/common-echarts-fields/tooltip-metric';
6
+ import { ICartesianReferenceLine, IYAxisConf } from '../cartesian/type';
5
7
  import { TScatterSize } from './editors/scatter/scatter-size-select/types';
6
8
  import { IXAxisLabelFormatter } from './editors/x-axis/x-axis-label-formatter/types';
7
- import { IEchartsTooltipMetric } from '~/plugins/common-echarts-fields/tooltip-metric';
8
9
  export interface IScatterLabelOverflow {
9
10
  label: IEchartsOverflow;
10
11
  tooltip: IEchartsOverflow;
@@ -37,7 +38,7 @@ export interface IScatterChartConf {
37
38
  metrics: IEchartsTooltipMetric[];
38
39
  };
39
40
  reference_lines: ICartesianReferenceLine[];
40
- reference_areas: ICartesianReferenceArea[];
41
+ reference_areas: IEchartsReferenceArea[];
41
42
  dataZoom: TEchartsDataZoomConfig;
42
43
  }
43
44
  export declare const DEFAULT_SCATTER_CHART_LABEL_OVERFLOW: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@devtable/dashboard",
3
- "version": "8.34.0",
3
+ "version": "8.35.0",
4
4
  "license": "Apache-2.0",
5
5
  "publishConfig": {
6
6
  "access": "public",