🚀 Socket Launch Week Day 5:Introducing Repository Access Permissions and Custom Roles.Learn more
Sign In

ng-intervals

Package Overview
Dependencies
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ng-intervals

Show used intervals on axis

latest
Source
npmnpm
Version
20.0.0
Version published
Maintainers
1
Created
Source

Intervals

Show used intervals on axis

Install

npm install ng-intervals

Usage

Import NgIntervalsComponent into your app's module.

Module
import { BrowserModule } from '@angular/platform-browser';
 import { NgModule } from '@angular/core';
 
 
 import { AppComponent } from './app.component';
 import {NgIntervalsComponent} from 'ng-ranges';
 
 
 @NgModule({
   declarations: [
     AppComponent
   ],
   imports: [
     BrowserModule,
     NgIntervalsComponent
   ],
   providers: [],
   bootstrap: [AppComponent]
 })
 export class AppModule { }
Component
import {Component} from '@angular/core';
import {Intervals} from './intervals/intervals.component';

@Component({
 selector: 'app-root',
 templateUrl: './app.component.html',
 styleUrls: ['./app.component.scss']
})

export class AppComponent {
 
 public intervals: Intervals[] = [
   {
     lower: 0,
     lowerClose: true,
     upper: 0.3456,
     upperClose: true,
     color: '#f3df0b'
   },
   {
     lower: 0.5,
     lowerClose: true,
     upper: 0.8234567342,
     upperClose: true
   }
 ];
}
View
<intervals [min]="0" [max]="1" [intervals]="intervals"></intervals>

Inputs

  • min - Minimal value of interval
  • max - Maximal value of interval
  • intervals - Datas of interval, example:
  • color - optional range color,

example:

{
     lower: 0, //lower value
     lowerClose: true, //is left-closed
     upper: 0.3456, // upper value
     upperClose: true //is right-closed
}
  • tooltip - Show tooltip with interval value. Default: false
  • styleOptions - Object with intervals colors or height:
  {
    childIntervalColor: 'yellow', // color of added intervals
    mainIntervalColor: 'white' // color of main container
    mainIntervalHeight: '20' // height of main container
  }
<intervals  [tooltip]="true"
            [min]="0"
            [max]="1"
            [intervals]="intervals"
            [styleOptions]="{childIntervalColor: 'yellow', mainIntervalColor: 'white', mainIntervalHeight: '20'}">
</intervals>

FAQs

Package last updated on 21 Jul 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts