@arcgis/core
Version:
ArcGIS Maps SDK for JavaScript: A complete 2D and 3D mapping and data visualization API
36 lines (35 loc) • 2.18 kB
TypeScript
/**
* Function for generating class breaks for an input field in a [FeatureLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/FeatureLayer/) based
* on a given classification method and normalization type.
*
* > [!WARNING]
* >
* > **Known Limitations**
* >
* > [SceneLayers](https://developers.arcgis.com/javascript/latest/references/core/layers/SceneLayer/) must have the `supportsRenderer` and `supportsLayerQuery` capabilities enabled unless a predefined [statistics](https://developers.arcgis.com/javascript/latest/references/core/smartMapping/statistics/types/#SummaryStatisticsResult) object is provided to the `statistics` parameter of the method. To check a SceneLayer's capabilities, use the [SceneLayer.getFieldUsageInfo()](https://developers.arcgis.com/javascript/latest/references/core/layers/SceneLayer/#getFieldUsageInfo) method.
* > You cannot generate statistics using SQL expressions for client-side [FeatureLayers](https://developers.arcgis.com/javascript/latest/references/core/layers/FeatureLayer/)
* > in a [SceneView](https://developers.arcgis.com/javascript/latest/references/core/views/SceneView/).
*
* @since 4.2
*/
import type { ClassBreaksParameters, ClassBreaksResult } from "./types.js";
/**
* Generates class breaks for an input field (or expression) of a [FeatureLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/FeatureLayer/) based
* on a given classification method and normalization type.
*
* @param parameters - The function parameters.
* @returns Resolves to an instance of [ClassBreaksResult](https://developers.arcgis.com/javascript/latest/references/core/smartMapping/statistics/types/#ClassBreaksResult).
* @example
* classBreaks({
* layer: featureLayer,
* field: "COL_DEG",
* normalizationField: "TOT_POP",
* classificationMethod: "quantile",
* numClasses: 5
* }).then(function(response){
* // class break infos that may be passed to the
* // constructor of a ClassBreaksRenderer
* let breakInfos = response.classBreakInfos;
* });
*/
export default function classBreaks(parameters: ClassBreaksParameters): Promise<ClassBreaksResult>;