HistogramViewModel.js 1.3 KB

12345
  1. /*
  2. All material copyright ESRI, All Rights Reserved, unless otherwise specified.
  3. See https://js.arcgis.com/4.25/esri/copyright.txt for details.
  4. */
  5. import{_ as t}from"../../chunks/tslib.es6.js";import e from"../../core/Accessor.js";import{isSome as r}from"../../core/maybe.js";import{property as o}from"../../core/accessorSupport/decorators/property.js";import"../../core/arrayUtils.js";import"../../core/accessorSupport/ensureType.js";import{subclass as s}from"../../core/accessorSupport/decorators/subclass.js";let n=class extends e{constructor(t){super(t),this.average=null,this.bins=null,this.max=null,this.min=null}get binRange(){const{bins:t}=this;return t&&t.length>1?t[t.length-1].maxValue-t[0].minValue:0}set labelFormatFunction(t){this._set("labelFormatFunction",t)}get range(){const{max:t,min:e}=this;return r(t)&&r(e)?t-e:0}get state(){const{bins:t,range:e}=this;return e>0&&t&&t.length?"ready":"disabled"}};t([o()],n.prototype,"average",void 0),t([o()],n.prototype,"bins",void 0),t([o({readOnly:!0})],n.prototype,"binRange",null),t([o()],n.prototype,"labelFormatFunction",null),t([o()],n.prototype,"max",void 0),t([o()],n.prototype,"min",void 0),t([o({readOnly:!0})],n.prototype,"range",null),t([o({readOnly:!0})],n.prototype,"state",null),n=t([s("esri.widgets.Histogram.HistogramViewModel")],n);const a=n;export{a as default};