find API for a function (tickFormat as an example) #2171
-
Using the plot documention, I searched for tickFormat in the search bar. One match is the section about scales, which provides this hint: "The tickFormat option can either be a d3.format string or a function that takes a tick value and returns the corresponding string". Some examples from the gallery and code snippets I've seen lead to the assumption that it possible to have additional arguments, like so:
I guess: d is the current data, i is the index and the underscore represents the array of values. But this is only a guess. What is the recommended way of looking up the API (especially the arguments)? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
Plot includes TypeScript declarations with extensive documentation. We highly recommend using an editor with enhanced code completion such as Visual Studio Code or Observable. In this particular case we have:
This means that the |
Beta Was this translation helpful? Give feedback.
Plot includes TypeScript declarations with extensive documentation. We highly recommend using an editor with enhanced code completion such as Visual Studio Code or Observable.
In this particular case we have:
This means that the
_
(which is indeed the array of values) is an implement…