/** * 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 { RefObject, Ref } from 'react'; import { ChartDataResponseResult, ChartProps, ContextMenuFilters, FilterState, HandlerFunction, LegendState, PlainObject, QueryFormColumn, SetDataMaskHook, ChartPlugin, SqlaFormData } from '@superset-ui/core'; import type { EChartsCoreOption, EChartsType } from 'echarts/core'; import type { TooltipMarker } from 'echarts/types/src/util/format'; import { StackControlsValue } from './constants'; export type EchartsStylesProps = { height: number; width: number; }; export type Refs = { echartRef?: Ref; divRef?: RefObject; }; export interface EchartsProps { height: number; width: number; echartOptions: EChartsCoreOption; eventHandlers?: EventHandlers; zrEventHandlers?: EventHandlers; selectedValues?: Record; forceClear?: boolean; refs: Refs; } export interface EchartsHandler { getEchartInstance: () => EChartsType | undefined; } export declare enum ForecastSeriesEnum { Observation = "", ForecastTrend = "__yhat", ForecastUpper = "__yhat_upper", ForecastLower = "__yhat_lower" } export type ForecastSeriesContext = { name: string; type: ForecastSeriesEnum; }; export declare enum LegendOrientation { Top = "top", Bottom = "bottom", Left = "left", Right = "right" } export declare enum LegendType { Scroll = "scroll", Plain = "plain" } export type ForecastValue = { marker: TooltipMarker; observation?: number; forecastTrend?: number; forecastLower?: number; forecastUpper?: number; }; export type LegendFormData = { legendMargin: number | null | string; legendOrientation: LegendOrientation; legendType: LegendType; showLegend: boolean; }; export type EventHandlers = Record; export declare enum LabelPositionEnum { Top = "top", Left = "left", Right = "right", Bottom = "bottom", Inside = "inside", InsideLeft = "insideLeft", InsideRight = "insideRight", InsideTop = "insideTop", InsideBottom = "insideBottom", InsideTopLeft = "insideTopLeft", InsideBottomLeft = "insideBottomLeft", InsideTopRight = "insideTopRight", InsideBottomRight = "insideBottomRight" } export interface BaseChartProps extends ChartProps { queriesData: ChartDataResponseResult[]; } export interface BaseTransformedProps { echartOptions: EChartsCoreOption; formData: F; height: number; onContextMenu?: (clientX: number, clientY: number, filters?: ContextMenuFilters) => void; setDataMask?: SetDataMaskHook; onLegendStateChanged?: (state: LegendState) => void; filterState?: FilterState; refs: Refs; width: number; emitCrossFilters?: boolean; coltypeMapping?: Record; } export type CrossFilterTransformedProps = { groupby: QueryFormColumn[]; labelMap: Record; setControlValue?: HandlerFunction; setDataMask: SetDataMaskHook; selectedValues: Record; emitCrossFilters?: boolean; }; export type ContextMenuTransformedProps = { onContextMenu?: (clientX: number, clientY: number, filters?: ContextMenuFilters) => void; setDataMask?: SetDataMaskHook; }; export interface TitleFormData { xAxisTitle: string; xAxisTitleMargin: number; yAxisTitle: string; yAxisTitleMargin: number; yAxisTitlePosition: string; } export type StackType = boolean | null | Partial; export interface TreePathInfo { name: string; dataIndex: number; value: number | number[]; } export declare class EchartsChartPlugin extends ChartPlugin { constructor(props: any); } export * from './Timeseries/types'; //# sourceMappingURL=types.d.ts.map