Search results

TicksDataModel API in Angular Slider API component

Interface for a class TicksData

Properties

format

string

It is used to customize the Slider scale value to the desired format using Internationalization or events(custom formatting).

 <ejs-slider id='default' [value]='value' [ticks]="ticksData"></ejs-slider>
import { Component } from '@angular/core';

@Component({
    selector: 'my-app',
    templateUrl: 'app/template.html',
    styleUrls:['index.css'],
})
export class AppComponent {
    public value: number = 30;
     public ticksData: Object = 
     { 
     placement: 'After', 
     format: 'C2', 
     largeStep: 20, 
     smallStep: 10, 
     showSmallTicks: true 
     };
}

largeStep

number

It is used to denote the distance between two major (large) ticks from the scale of the Slider.

 <ejs-slider id='default' [value]='value' [ticks]="ticks"></ejs-slider>
import { Component } from '@angular/core';

@Component({
    selector: 'my-app',
    templateUrl: 'app/template.html',
    styleUrls:['index.css'],
})
export class AppComponent {
    public value: number = 30;
    public ticks: Object = {
        largeStep: 20,placement: 'After',
    };
}

placement

Placement

It is used to denote the position of the ticks in the Slider. The available options are:

  • before - Ticks are placed in the top of the horizontal slider bar or at the left of the vertical slider bar.
  • after - Ticks are placed in the bottom of the horizontal slider bar or at the right of the vertical slider bar.
  • both - Ticks are placed on the both side of the Slider bar.
  • none - Ticks are not shown.
 <ejs-slider id='default' [value]='value' [ticks]="ticks"></ejs-slider>
import { Component } from '@angular/core';

@Component({
    selector: 'my-app',
    templateUrl: 'app/template.html',
    styleUrls:['index.css'],
})
export class AppComponent {
    public value: number = 30;
    public ticks: Object = {
        placement: 'Before'
    };
}

showSmallTicks

boolean

We can show or hide the small ticks in the Slider, which will be appeared in between the largeTicks.

smallStep

number

It is used to denote the distance between two minor (small) ticks from the scale of the Slider.

 <ejs-slider id='default' [value]='value' [ticks]="ticks"></ejs-slider>
import { Component } from '@angular/core';

@Component({
    selector: 'my-app',
    templateUrl: 'app/template.html',
    styleUrls:['index.css'],
})
export class AppComponent {
    public value: number = 30;
    public ticks: Object = {
        placement: 'After',
        smallStep: 5
    };
}