Orientation

28 Jun 20171 minute to read

This property is used to set the Slider in either horizontal or vertical direction. By default, Slider renders in horizontal direction. Data type of this property is “enum”.

Possible Slider orientations are as follows,

Property Table for JavaScript

Property Allowed values Description
orientation ej.Orientation.Vertical Displays the Slider in vertical direction
ej.Orientation.Horizontal (default value) Displays the Slider in horizontal direction

The following steps explains you on how to configure the orientation property.

In an HTML page, add a <div> element to render it as a Slider widget.

  • HTML
  • <div id="rangeSlider" ej-slider e-width="width" e-height="height" e-values="slidevalue" e-orientation='Vertical'></div>
  • JAVASCRIPT
  • angular.module('syncApp', ['ejangular'])
            .controller('SliderCtrl', function ($scope) {
                $scope.sliderValue = 60;
                $scope.width = 16;
                $scope.height = 150;
                $scope.Vertical = ej.Orientation.Vertical;
            });

    Execute the above code example to render the following output.