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?
Bruce GustPHP DeveloperAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

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.

Tom BeckCommented:
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 ]

1.3, 1, 2.5, 1, 0.8, 1.9

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Bruce GustPHP DeveloperAuthor Commented:
That will work, Tom!

Thank you, sir!
Tom BeckCommented:
You're welcome. Glad it worked for you.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.