Skip to content

Change tickmark #1606

Answered by wyze
matobiely asked this question in Q&A
Jun 21, 2021 · 1 comments · 1 reply
Discussion options

You must be logged in to vote

You can pass a custom component to renderTick. The default implementation is here: https://github.com/plouc/nivo/blob/master/packages/axes/src/components/AxisTick.tsx

You would do something like the following:

function CustomTick(props) {
  return (
    <g>
      <circle {...} />
      <text {...}>{value</text>
    </g>
  )
}

function Chart() {
  return <Bar {...} axisBottom={{ renderTick: CustomTick }} />
}

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@matobiely
Comment options

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