VOOZH about

URL: https://www.geeksforgeeks.org/javascript/d3-tickincrement-function/

⇱ d3.tickIncrement() Function - GeeksforGeeks


  • Courses
  • Tutorials
  • Interview Prep

d3.tickIncrement() Function

Last Updated : 29 May, 2021

The tickIncrement() function of D3.js is used whenever one needs to be sure that the start is always less than the stop where the start and stop are given as a parameter in this function. If the tick step for the given start, stop and count is less than one then it returns the negative inverse tick step.

Syntax:

d3.tickIncrement(start, stop, count)

Parameter: This function accepts three parameters as mentioned above and describe below.

  • start: It is the starting value from where we want the array element, it is inclusive.
  • stop: It is the starting value to which we want the array element to be, it is inclusive.
  • count: It is the number of elements we want in a given start and stop range.

Return value: It returns an integer.

Example 1: When start is greater than stop:

Output:

👁 Image

Example 2: When the tick step is less than one:

Output:

👁 Image
Comment
Article Tags: