import { Container, IContainerSettings, IContainerPrivate } from "./Container"; import { Label } from "../../core/render/Label"; import { RoundedRectangle } from "../../core/render/RoundedRectangle"; import { ListTemplate } from "../../core/util/List"; import { Color } from "../../core/util/Color"; export interface IHeatLegendSettings extends IContainerSettings { /** * Color at the start of the scale (the lowest value). */ startColor?: Color; /** * Color at the end of the scale (the highest value). */ endColor?: Color; /** * Colors for a scale through more than two colors, in place of * `startColor` and `endColor`. As a gradient (`stepCount` of `1`), they * are spread evenly along it; as steps, there is one step per color and * `stepCount` is ignored. * * @since 5.21.2 */ colors?: Array; /** * Opacity at the start of the scale (the lowest value). * * @default 1 * @since 5.14.0 */ startOpacity?: number; /** * Opacity at the end of the scale (the highest value). * * @default 1 * @since 5.14.0 */ endOpacity?: number; /** * The lowest value, at the start of the scale. */ startValue?: number; /** * The highest value, at the end of the scale. */ endValue?: number; /** * Text of the start label. If not set, it shows `startValue`. */ startText?: string; /** * Text of the end label. If not set, it shows `endValue`. */ endText?: string; /** * Number of color steps. At `1` the scale is a smooth gradient. * * @default 1 * @see {@link https://www.amcharts.com/docs/v5/concepts/legend/heat-legend/#Gradient_or_steps} for more info */ stepCount?: number; /** * Orientation of the scale: `"horizontal"` runs from start on the left to * end on the right, `"vertical"` from start at the bottom to end at the top. * * @see {@link https://www.amcharts.com/docs/v5/concepts/legend/heat-legend/#Orientation} for more info */ orientation: "horizontal" | "vertical"; } export interface IHeatLegendPrivate extends IContainerPrivate { } /** * A legend that shows a color scale from `startColor` to `endColor`, with the * values at its ends. * * @see {@link https://www.amcharts.com/docs/v5/concepts/legend/heat-legend/} for more info */ export declare class HeatLegend extends Container { /** * The [[Container]] that holds the start and end labels. */ readonly labelContainer: Container; /** * The [[Container]] that holds the markers. */ readonly markerContainer: Container; /** * The [[Label]] at the start of the scale. */ readonly startLabel: Label; /** * The [[Label]] at the end of the scale. */ readonly endLabel: Label; static className: string; static classNames: Array; _settings: IHeatLegendSettings; _privateSettings: IHeatLegendPrivate; protected _afterNew(): void; /** * @ignore */ makeMarker(): RoundedRectangle; /** * The rectangles that make up the scale: one per step, or one with a * gradient when `stepCount` is `1`. */ readonly markers: ListTemplate; /** * Shows the tooltip, pointing at a value on the scale. * * @param value Value to point at * @param text Tooltip text; the formatted value if not given * @param color Tooltip background color; the value's color on the scale if not given */ showValue(value: number, text?: string, color?: Color): void; protected _colorMarkers(colors: Array, steps: boolean, startOpacity: number, endOpacity: number): void; _prepareChildren(): void; } //# sourceMappingURL=HeatLegend.d.ts.map