Manjush
Manjush

Reputation: 524

How to avoid X axis to display decimal values

I have a question about formatting my axis on highcharts. I want to display the ticks on the X axis to avoid decimals and display only whole numbers.

The current situation:

0
0.05
1
1.5
2

I want to display my number like this:

1
2
3

The Decimal number place should be left blank.

Is there an easy way to do this?

Upvotes: 0

Views: 275

Answers (1)

Paweł Fus
Paweł Fus

Reputation: 45079

I'm pretty sure the same topic already exists, but can't find it, though. Anyway, there is a couple of solutions, two easiest:

You can also play around with formatter and tickPositioner.

Upvotes: 1

Related Questions