/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ import { AxisType, ChartDataResponseResult, DataRecord, DataRecordValue, GenericDataType, LegendState, NumberFormatter, SupersetTheme, TimeFormatter, ValueFormatter } from '@superset-ui/core'; import { SortSeriesType } from '@superset-ui/chart-controls'; import type { LegendComponentOption } from 'echarts/components'; import type { SeriesOption } from 'echarts'; import { EchartsTimeseriesSeriesType, LegendOrientation, LegendType, StackType } from '../types'; export declare function extractDataTotalValues(data: DataRecord[], opts: { stack: StackType; percentageThreshold: number; xAxisCol: string; legendState?: LegendState; }): { totalStackedValues: number[]; thresholdValues: number[]; }; export declare function extractShowValueIndexes(series: SeriesOption[], opts: { stack: StackType; onlyTotal?: boolean; isHorizontal?: boolean; legendState?: LegendState; }): number[]; export declare function sortAndFilterSeries(rows: DataRecord[], xAxis: string, extraMetricLabels: any[], sortSeriesType?: SortSeriesType, sortSeriesAscending?: boolean): string[]; export declare function sortRows(rows: DataRecord[], totalStackedValues: number[], xAxis: string, xAxisSortSeries: SortSeriesType, xAxisSortSeriesAscending: boolean): { row: DataRecord; totalStackedValue: number; }[]; export declare function extractSeries(data: DataRecord[], opts?: { fillNeighborValue?: number; xAxis?: string; extraMetricLabels?: string[]; removeNulls?: boolean; stack?: StackType; totalStackedValues?: number[]; isHorizontal?: boolean; sortSeriesType?: SortSeriesType; sortSeriesAscending?: boolean; xAxisSortSeries?: SortSeriesType; xAxisSortSeriesAscending?: boolean; }): [SeriesOption[], number[], number | undefined]; export declare function formatSeriesName(name: DataRecordValue | undefined, { numberFormatter, timeFormatter, coltype, }?: { numberFormatter?: ValueFormatter; timeFormatter?: TimeFormatter; coltype?: GenericDataType; }): string; export declare const getColtypesMapping: ({ coltypes, colnames, }: Pick) => Record; export declare function extractGroupbyLabel({ datum, groupby, numberFormatter, timeFormatter, coltypeMapping, }: { datum?: DataRecord; groupby?: string[] | null; numberFormatter?: NumberFormatter; timeFormatter?: TimeFormatter; coltypeMapping?: Record; }): string; export declare function getLegendProps(type: LegendType, orientation: LegendOrientation, show: boolean, theme: SupersetTheme, zoomable?: boolean, legendState?: LegendState): LegendComponentOption | LegendComponentOption[]; export declare function getChartPadding(show: boolean, orientation: LegendOrientation, margin?: string | number | null, padding?: { top?: number; bottom?: number; left?: number; right?: number; }, isHorizontal?: boolean): { bottom: number; left: number; right: number; top: number; }; export declare function dedupSeries(series: SeriesOption[]): SeriesOption[]; export declare function sanitizeHtml(text: string): string; export declare function getAxisType(stack: StackType, forceCategorical?: boolean, dataType?: GenericDataType): AxisType; export declare function getOverMaxHiddenFormatter(config?: { max?: number; formatter?: ValueFormatter; }): NumberFormatter; export declare function calculateLowerLogTick(minPositiveValue: number): number; type BoundsType = { min?: number | 'dataMin'; max?: number | 'dataMax'; scale?: true; }; export declare function getMinAndMaxFromBounds(axisType: AxisType, truncateAxis: boolean, min?: number, max?: number, seriesType?: EchartsTimeseriesSeriesType): BoundsType | {}; /** * Returns the stackId used in stacked series. * It will return the defaultId if the chart is not using time comparison. * If time comparison is used, it will return the time comparison value as the stackId * if the name includes the time comparison value. * * @param {string} defaultId The default stackId. * @param {string[]} timeCompare The time comparison values. * @param {string | number} name The name of the serie. * * @returns {string} The stackId. */ export declare function getTimeCompareStackId(defaultId: string, timeCompare: string[], name?: string | number): string; export declare function extractTooltipKeys(forecastValue: any[], yIndex: number, richTooltip?: boolean, tooltipSortByMetric?: boolean): string[]; export {}; //# sourceMappingURL=series.d.ts.map