@devtable/dashboard 14.58.2 → 14.58.4

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,8 @@
1
+ import { FormatterFuncType } from '../../../common-echarts-fields/x-axis-label-formatter';
2
+ import { ICartesianChartConf } from '../type';
3
+ export interface IAxisLabels {
4
+ get axisData(): string[];
5
+ get axisKey(): string;
6
+ labelFormatter: FormatterFuncType;
7
+ }
8
+ export declare function getAxisLabels(conf: ICartesianChartConf, fullData: object[]): IAxisLabels;
@@ -1,3 +1,4 @@
1
1
  import { ITemplateVariable } from '../../../../../utils';
2
2
  import { ICartesianChartConf } from '../type';
3
- export declare function getOption(conf: ICartesianChartConf, data: TPanelData, variables: ITemplateVariable[]): any;
3
+ import { IAxisLabels } from './get-axis-labels';
4
+ export declare function getOption(conf: ICartesianChartConf, data: TPanelData, variables: ITemplateVariable[], xAxisLabels: IAxisLabels): any;
@@ -1,3 +1,4 @@
1
1
  import { IRegressionSeriesItem } from '../../../../../components/plugins/common-echarts-fields/regression-line';
2
2
  import { ICartesianChartConf } from '../type';
3
- export declare function getRegressionConfs({ regressions, x_axis_data_key }: ICartesianChartConf, rawData: TPanelData): IRegressionSeriesItem[];
3
+ import { IAxisLabels } from './get-axis-labels';
4
+ export declare function getRegressionConfs({ regressions }: ICartesianChartConf, rawData: TPanelData, xAxisLabels: IAxisLabels): IRegressionSeriesItem[];
@@ -1,3 +1,4 @@
1
1
  import { ITemplateVariable } from '../../../../../../utils';
2
2
  import { ICartesianChartConf } from '../../type';
3
- export declare function getSeries(conf: ICartesianChartConf, xAxisData: string[], data: TPanelData, labelFormatters: Record<string, $TSFixMe>, variables: ITemplateVariable[], variableValueMap: Record<string, string | number>): any[];
3
+ import { IAxisLabels } from '../get-axis-labels';
4
+ export declare function getSeries(conf: ICartesianChartConf, xAxisLabels: IAxisLabels, data: TPanelData, labelFormatters: Record<string, $TSFixMe>, variables: ITemplateVariable[], variableValueMap: Record<string, string | number>): any[];
@@ -1,3 +1,4 @@
1
1
  import { ICartesianChartConf, ICartesianChartSeriesItem } from '../../type';
2
+ import { IAxisLabels } from '../get-axis-labels';
2
3
  import { DataTemplateType } from './types';
3
- export declare function getSeriesItemOrItems({ x_axis_data_key, x_axis }: ICartesianChartConf, { y_axis_data_key, yAxisIndex, label_position, name, unit, group_by_key, order_in_group, aggregation_on_value, stack, color, display_name_on_line, symbolSize, hide_in_legend, areaStyle, ...rest }: ICartesianChartSeriesItem, dataTemplate: DataTemplateType[], data: TPanelData, variableValueMap: Record<string, string | number>, labelFormatters: Record<string, $TSFixMe>): any;
4
+ export declare function getSeriesItemOrItems({ x_axis }: ICartesianChartConf, { y_axis_data_key, yAxisIndex, label_position, name, unit, group_by_key, order_in_group, aggregation_on_value, stack, color, display_name_on_line, symbolSize, hide_in_legend, areaStyle, ...rest }: ICartesianChartSeriesItem, dataTemplate: DataTemplateType[], data: TPanelData, variableValueMap: Record<string, string | number>, labelFormatters: Record<string, $TSFixMe>, xAxisLabels: IAxisLabels): any;
@@ -1,3 +1,4 @@
1
1
  import { ICartesianChartConf } from '../type';
2
+ import { IAxisLabels } from './get-axis-labels';
2
3
  import { IEchartsSeriesItem } from './utils/types';
3
- export declare function getTooltip(conf: ICartesianChartConf, data: TPanelData, series: IEchartsSeriesItem[], labelFormatters: Record<string, (p: $TSFixMe) => string>): any;
4
+ export declare function getTooltip(conf: ICartesianChartConf, data: TPanelData, series: IEchartsSeriesItem[], xAxisLabels: IAxisLabels, labelFormatters: Record<string, (p: $TSFixMe) => string>): any;
@@ -1,2 +1,3 @@
1
1
  import { ICartesianChartConf } from '../type';
2
- export declare function getXAxes(conf: ICartesianChartConf, xAxisData: $TSFixMe[]): any[];
2
+ import { IAxisLabels } from './get-axis-labels';
3
+ export declare function getXAxes(conf: ICartesianChartConf, xAxisLabels: IAxisLabels): any[];
@@ -83,6 +83,10 @@ export interface ICartesianReferenceArea {
83
83
  }
84
84
  export interface ICartesianChartConf {
85
85
  x_axis_data_key: string;
86
+ /**
87
+ * Only works when x_axis.type === 'category'
88
+ */
89
+ x_axis_id_key?: string;
86
90
  x_axis_name: string;
87
91
  y_axes: IYAxisConf[];
88
92
  x_axis: {