Y axis not showing correct numeric values for charts

Hi.
I am a new user to Observable and not able to find a small configuration miss (I hope!)
Here is the link to my notebook: Notebook

The Y-axis on the charts are not showing the correct value as represented in the table.

What could be the configuration I am missing?

Hi Chirag!
Welcome to Observable and to the Forum.
I sent you a suggestion (you can merge it from your notebook):
https://observablehq.com/compare/5b1441331cba1414...ecd7c231b1fc5458

All that was needed was some marginLeft to allow for the large numbers on the y axis.

1 Like

Instead of increasing the margin I would recommend to use a custom tick formatter:

Plot.barY(data, {
  x: "Year",
  y: "Jeeps",
}).plot({y: {
  tickFormat: d => Intl.NumberFormat('en-US', {notation: 'compact'}).format(d),
}})

which gives you

You can read more about the available NumberFormat options here:

1 Like

Thanks @mootari and @Cobus . This was exactly the setting I was missing.

1 Like