Skip to content

How to have custom text for labels #1044

Answered by mbostock
rpivovar-godaddy asked this question in Q&A
Discussion options

You must be logged in to vote

One way to do this is to use the y-scale tickFormat option:

Plot.plot({
  y: {
    tickFormat: d => d ? "Up" : "Down"
  },
  marks: 
})

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@rpivovar-godaddy
Comment options

Answer selected by Fil
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