Example #1

var min = 100;
var max = 1000;

$('#test1').nutritionLabel({
	width : 380,
	showLegacyVersion : false,
	showUKVersion : true,
	showItemNameForUK : true,
	showDailySugars : true,

	dailyValueTotalFat : 70, //this should be 70 for the uk version
	dailyValueCarb : 260, //this should be 260 for the uk version
	dailyValueSugar : 90, //this should be 90 for the uk version

	textCalories : 'Energy',
	textTotalCarb : 'Carbohydrate',
	textFibers : 'Fibre',
	textSodium : 'Salt',

	itemName : 'Demo FDA Rounding Off',

	valueServingWeightGrams : Math.floor((Math.random() * max) + min) * .1,
	valueCalories : Math.floor((Math.random() * max) + min) * .1,
	valueTotalFat : Math.floor((Math.random() * max) + min) * .1,
	valueSatFat : Math.floor((Math.random() * max) + min) * .1,
	valueTotalCarb : Math.floor((Math.random() * max) + min) * .1,
	valueSugars : Math.floor((Math.random() * max) + min) * .1,
	valueFibers : Math.floor((Math.random() * max) + min) * .1,
	valueProteins : Math.floor((Math.random() * max) + min) * .1,
	valueSodium : Math.floor((Math.random() * max) + min) * .1
});



Example #2

var min = 100;
var max = 1000;

$('#test2').nutritionLabel({
	width : 380,
	showLegacyVersion : false,
	showUKVersion : true,
	showItemNameForUK : true,
	showDailySugars : true,

	dailyValueTotalFat : 70, //this should be 70 for the uk version
	dailyValueCarb : 260, //this should be 260 for the uk version
	dailyValueSugar : 90, //this should be 90 for the uk version

	textCalories : 'Energy',
	textTotalCarb : 'Carbohydrate',
	textFibers : 'Fibre',
	textSodium : 'Salt',

	itemName : 'Demo FDA Rounding On',
	allowFDARounding : true,

	valueServingWeightGrams : Math.floor((Math.random() * max) + min) * .1,
	valueCalories : Math.floor((Math.random() * max) + min) * .1,
	valueTotalFat : Math.floor((Math.random() * max) + min) * .1,
	valueSatFat : Math.floor((Math.random() * max) + min) * .1,
	valueTotalCarb : Math.floor((Math.random() * max) + min) * .1,
	valueSugars : Math.floor((Math.random() * max) + min) * .1,
	valueFibers : Math.floor((Math.random() * max) + min) * .1,
	valueProteins : Math.floor((Math.random() * max) + min) * .1,
	valueSodium : Math.floor((Math.random() * max) + min) * .1
});