# How can I get these numbers to round up?

I've got several recordsets that I want to display as graphs. I want to select the highest value and round it up so the graph doesn't stop at the hightest value.

So, if one recordset is .9345, I want to round it up to 1.

If I've got another recordset and the top value is 1,23456, I want to round it up to 1,30000.

I've looked at ceil, but I need to round up and I also need control of decimal places.

Any ideas?
###### Who is Participating?

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Commented:
You want to round up to the nearest tenths then:

"values": [Math.ceil(1.2546 * 10)/10, Math.ceil(.9345 * 10)/10, Math.ceil(2.4096 * 10)/10, Math.ceil(.9059 * 10)/10, Math.ceil(.7794 * 10)/10, Math.ceil(1.8678 * 10)/10 ]

Results:
1.3, 1, 2.5, 1, 0.8, 1.9

Experts Exchange Solution brought to you by