Download BMI calculator

Demo

Bookmark and Share

Licensing

This script is distributed under the LGPL open source license.
Commercial licenses are also available. Some of these licenses also includes personal e-mail support for up to 1 year.

Put this into your <HEAD> section

Put this into your <BODY> section

Configuration

Just put the code for the <BODY> section where you want the calculator to appear on your page.

You use CSS and Javascript to configure how the graph should appear. Here are the Javascript variables you could modify:
var useCm = true; // Using centimetre for height, false = inch
var useKg = true // Using kilos for weight, false = pounds
var graphColors = ['#6600CC','#66CC00','#00CCCC','#CC0000'];
var graphLabels = ['Below 18.5: Underweight','18.5 24.9: Normal','25.0 29.9: Overweight','30 and above: Obese'];
var labelsPerRow = 1; /* Help labels above graph */
var barHeight = 300; // Total height of bar
var barWidth = 50; // Width of bars */

  • useCm = true if you use "cm" for height, false if you use inches
  • useKg = true if you use "kg" for weight, false if you use pounds
  • graphColors = array of the colors used in the left bar
  • graphLabels = The labels appearing above the bars
  • labelsPerRow = Number of labels per row above the bars
  • barHeight = Total height of bars
  • barWidth = Width of bars

Comments

Barry
I have a wordpress site and would would like to know exactly how to go about installing the BMI Calculator on it, as I have very little knowledge of script editoring.Any help would be appreciated.Thankyou
Barry at 03:13AM, 2012/02/07.
me
thank you, it works great
me at 11:22PM, 2013/01/06.

Post your comment

Don't have an avatar? Create one at Gravatar.com.

Confirmation code:

Go to cbolson.com


About/Contact | A good idea? | Submit a script | Privacy notice
© 2005 - 2017 dhtmlgoodies.com