@arcgis/core
Version:
ArcGIS Maps SDK for JavaScript: A complete 2D and 3D mapping and data visualization API
32 lines (30 loc) • 1.69 kB
TypeScript
import type { JSONSupport } from "../../../core/JSONSupport.js";
export interface OpacityStopProperties extends Partial<Pick<OpacityStop, "label" | "opacity" | "value">> {}
/**
* Defines an opacity stop used for creating a continuous opacity visualization in a
* [opacity visual variable](https://developers.arcgis.com/javascript/latest/references/core/renderers/visualVariables/OpacityVariable/#stops).
*
* @since 4.10
* @see [OpacityVariable](https://developers.arcgis.com/javascript/latest/references/core/renderers/visualVariables/OpacityVariable/)
*/
export default class OpacityStop extends JSONSupport {
constructor(properties?: OpacityStopProperties);
/** A string value used to label the stop in the [Legend](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-legend/). */
accessor label: string | null | undefined;
/** The opacity value (between `0.0` and `1.0`) used to render features with the given [value](https://developers.arcgis.com/javascript/latest/references/core/renderers/visualVariables/support/OpacityStop/#value). */
accessor opacity: number;
/** Specifies the data value to map to the given [opacity value](https://developers.arcgis.com/javascript/latest/references/core/renderers/visualVariables/support/OpacityStop/#opacity). */
accessor value: number;
/**
* Creates a deep clone of the OpacityStop.
*
* @returns A deep clone of the opacity
* stop that invoked this method.
* @example
* // Creates a deep clone of the visual variable
* const stops = renderer.visualVariables[0].stops.map(function(stop){
* return stop.clone();
* });
*/
clone(): OpacityStop;
}