import type { D3Selection } from "@d3plus/dom";
import type { DataPoint } from "@d3plus/data";
import { Axis, TextBox } from "../components/index.js";
import { Rect } from "../shapes/index.js";
import { BaseClass } from "../utils/index.js";
import Legend from "./Legend.js";
/**
    Creates an SVG color scale based on an array of data.
*/
export default class ColorScale extends BaseClass {
    _select: D3Selection;
    _axisClass: Axis;
    _axisConfig: Record<string, unknown>;
    _axisTest: Axis;
    _align: string;
    _buckets: number | number[];
    _bucketAxis: boolean;
    _bucketFormat: (tick: number, i: number, ticks: number[], allValues: number[]) => string;
    _bucketJoiner: (a: string, b: string) => string;
    _centered: boolean;
    _color: string | string[];
    _colorMax: string;
    _colorMid: string;
    _colorMin: string;
    _colorScale: any;
    _data: DataPoint[];
    _domain: number[] | undefined;
    _duration: number;
    _group: D3Selection;
    _height: number;
    _labelClass: TextBox;
    _labelConfig: Record<string, unknown>;
    _labelMin: string | undefined;
    _labelMax: string | undefined;
    _legendClass: Legend;
    _legendConfig: Record<string, unknown>;
    _midpoint: number;
    _orient: string;
    _outerBounds: Record<string, number>;
    _padding: number;
    _rectClass: Rect;
    _rectConfig: Record<string, unknown>;
    _scale: string;
    _size: number;
    _value: (d: DataPoint, i?: number) => unknown;
    _width: number;
    /**
        Invoked when creating a new class instance, and sets any default parameters.
        @private
  */
    constructor();
    /**
        Renders the current ColorScale to the page.
      @param callback Optional callback invoked after rendering completes.
  */
    render(callback?: (...args: unknown[]) => unknown): this;
    /**
        The [ColorScale](http://d3plus.org/docs/#ColorScale) is constructed by combining an [Axis](http://d3plus.org/docs/#Axis) for the ticks/labels and a [Rect](http://d3plus.org/docs/#Rect) for the actual color box (or multiple boxes, as in a jenks scale). Because of this, there are separate configs for the [Axis](http://d3plus.org/docs/#Axis) class used to display the text ([axisConfig](http://d3plus.org/docs/#ColorScale.axisConfig)) and the [Rect](http://d3plus.org/docs/#Rect) class used to draw the color breaks ([rectConfig](http://d3plus.org/docs/#ColorScale.rectConfig)). This method acts as a pass-through to the config method of the [Axis](http://d3plus.org/docs/#Axis). An example usage of this method can be seen [here](http://d3plus.org/examples/d3plus-legend/colorScale-dark/).
  */
    axisConfig(): Record<string, unknown>;
    axisConfig(_: Record<string, unknown>): this;
    /**
        The horizontal alignment.
  */
    align(): string;
    align(_: string): this;
    /**
        The number of discrete buckets to create in a bucketed color scale. Will be overridden by any custom Array of colors passed to the `color` method. Optionally, users can supply an Array of values used to separate buckets, such as `[0, 10, 25, 50, 90]` for a percentage scale. This value would create 4 buckets, with each value representing the break point between each bucket (so 5 values makes 4 buckets).
  */
    buckets(): number | number[];
    buckets(_: number | number[]): this;
    /**
        Determines whether or not to use an Axis to display bucket scales (both "buckets" and "jenks"). When set to `false`, bucketed scales will use the `Legend` class to display squares for each range of data. When set to `true`, bucketed scales will be displayed on an `Axis`, similar to "linear" scales.
  */
    bucketAxis(): boolean;
    bucketAxis(_: boolean): this;
    /**
        A function for formatting the labels associated to each bucket in a bucket-type scale ("jenks", "quantile", etc). The function is passed four arguments: the start value of the current bucket, it's index in the full Array of buckets, the full Array of buckets, and an Array of every value present in the data used to construct the buckets. Keep in mind that the end value for the bucket is not actually the next bucket in the list, but includes every value up until that next bucket value (less than, but not equal to). By default, d3plus will make the end value slightly less than it's current value, so that it does not overlap with the start label for the next bucket.
  */
    bucketFormat(): (tick: number, i: number, ticks: number[], allValues: number[]) => string;
    bucketFormat(_: (tick: number, i: number, ticks: number[], allValues: number[]) => string): this;
    /**
        A function that receives the minimum and maximum values of a bucket, and is expected to return the full label.
  */
    bucketJoiner(): (a: string, b: string) => string;
    bucketJoiner(_: (a: string, b: string) => string): this;
    /**
        Determines whether or not to display a midpoint centered Axis. Does not apply to quantile scales.
  */
    centered(): boolean;
    centered(_: boolean): this;
    /**
        Overrides the default internal logic of `colorMin`, `colorMid`, and `colorMax` to only use just this specified color. If a single color is given as a String, then the scale is interpolated by lightening that color. Otherwise, the function expects an Array of color values to be used in order for the scale.
  */
    color(): string | string[];
    color(_: string | string[]): this;
    /**
        Defines the color to be used for numbers greater than the value of the `midpoint` on the scale (defaults to `0`). Colors in between this value and the value of `colorMid` will be interpolated, unless a custom Array of colors has been specified using the `color` method.
  */
    colorMax(): string;
    colorMax(_: string): this;
    /**
        Defines the color to be used for the midpoint of a diverging scale, based on the current value of the `midpoint` method (defaults to `0`). Colors in between this value and the values of `colorMin` and `colorMax` will be interpolated, unless a custom Array of colors has been specified using the `color` method.
  */
    colorMid(): string;
    colorMid(_: string): this;
    /**
        Defines the color to be used for numbers less than the value of the `midpoint` on the scale (defaults to `0`). Colors in between this value and the value of `colorMid` will be interpolated, unless a custom Array of colors has been specified using the `color` method.
  */
    colorMin(): string;
    colorMin(_: string): this;
    /**
        The data array used to create shapes. A shape key will be drawn for each object in the array.
  */
    data(): DataPoint[];
    data(_: DataPoint[]): this;
    /**
        In a linear scale, this Array of 2 values defines the min and max values used in the color scale. Any values outside of this range will be mapped to the nearest color value.
  */
    domain(): number[] | undefined;
    domain(_: number[]): this;
    /**
        Transition duration of the ColorScale.
  */
    duration(): number;
    duration(_: number): this;
    /**
        Overall height of the ColorScale.
  */
    height(): number;
    height(_: number): this;
    /**
        A pass-through for the [TextBox](http://d3plus.org/docs/#TextBox) class used to style the labelMin and labelMax text.
  */
    labelConfig(): Record<string, unknown>;
    labelConfig(_: Record<string, unknown>): this;
    /**
        Defines a text label to be displayed off of the end of the minimum point in the scale (currently only available in horizontal orientation).
  */
    labelMin(): string | undefined;
    labelMin(_: string): this;
    /**
        Defines a text label to be displayed off of the end of the maximum point in the scale (currently only available in horizontal orientation).
  */
    labelMax(): string | undefined;
    labelMax(_: string): this;
    /**
        The [ColorScale](http://d3plus.org/docs/#ColorScale) is constructed by combining an [Axis](http://d3plus.org/docs/#Axis) for the ticks/labels and a [Rect](http://d3plus.org/docs/#Rect) for the actual color box (or multiple boxes, as in a jenks scale). Because of this, there are separate configs for the [Axis](http://d3plus.org/docs/#Axis) class used to display the text ([axisConfig](http://d3plus.org/docs/#ColorScale.axisConfig)) and the [Rect](http://d3plus.org/docs/#Rect) class used to draw the color breaks ([rectConfig](http://d3plus.org/docs/#ColorScale.rectConfig)). This method acts as a pass-through to the config method of the [Axis](http://d3plus.org/docs/#Axis). An example usage of this method can be seen [here](http://d3plus.org/examples/d3plus-legend/colorScale-dark/).
  */
    legendConfig(): Record<string, unknown>;
    legendConfig(_: Record<string, unknown>): this;
    /**
        The number value to be used as the anchor for `colorMid`, and defines the center point of the diverging color scale.
  */
    midpoint(): number;
    midpoint(_: number): this;
    /**
        The flow orientation of the ColorScale items.
  */
    orient(): string;
    orient(_: string): this;
    /**
        Returns the outer bounds of the ColorScale content. Must be called after rendering.
        @example
  {"width": 180, "height": 24, "x": 10, "y": 20}
  */
    outerBounds(): Record<string, number>;
    /**
        The padding between each key.
  */
    padding(): number;
    padding(_: number): this;
    /**
        The [ColorScale](http://d3plus.org/docs/#ColorScale) is constructed by combining an [Axis](http://d3plus.org/docs/#Axis) for the ticks/labels and a [Rect](http://d3plus.org/docs/#Rect) for the actual color box (or multiple boxes, as in a jenks scale). Because of this, there are separate configs for the [Axis](http://d3plus.org/docs/#Axis) class used to display the text ([axisConfig](http://d3plus.org/docs/#ColorScale.axisConfig)) and the [Rect](http://d3plus.org/docs/#Rect) class used to draw the color breaks ([rectConfig](http://d3plus.org/docs/#ColorScale.rectConfig)). This method acts as a pass-through to the config method of the [Rect](http://d3plus.org/docs/#Rect). An example usage of this method can be seen [here](http://d3plus.org/examples/d3plus-legend/colorScale-dark/).
  */
    rectConfig(): Record<string, unknown>;
    rectConfig(_: Record<string, unknown>): this;
    /**
        Scale of the ColorScale.
  */
    scale(): string;
    scale(_: string): this;
    /**
        The SVG container element for this visualization. 3 selector or DOM element.
  */
    select(): D3Selection;
    select(_: string | HTMLElement): this;
    /**
        The height of horizontal color scales, and width when positioned vertical.
  */
    size(): number;
    size(_: number): this;
    /**
        The value accessor used to determine each data point's position on the color scale.
  
  @example
  function value(d) {
    return d.value;
  }
  */
    value(): (d: DataPoint, i?: number) => DataPoint[keyof DataPoint];
    value(_: ((d: DataPoint, i?: number) => DataPoint[keyof DataPoint]) | string): this;
    /**
        Overall width of the ColorScale.
  */
    width(): number;
    width(_: number): this;
}
