Skip to content

Y-axis customised ticks/label to use pound/euro symbol #3753

Closed Answered by ckifer
MarkForLoop asked this question in Q&A
Discussion options

You must be logged in to vote

Hey there, this will be easier with the tickFormatter function on the Axis

Please see https://codesandbox.io/s/composed-chart-with-axis-label-forked-28yq7f?file=/src/App.tsx as an example

      <YAxis
        label={{ value: "Index", angle: -90, position: "insideLeft" }}
        tickFormatter={(value) => `€${value}`}
      />

I just used the symbol for simplicity, but you can add your call to Intl.NumberFormat in there

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by ckifer
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