import * as React from 'react';
import { ListPresenterContext } from '../Form/Context';
import { I18nContext } from '../I18n/I18n';
import { ChartDefinition, DimensionType, IChartConfiguration, IChartDataSets } from './types';
export interface IChartJS {
    options: IChartConfiguration;
    width?: number;
    height?: number;
    className?: string;
}
export declare class ChartJS extends React.PureComponent<IChartJS> {
    private canvasRef;
    private chart?;
    componentDidMount(): void;
    componentDidUpdate(prevProps: IChartJS): void;
    render(): JSX.Element;
    private getOptions;
    private prepareChart;
}
interface IPieChart<T> {
    className?: string;
    width?: number;
    height?: number;
    title?: string;
    isDoughnut?: boolean;
    items: T[];
    xs: Array<keyof T>;
    y: keyof T;
    options?: IChartConfiguration;
    datasetOptions?: IChartDataSets;
}
export declare class PieChart<T> extends React.PureComponent<IPieChart<T>> {
    render(): JSX.Element;
    private getOptions;
    private getDataGroups;
}
interface IDataGroup<T> {
    y: keyof T;
    label?: string;
    type?: DimensionType;
    stack?: string;
    secondaryYAxis?: boolean;
}
export interface IRichChart<T> {
    className?: string;
    width?: number;
    height?: number;
    title?: string;
    stacked?: boolean;
    horizontal?: boolean;
    items: T[];
    xs: Array<keyof T>;
    ys: Array<IDataGroup<T>>;
    options?: IChartConfiguration;
    datasetOptions?: IChartDataSets;
    secondaryYAxis?: boolean;
}
export declare class RichChart<T> extends React.PureComponent<IRichChart<T>> {
    render(): JSX.Element;
    private getOptions;
    private getDatasets;
    private getLabels;
}
interface IChartFromDefinition<T> {
    className?: string;
    items: T[];
    definition: ChartDefinition<T>;
    options?: IChartConfiguration;
    datasetOptions?: IChartDataSets;
}
export declare class ChartFromDefinition<T> extends React.PureComponent<IChartFromDefinition<T>> {
    static contextType: React.Context<import("../I18n/I18n").II18nContext>;
    context: React.ContextType<typeof I18nContext>;
    render(): JSX.Element;
}
interface IDslChartPublicProps<T> {
    reportKey: string;
    x: keyof T & string;
    y?: keyof T & string;
    conceptName?: string;
    title?: string;
}
interface IDslChart<T> extends IDslChartPublicProps<T> {
}
export declare class DslChart<T> extends React.PureComponent<IDslChart<T>> {
    static contextType: React.Context<import("../Form/Context").IListPresenterContext<any, any> | undefined>;
    static context: React.ContextType<typeof ListPresenterContext>;
    render(): JSX.Element | null;
}
export {};
