-
fromHistogramResult
(result)
{Histogram}
static
用于从 histogram 统计函数的结果创建直方图小部件实例的便捷函数。
参数:
类型 说明 result HistogramResulthistogram 统计函数的结果用于从图层生成字段或表达式的直方图。
返回:
类型 说明 Histogram 表示从 histogram 返回的直方图的直方图实例。 例子:
let colorParams = { layer: povLayer, basemap: map.basemap, field: "POP_POVERTY", normalizationField: "TOTPOP_CY", theme: "above-and-below" }; let stats = null; colorRendererCreator .createContinuousRenderer(colorParams) .then(function(response) { // set the renderer to the layer and add it to the map stats = response.statistics; return histogram({ layer: povLayer, field: "POP_POVERTY", normalizationField: "TOTPOP_CY", numBins: 100 }); }) .then(function(histogramResult) { let histogram = Histogram.fromHistogramResult(histogramResult); histogram.container = "histogram"; histogram.average = stats.avg; }) .catch(function(error) { console.log("there was an error: ", error); });
基本信息
以下是所在类或对象的基本信息。
AMD:
require(["esri/widgets/Histogram"], (Histogram) => { /* code goes here */ });
ESM:
import Histogram from "@arcgis/core/widgets/Histogram";
类:
esri/widgets/Histogram
继承: Histogram > Widget > Accessor
自从:用于 JavaScript 4.12 的 ArcGIS API
用法说明
Histogram.fromHistogramResult
函数(或属性)的定义如下:
相关用法
- JavaScript ArcGIS Histogram.layout用法及代码示例
- JavaScript ArcGIS Histogram.on用法及代码示例
- JavaScript ArcGIS Histogram.container用法及代码示例
- JavaScript ArcGIS Histogram.average用法及代码示例
- JavaScript ArcGIS Histogram.labelFormatFunction用法及代码示例
- JavaScript ArcGIS Histogram.max用法及代码示例
- JavaScript ArcGIS Histogram.visible用法及代码示例
- JavaScript ArcGIS Histogram.dataLines用法及代码示例
- JavaScript ArcGIS Histogram.barCreatedFunction用法及代码示例
- JavaScript ArcGIS Histogram.dataLineCreatedFunction用法及代码示例
- JavaScript ArcGIS Histogram.bins用法及代码示例
- JavaScript ArcGIS Histogram.min用法及代码示例
- JavaScript ArcGIS Histogram.when用法及代码示例
- JavaScript ArcGIS Histogram.classes用法及代码示例
- JavaScript ArcGIS HistogramRangeSlider.rangeType用法及代码示例
- JavaScript ArcGIS HistogramRangeSlider.labelFormatFunction用法及代码示例
- JavaScript ArcGIS HistogramRangeSlider.container用法及代码示例
- JavaScript ArcGIS HistogramRangeSlider.bins用法及代码示例
- JavaScript ArcGIS HistogramRangeSlider.excludedBarColor用法及代码示例
- JavaScript ArcGIS HistogramRangeSlider.min用法及代码示例
- JavaScript ArcGIS HistogramRangeSlider.standardDeviation用法及代码示例
- JavaScript ArcGIS HistogramRangeSlider.precision用法及代码示例
- JavaScript ArcGIS HistogramRangeSlider.average用法及代码示例
- JavaScript ArcGIS HistogramRangeSlider.on用法及代码示例
- JavaScript ArcGIS HistogramRangeSlider.classes用法及代码示例
注:本文由纯净天空筛选整理自arcgis.com大神的英文原创作品 Histogram.fromHistogramResult。非经特殊声明,原始代码版权归原作者所有,本译文未经允许或授权,请勿转载或复制。