require(["esri/dijit/OpacitySlider"], function(OpacitySlider) { /* code goes here */ });
      Description
       (Added at v3.13)
A widget to assist with managing opacity with a renderer.
 
      Samples
      Search for 
samples that use this class.
      
Class hierarchy
      esri/dijit/RendererSlider
|_esri/dijit/OpacitySlider
      
      Constructors
      
      
      CSS
esri/dijit/OpacitySlider | Download source
      
        
        | NumberTextBoxContainer | None | 
        | bottomLabelNode | None | 
        | esriRendererSlider | None | 
        | handler | None | 
        | handlerLabel | None | 
        | handlerTick | None | 
        | handlerTickBottom | None | 
        | handlerTickTop | None | 
        | moveable | None | 
        | sliderArea | None | 
        | sliderAreaRight | None | 
        | sliderNode | None | 
        | topLabelNode | None | 
      
      
      Properties
      
      Methods
      
        
        | startup() | None | Finalizes the creation of the widget. | 
      
      Events
[ On Style Events | Connect Style Event ]
All On Style event listeners receive a single event object. Additionally, the event object also contains a 'target' property whose value is the object which fired the event.
      Constructor Details
      
        
        Creates a new OpacitySlider widget within the provided DOM node srcNodeRef.
        Parameters: 
      
        <Object> params | 
        Required | 
        Set of parameters used to specify the OpacitySlider widget options. | 
      
      
        <Node | String> srcNodeRef | 
        Required | 
        Reference or ID of the HTMLElement where the widget should be rendered. | 
      
         params properties: 
      
        <Number[]> handles | 
        Required | 
        Handles identified by their index values within the stops array. | 
      
      
        <Object> histogram | 
        Optional | 
        Represents the histogram data object. Access this from the FeatureLayerStatistics.getHistogram response. See the object specifications table below for the structure of the returned histogram object. | 
      
      
        <Number> histogramWidth | 
        Optional | 
        Width of histogram in pixels. Default value is 100. | 
      
      
        <Number> maxValue | 
        Optional | 
        The absolute maximum value of the slider. NOTE: This value overrides the statistics max property. Default value is 100. | 
      
      
        <Number> minValue | 
        Optional | 
        The absolute minimum value of the slider. NOTE: This value overrides the statistics min property. Default value is 0. | 
      
      
        <Object> opacityInfo | 
        Required | 
        The data map containing renderer information. See Renderer.opacityInfo for additional information. | 
      
      
        <Number> primaryHandle | 
        Optional | 
        The handle identified by its index value within the stops array. This value must also be in handles array. | 
      
      
        <Number> rampWidth | 
        Optional | 
        Represents the width of the SVG ramp in pixels. Default is 26. | 
      
      
        <Boolean> showHandles | 
        Optional | 
        Displays slider handles when true. Default value is true. | 
      
      
        <Boolean> showHistogram | 
        Optional | 
        Displays the histogram when true. Default value is true. | 
      
      
        <Boolean> showLabels | 
        Optional | 
        Displays slider labels when true. Default value is true. | 
      
      
        <Boolean> showTicks | 
        Optional | 
        Displays slider ticks when true. Default is true. | 
      
      
        <Boolean> showTransparentBackground | 
        Optional | 
        Displays the transparent background when true. Default is true. | 
      
      
        <Object> statistics | 
        Optional | 
        Represents a statistics data object. Access this from the FeatureLayerStatistics.getFieldStatistics response.  | 
      
      
        <Object> zoomOptions | 
        Optional | 
        Additional options to customize slider. For example, if the slider has a range between 0 and 100 with two handles at 10 and 20, it is possible to pass in zoomOptions with 0 and 30 for the minSliderValue and maxSliderValue. The slider would be cut off at the top and zoomed to a ramp that can move from 0 through 30. Default is null.
See the zoomOptions table below for additional information. | 
      
         Sample: 
require(["esri/dijit/OpacitySlider"], function (OpacitySlider) {
  var oInfo = {
    "field": "C_Seq",
    "stops": [
      {"value": 10, "opacity": .2},
      {"value": 164,"opacity": .9}
    ]
  };
  var opacitySlider = new OpacitySlider({
    opacityInfo: oInfo,
    statistics:{min: 0, max: 200},
    showLabels : true,
    showTicks: true,
  }, "opacitySliderDiv");
  opacitySlider.startup();
}
 
       Property Details
            
        
        Required: Handles identified by their index values within the 
stops array.
         Default value: []
       
      
        
        Optional: Represents the 
histogram data object. Access this from the 
FeatureLayerStatistics.getHistogram response. See the object specifications table below for the structure of the returned histogram object.
         Default value: null
        Object Specifications: <histogram>
      
        <Object[]> bins | 
        Required | 
        An array of objects indicating bins in the histogram. It contains the number of features that fall into each of the disjoint categories in the histogram.
The object includes the following properties:- count: Numeric value indicating the count in each bin.
 - maxValue: Numeric value indicating the maximum value for the specified bin.
 - minValue: Numeric value indicating the minimum value for the specified bin.
 
  | 
      
      
        <Number> maxValue | 
        Required | 
        Maximum value captured by the histogram. This is optional if statistics are passed in. | 
      
      
        <Number> minValue | 
        Required | 
        Minimum value captured by the histogram. This is optional if statistics are passed in. | 
      
      
        <Number> normalizationTotal | 
        Optional | 
        Sum of all data values used to normalize data. Available only when normalizationType is percent-of-total. | 
      
 
       
      
        
        Optional: Width of histogram in pixels. 
        Default value: 100
       
      
        
        Optional: The absolute maximum value of the slider. 
NOTE: This value overrides the 
statistics max property.
         Default value: 100
       
      
        
        Optional: The absolute minimum value of the slider. 
NOTE: This value overrides the 
statistics min property.
         Default value: 0
       
      
        
        Required: The data map containing renderer information. See 
Renderer.opacityInfo for additional information.
         Default value: null
       
      
        
        Optional: The handle identified by its index value within the 
stops array. This value must also be in 
handles array.
         Default value: null
       
      
        
        Optional: Represents the width of the SVG ramp in pixels.
        Default value: 26
       
      
        
        Optional: Indicates whether to display slider handles.
        Known values: true | false
        Default value: true
       
      
        
        Optional: Indicates whether to display the histogram.
        Known values: true | false
        Default value: true
       
      
        
        Optional: Indicates whether to display slider labels.
        Known values: true | false
        Default value: true
       
      
        
        Optional: Indicates whether to display slider tick marks.
        Known values: true | false
        Default value: true
       
      
        
        Optional: Indicates whether to display the transparent background.
        Known values: true | false
        Default value: false
       
      
      
        
        Required: Handle positions represented as numbers that fall between minimum and maximum.
        Default value: [50]
       
      
        
        Optional: Additional options to customize slider. For example, if the slider has a range between 0 and 100 with two handles at 10 and 20, it is possible to pass in zoomOptions with 0 and 30 for the minSliderValue and maxSliderValue. The slider would be cut off at the top and zoomed to a ramp that can move from 0 through 30.
See the zoomOptions table below for additional information.
        Default value: null
        Object Specifications: <zoomOptions>
      
        <Object> histogram | 
        Required | 
        Histogram data object. | 
      
      
        <Number> maxSliderValue | 
        Required | 
        Maximum value of slider. | 
      
      
        <Number> minSliderValue | 
        Required | 
        Minimum value of the slider. | 
      
 
       
      Method Details
      
        
        Finalizes the creation of the widget.
       
      Event Details
[ On Style Events | Connect Style Event ]
      
        
                Event Object Properties: 
      
        <Number> maxValue | 
        Maximum value of the slider. | 
      
      
        <Number> minValue | 
        Minimum value of the slider. | 
      
      
        <Object> opacityInfo | 
        The  opacityInfo of the OpacitySlider object. | 
      
 
       
      
        
        Fires on slide stop and when a handle is updated via textbox.
        
       
      
        
        Fires when the zoom state changes. (Added at v3.15)
        Event Object Properties: 
      
        <Boolean> zoomed | 
        Indicates whether the slider is currently in a zoomed state. | 
      
 
              
        
        Fires when the zoom state changes. (Added at v3.15)
        Event Object Properties: 
      
        <Boolean> zoomed | 
        Indicates whether the slider is currently in a zoomed state. |