import { ChartType, IChartDef, VerticalLabelPosition, HorizontalLabelPosition, AxisType, IPlotConfig, IExpandedPlotConfig, IAxisMap, ISingleAxisMap, ISingleYAxisMap } from "./chart-def";
import { ISerializedDataFrame } from "data-forge/build/lib/dataframe";
export declare function startPlot(): Promise<void>;
export declare function endPlot(): Promise<void>;
/**
 * Options for image rendering.
 */
export interface IRenderOptions {
    /**
     * Open the image in your default image viewer.
     */
    openImage?: boolean;
    /**
     * Path to electron, so that electron can be installed separately to a different location and shared
     * between the various packages that need it.
     *
     * Electron is used to render charts and capture them to images.
     */
    electronPath?: string;
}
/**
 * Options for exporting web projects for interactive charts.
 */
export interface IWebExportOptions {
    /**
     * Open the exported web visualization in the browser after exporting it.
     * Default: false
     */
    openBrowser?: boolean;
    /**
     * Set to true to overwrite existing output.
     * Default: false
     */
    overwrite?: boolean;
}
/**
 * Options for exporting Node.js projects for interactive charts.
 */
export interface INodejsExportOptions {
    /**
     * Set to true to overwrite existing output.
     * Default: false
     */
    overwrite?: boolean;
}
/**
 * Fluent API for configuring the plot.
 */
export interface IPlotAPI {
    /***
     * Set the chart template to use.
     * This defaults to "c3".
     */
    template(templateName: string): IPlotAPI;
    /**
     * Set the type of the chart to be plotted.
     *
     * @param chartType Specifies the chart type.
     */
    chartType(chartType: ChartType): IPlotAPI;
    /**
     * Set the width of the chart.
     */
    width(width: number): IPlotAPI;
    /**
     * Set the height of the chart.
     */
    height(height: number): IPlotAPI;
    /**
     * Configure the x axis.
     */
    x(seriesName: string): IXAxisConfigAPI;
    /**
     * Configure the y axis.
     */
    y(seriesName: string): IYAxisConfigAPI;
    /**
     * Configure the y axis.
     */
    y2(seriesName: string): IYAxisConfigAPI;
    /**
     * Render the plot to an image file.
     */
    renderImage(imageFilePath: string, renderOptions?: IRenderOptions): Promise<void>;
    /**
     * Export an interactive web visualization of the chart.
     */
    exportWeb(outputFolderPath: string, exportOptions?: IWebExportOptions): Promise<void>;
    /**
     * Export a Node.js project to host a web visualization of the char.
     */
    exportNodejs(outputFolderPath: string, exportOptions?: INodejsExportOptions): Promise<void>;
    /**
     * Serialize the plot definition so that it can be converted to JSON.
     * The JSON definition of the chart can be used to instantiate the chart in a browser.
     */
    serialize(): IChartDef;
}
/**
 * Plot API for configuring a particular axis.
 */
export interface IAxisConfigAPI<FluentT> extends IPlotAPI {
    /**
     * Set the label for the axis.
     */
    axisLabel(label: string): FluentT;
    /**
     * Set the type of the axis.
     */
    type(axisType: AxisType): FluentT;
}
/**
 * Plot API for configuring a particular axis.
 */
export interface IXAxisConfigAPI extends IAxisConfigAPI<IXAxisConfigAPI> {
    /**
     * Set the position for the label.
     */
    axisLabelPosition(position: HorizontalLabelPosition): IXAxisConfigAPI;
}
/**
 * Plot API for configuring a particular Y axis.
 */
export interface IYAxisConfigAPI extends IAxisConfigAPI<IYAxisConfigAPI> {
    /**
     * Set the series label.
     */
    seriesLabel(label: string): IYAxisConfigAPI;
    /**
     * Set the display format for values of this series.
     */
    format(formatString: string): IYAxisConfigAPI;
    /**
     * Set the position for the label.
     */
    axisLabelPosition(position: VerticalLabelPosition): IYAxisConfigAPI;
    /**
     * Configure an explicit x axis for the y axis.
     */
    x(seriesName: string): IXAxisConfigAPI;
}
export interface IInternalAxisMap {
    /**
     * The x axis for the chart.
     */
    x: ISingleAxisMap;
    /**
     * The y axis for the chart.
     */
    y: ISingleYAxisMap[];
    /**
     * The optional  second y axis for the chart.
     */
    y2: ISingleYAxisMap[];
}
/**
 * Fluent API for configuring the plot.
 */
export declare abstract class AbstractPlotAPI implements IPlotAPI {
    /**
     * Data to be plotted.
     */
    protected data: ISerializedDataFrame;
    /**
     * Defines the chart that is to be plotted.
     */
    protected plotConfig: IExpandedPlotConfig;
    /**
     * Defines how the data is mapped to the axis' in the chart.
     */
    protected globalAxisMap: IInternalAxisMap;
    constructor(data: ISerializedDataFrame, plotConfig: IExpandedPlotConfig, globalAxisMap: IInternalAxisMap);
    /***
     * Set the chart template to use.
     * This defaults to "c3".
     */
    template(templateName: string): IPlotAPI;
    /**
     * Set the type of the chart to be plotted.
     *
     * @param chartType Specifies the chart type.
     */
    chartType(chartType: ChartType): IPlotAPI;
    /**
     * Set the width of the chart.
     */
    width(width: number): IPlotAPI;
    /**
     * Set the height of the chart.
     */
    height(height: number): IPlotAPI;
    /**
     * Configure the default x axis.
     */
    x(seriesName: string): IXAxisConfigAPI;
    /**
     * Configure the y axis.
     */
    y(seriesName: string): IYAxisConfigAPI;
    /**
     * Configure the y axis.
     */
    y2(seriesName: string): IYAxisConfigAPI;
    /**
     * Render the plot to an image file.
     */
    renderImage(imageFilePath: string, renderOptions?: IRenderOptions): Promise<void>;
    /**
     * Export an interactive web visualization of the chart.
     */
    exportWeb(outputFolderPath: string, exportOptions?: IWebExportOptions): Promise<void>;
    /**
     * Export a Node.js project to host a web visualization of the char.
     */
    exportNodejs(outputFolderPath: string, exportOptions?: INodejsExportOptions): Promise<void>;
    /**
     * Serialize the plot definition so that it can be converted to JSON.
     * The JSON definition of the chart can be used to instantiate the chart in a browser.
     *
     * TODO: This function doesn't really belong in the abstract class, it would be better to live the concrete PlotAPI class.
     */
    serialize(): IChartDef;
    getTypeCode(): string;
}
/**
 * Fluent API for configuring the plot.
 */
export declare class PlotAPI extends AbstractPlotAPI {
    constructor(data: ISerializedDataFrame, plotConfig: IPlotConfig, showLegendDefault: boolean, globalAxisMap?: IAxisMap);
    /**
     * Deserialize an instance of PlotAPI from a previously serialize chart def.
     *
     * @param chartDef The chart definition to deserialize from.
     */
    static deserialize(chartDef: IChartDef): IPlotAPI;
}
