What is different between d3.scale.linear() and d3.scaleLinear().

devquora
devquora

Posted On: Feb 22, 2018

 

To create scales showing the linear relationship between the output and input we use d3.scale.linear() and d3.scaleLinear(). The domain and range of the scale are set by default at the interval (0,1) which expresses the function y = x. It can be used for flipped range, nice bounds, round ranges, non-numerical range, camping, etc.

There is a minor difference between d3.scale.linear() and d3.scaleLinear() which is on the basis of its use.

  • If you want to create d3.js linear scale on version 3 then use API d3.scale.linear()
  • If you want to create d3.js linear scale on version 4 and 5 then use API d3.scaleLinear()

    Related Questions

    Please Login or Register to leave a response.

    Related Questions

    D3.js interview questions

    Define D3.js?

    D3.js is defined as a JavaScript-based library for manipulating documents based on data. D3 helps you bring data to lif..

    D3.js interview questions

    What does D3 stand for?

    D3 stands for Data-Driven Documents..

    D3.js interview questions

    Who developed D3.js?

    Mike Bostock wrote D3.js based on his work during his Ph.D. studies at the Stanford Visualization Group. Mike worked a..