/**
* DevExtreme (viz/chart_components/base_chart.d.ts)
* Version: 21.1.0 (build 21016-0316)
* Build date: Sat Jan 16 2021
*
* Copyright (c) 2012 - 2021 Developer Express Inc. ALL RIGHTS RESERVED
* Read about DevExtreme licensing here: https://js.devexpress.com/Licensing/
*/
import '../../jquery_augmentation';

import {
    dxElement
} from '../../core/element';

import {
    PaletteType,
    PaletteExtensionModeType
} from '../palette';

import {
    template
} from '../../core/templates/template';

import DataSource, {
    DataSourceOptions
} from '../../data/data_source';

import {
    event
} from '../../events/index';

import {
    format
} from '../../ui/widget/ui.widget';

import {
    basePointObject,
    baseSeriesObject,
    chartSeriesObject,
    dxChartAnnotationConfig,
    dxChartSeriesTypesCommonSeriesLabel,
    dxChartSeriesTypesCommonSeriesPoint
} from '../chart';

import {
    BaseLegend,
    BaseLegendItem,
} from '../common';

import BaseWidget, {
    BaseWidgetOptions,
    BaseWidgetTooltip,
    BaseWidgetAnnotationConfig
} from '../core/base_widget';

/**
 * Warning! This type is used for internal purposes. Do not import it directly.
 */
export interface BaseChartOptions<T = BaseChart> extends BaseWidgetOptions<T> {
    /**
     */
    adaptiveLayout?: BaseChartAdaptiveLayout;
    /**
     */
    animation?: {
      /**
       * Warning! This type is used for internal purposes. Do not import it directly.
       */
      duration?: number,
      /**
       * Warning! This type is used for internal purposes. Do not import it directly.
       */
      easing?: 'easeOutCubic' | 'linear',
      /**
       * Warning! This type is used for internal purposes. Do not import it directly.
       */
      enabled?: boolean,
      /**
       * Warning! This type is used for internal purposes. Do not import it directly.
       */
      maxPointCountSupported?: number
    } | boolean;
    /**
     */
    customizeLabel?: ((pointInfo: any) => dxChartSeriesTypesCommonSeriesLabel);
    /**
     */
    customizePoint?: ((pointInfo: any) => dxChartSeriesTypesCommonSeriesPoint);
    /**
     * Binds the UI component to data.
     */
    dataSource?: Array<any> | DataSource | DataSourceOptions | string;
    /**
     */
    legend?: BaseChartLegend;
    /**
     */
    onDone?: ((e: { component?: T, element?: dxElement, model?: any }) => any);
    /**
     */
    onPointClick?: ((e: { component?: T, element?: dxElement, model?: any, event?: event, target?: basePointObject }) => any) | string;
    /**
     */
    onPointHoverChanged?: ((e: { component?: any, element?: any, target?: basePointObject }) => any);
    /**
     */
    onPointSelectionChanged?: ((e: { component?: any, element?: any, target?: basePointObject }) => any);
    /**
     */
    onTooltipHidden?: ((e: { component?: T, element?: dxElement, model?: any, target?: basePointObject | dxChartAnnotationConfig | any }) => any);
    /**
     */
    onTooltipShown?: ((e: { component?: T, element?: dxElement, model?: any, target?: basePointObject | dxChartAnnotationConfig | any }) => any);
    /**
     */
    palette?: Array<string> | PaletteType;
    /**
     */
    paletteExtensionMode?: PaletteExtensionModeType;
    /**
     */
    pointSelectionMode?: 'multiple' | 'single';
    /**
     */
    series?: any | Array<any>;
    /**
     */
    tooltip?: BaseChartTooltip;
}
/**
 * Warning! This type is used for internal purposes. Do not import it directly.
 */
export interface BaseChartAdaptiveLayout {
    /**
     * Specifies the minimum container height at which the layout begins to adapt.
     */
    height?: number;
    /**
     * Specifies whether point labels should be kept when the UI component adapts the layout.
     */
    keepLabels?: boolean;
    /**
     * Specifies the minimum container width at which the layout begins to adapt.
     */
    width?: number;
}
/**
 * Warning! This type is used for internal purposes. Do not import it directly.
 */
export interface BaseChartLegend extends BaseLegend {
    /**
     * Allows you to change the order, text, and visibility of legend items.
     */
    customizeItems?: ((items: Array<BaseChartLegendItem>) => Array<BaseChartLegendItem>);
    /**
     * Specifies an SVG element that serves as a custom legend item marker.
     */
    markerTemplate?: template | ((legendItem: BaseChartLegendItem, element: SVGGElement) => string | SVGElement | JQuery);
}
/**
 * Warning! This type is used for internal purposes. Do not import it directly.
 */
export interface BaseChartTooltip extends BaseWidgetTooltip {
    /**
     * Formats the point argument before it is displayed in the tooltip. To format the point value, use the format property.
     */
    argumentFormat?: format;
    /**
     * Specifies a custom template for a tooltip.
     */
    contentTemplate?: template | ((pointInfo: any, element: dxElement) => string | Element | JQuery);
    /**
     * Allows you to change tooltip appearance.
     */
    customizeTooltip?: ((pointInfo: any) => any);
    /**
     * Specifies whether the tooltip is shared across all series points with the same argument.
     */
    shared?: boolean;
    /**
     * Allows users to interact with the tooltip content.
     */
    interactive?: boolean;
}
/**
 * Warning! This type is used for internal purposes. Do not import it directly.
 */
export class BaseChart extends BaseWidget {
    constructor(element: Element, options?: BaseChartOptions)
    constructor(element: JQuery, options?: BaseChartOptions)
    /**
     */
    clearSelection(): void;
    /**
     */
    getAllSeries(): Array<baseSeriesObject>;
    getDataSource(): DataSource;
    /**
     */
    getSeriesByName(seriesName: any): chartSeriesObject;
    /**
     */
    getSeriesByPos(seriesIndex: number): chartSeriesObject;
    /**
     */
    hideTooltip(): void;
    /**
     */
    refresh(): void;
    render(): void;
    /**
     */
    render(renderOptions: any): void;
}

/**
 * Warning! This type is used for internal purposes. Do not import it directly.
 */
export interface BaseChartLegendItem extends BaseLegendItem {
    /**
     */
    series?: baseSeriesObject;
}

/**
 * Warning! This type is used for internal purposes. Do not import it directly.
 */
export interface BaseChartAnnotationConfig extends BaseWidgetAnnotationConfig {
    /**
     */
    argument?: number | Date | string;
    /**
     */
    series?: string;
    /**
     */
    value?: number | Date | string;
}
