Nivo: Is there way to hide tick labels on bottom axis on Bar Charts

Created on 9 Feb 2018  路  6Comments  路  Source: plouc/nivo

I don't want to see my x-axis tick labels - it's too crowded down there, and am displaying the label on the bars themselves rather - so I have no need for the ticks.

Is there any way to get rid of it?

bar help wanted

Most helpful comment

Found this way:

axisBottom={{
  "orient": "bottom",
  "tickSize": 0,
  "tickPadding": 5,
  "tickRotation": 0,
  "format": () => null,
}}

Feels like a hack - but it works :)

All 6 comments

Found this way:

axisBottom={{
  "orient": "bottom",
  "tickSize": 0,
  "tickPadding": 5,
  "tickRotation": 0,
  "format": () => null,
}}

Feels like a hack - but it works :)

@joergd, you can just set axisBottom={undefined}

Tried it - but didn't work ... But it's ok - the hack above works well.

This is exactly what I faced. Since after a certain number of entries, the tick labels overlap on each other. Hopefully there is a simple boolean toggle for this, which would simply show/hide tick label.

@joergd, you can just set axisBottom={undefined}

the right way is axisBottom={null}

While axisBottom={null} works if you wish to hide the axis altogether, this workaround helps if you would like to hide the tick marks, but keep the axis label, which was my situation.
Thanks @joergd !

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ellipticaldoor picture ellipticaldoor  路  4Comments

gcloeval picture gcloeval  路  3Comments

knackjax picture knackjax  路  3Comments

dubzzz picture dubzzz  路  3Comments

PattieC4ke picture PattieC4ke  路  3Comments