Skip to content

find API for a function (tickFormat as an example) #2171

Answered by Fil
langenhoff asked this question in Q&A
Discussion options

You must be logged in to vote

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:

  /**
   * How to format inputs (abstract values) for axis tick labels; one of:
   *
   * - a [d3-format][1] string for numeric scales
   * - a [d3-time-format][2] string for temporal scales
   * - a function passed a tick *value* and *index*, returning a string
   *
   * [1]: https://d3js.org/d3-time
   * [2]: https://d3js.org/d3-time-format
   */
  tickFormat?: string | ((d: any, i: number) => any) | null;

This means that the _ (which is indeed the array of values) is an implement…

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@langenhoff
Comment options

@Fil
Comment options

@langenhoff
Comment options

Answer selected by langenhoff
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants