Default values shown as well
width : 280
allowCustomWidth : false
widthCustom : 'auto'
allowNoBorder : false
Enable rounding of the nutritional values based on the FDA rounding rules http://goo.gl/RMD2O
allowFDARounding : false
useMassForVitamins : false,
allowGoogleAnalyticsEventLog : false
gooleAnalyticsFunctionName : 'ga'
userFunctionNameOnQuantityChange: null
userFunctionOnQuantityChange: null
hideNotApplicableValues : false
hidePercentDailyValues : false
brandName : 'Brand where this item belongs to'
scrollLongIngredients : false
scrollHeightComparison : 100
scrollHeightPixel : 95
Set how many decimal places will be shown on the nutrition values (calories, fat, protein, vitamin a, iron, etc)
decimalPlacesForNutrition : 1
decimalPlacesForDailyValues : 0
decimalPlacesForQuantityTextbox : 1
scrollLongItemName : true
scrollLongItemNamePixel : 36
scrollLongItemNamePixel2018Override : 34 // this is needed to fix some issues on the 2018 label as the layout of the label is very different than the legacy one
showBottomLink : false
urlBottomLink : 'http://www.nutritionix.com'
nameBottomLink : 'Nutritionix'
This value can be changed and the value of the nutritions will be affected directly. The computation is
"current nutrition value" * "serving unit quantity value" = "final nutrition value"
- This can't be less than zero, all values less than zero are converted to zero
- The textbox to change this value is visible / enabled by default
- If the initial value of the serving size unit quantity is less than or equal to zero, it is converted to 1.0
- When enabled, user can change this value by clicking the arrow or changing the value on the textbox and pressing enter. the value on the label will be updated automatically
On all cases below showServingUnitQuantityTextbox == true AND showServingUnitQuantity == true
- "[ ]" means a textbox will be shown
- If
showServingUnitQuantity == false
, the values that should be on the 'serving size div' are empty or null
- RESULT: textServingSize [valueServingUnitQuantity] valueServingSizeUnit
On all cases below showServingUnitQuantityTextbox == true AND showItemName == true
If showItemName == false
, the values that should be on the 'item name div' are empty or null
- RESULT:
[valueServingUnitQuantity default to 1.0] itemName
- RESULT:
[valueServingUnitQuantity] itemName
- RESULT:
[valueServingUnitQuantity default to 1.0] itemName
valueServingUnitQuantity : 1.0
valueServingSizeUnit : ''
showServingUnitQuantityTextbox : true
This is just added here instead of a global variable to prevent a bug when there are multiple instances of the plugin like on the demo pages
originalServingUnitQuantity : 0
nutritionValueMultiplier : 1
itemName : 'Item / Ingredient Name'
showServingUnitQuantity : true
hideTextboxArrows : false
totalContainerQuantity : 1
calorieIntake : 2000
dailyValueTotalFat : 65
dailyValueSatFat : 20
dailyValueCholesterol : 300
dailyValueSodium : 2400
dailyValuePotassium : 3500
dailyValuePotassium_2018 : 4700
dailyValueCarb : 300
dailyValueFiber : 25
dailyValueCalcium : 1300
dailyValueIron : 18
dailyValueVitaminD : 20
dailyValueAddedSugar : 50
dailyValueVitaminA_2018 : 5000
dailyValueVitaminC_2018 : 60
dailyValueVitaminE : 30
dailyValueVitaminK : 80
dailyValueThiamin : 1.5
dailyValueRiboflavin : 1.7
dailyValueNiacin : 20
dailyValueVitaminB6 : 2
dailyValueFolate : 400
dailyValueVitaminB12 : 6
dailyValueBiotin : 300
dailyValuePantothenicAcid : 10
dailyValuePhosphorus : 1000
dailyValueIodine : 150
dailyValueMagnesium : 400
dailyValueZinc : 15
dailyValueSelenium : 70
dailyValueCopper : 2
dailyValueManganese : 2
dailyValueChromium : 120
dailyValueMolybdenum : 75
dailyValueChloride : 3400
showCalories : true
showFatCalories : true
showTotalFat : true
showSatFat : true
showTransFat : true
showPolyFat : false
showMonoFat : false
showCholesterol : true
showSodium : true
showPotassium: false // this is for the legacy version, this is the only value that is default to be hidden
showPotassium_2018: true // this is for the 2018 version
showTotalCarb : true
showFibers : true
showSugars : true
showAddedSugars : true
showSugarAlcohol : false
showProteins : true
showVitaminA : true
showVitaminA_2018: false // optional in 2018
showVitaminC : true
showVitaminC_2018: false // optional in 2018
showVitaminD : true
showCalcium : true
showIron : true
These can be included, but are not required by the FDA as of 2018
Disabled by default
showVitaminE: false,
showVitaminK: false,
showThiamin: false,
showRiboflavin: false,
showNiacin: false,
showVitaminB6: false,
showFolate: false,
showVitaminB12: false,
showBiotin: false,
showPantothenicAcid: false,
showPhosphorus: false,
showIodine: false,
showMagnesium: false,
showZinc: false,
showSelenium: false,
showCopper: false,
showManganese: false,
showChromium: false,
showMolybdenum: false,
showChloride: false,
showAmountPerServing : true
Show the 'servings per container' data and replace the default 'Serving Size' value (without unit and servings per container text and value)
showServingsPerContainer : false
Show the item name. there are special cases where the item name is replaced with 'servings per container' value
showItemName : true
showBrandName : false
showIngredients : true
showCalorieDiet : false
showCustomFooter : false
showDisclaimer : false
scrollDisclaimerHeightComparison : 100
scrollDisclaimer : 95
valueDisclaimer : 'Please note that these nutrition values are estimated based on our standard serving portions. ' +
'As food servings may have a slight variance each time you visit, please expect these values to be with in 10% +/- of your actual meal. ' +
'If you have any questions about our nutrition calculator, please contact Nutritionix.'
ingredientLabel : 'INGREDIENTS:'
valueCustomFooter : ''
The are to set some values as 'not applicable'. this means that the nutrition label will appear but the value will be a 'gray dash'
naCalories : false
naFatCalories : false
naTotalFat : false
naSatFat : false
naTransFat : false
naPolyFat : false
naMonoFat : false
naCholesterol : false
naSodium : false
naPotassium : false // this is for the legacy version
naPotassium_2018 : false // this is for the 2018 version
naTotalCarb : false
naFibers : false
naSugars : false
naAddedSugars : false
naSugarAlcohol : false
naProteins : false
naVitaminA : false
naVitaminA_2018: false
naVitaminC : false
naVitaminC_2018: false
naVitaminD : false
naCalcium : false
naIron : false
naVitaminE: false
naVitaminK: false
naThiamin: false
naRiboflavin: false
naNiacin: false
naVitaminB6: false
naFolate: false
naVitaminB12: false
naBiotin: false
naPantothenicAcid: false
naPhosphorus: false
naIodine: false
naMagnesium: false
naZinc: false
naSelenium: false
naCopper: false
naManganese: false
naChromium: false
naMolybdenum: false
naChloride: false
valueServingWeightGrams : 0
valueServingPerContainer : 1
valueCalories : 0
valueFatCalories : 0
valueTotalFat : 0
valueSatFat : 0
valueTransFat : 0
valuePolyFat : 0
valueMonoFat : 0
valueCholesterol : 0
valueSodium : 0
valuePotassium : 0 // this is for the legacy version
valuePotassium_2018 : 0 // this is for the 2018 version
valueTotalCarb : 0
valueFibers : 0
valueSugars : 0
valueAddedSugars : 0
valueSugarAlcohol : 0
valueProteins : 0
valueVitaminA : 0 // this is for the legacy version
valueVitaminA_2018: 0 // this is for the 2018 version, optional
valueVitaminC : 0 // this is for the legacy version
valueVitaminC_2018: 0 // this is for the 2018 version, optional
valueVitaminD : 0
valueCalcium : 0
valueIron : 0
valueVitaminE: 0
valueVitaminK: 0
valueThiamin: 0
valueRiboflavin: 0
valueNiacin: 0
valueVitaminB6: 0
valueFolate: 0
valueVitaminB12: 0
valueBiotin: 0
valuePantothenicAcid: 0
valuePhosphorus: 0
valueIodine: 0
valueMagnesium: 0
valueZinc: 0
valueSelenium: 0
valueCopper: 0
valueManganese: 0
valueChromium: 0
valueMolybdenum: 0
valueChloride: 0
unitCalories : ''
unitFatCalories : ''
unitTotalFat : '<span aria-hidden="true">g</span><span class="sr-only"> grams</span>'
unitSatFat : '<span aria-hidden="true">g</span><span class="sr-only"> grams</span>'
unitTransFat : '<span aria-hidden="true">g</span><span class="sr-only"> grams</span>'
unitPolyFat : '<span aria-hidden="true">g</span><span class="sr-only"> grams</span>'
unitMonoFat : '<span aria-hidden="true">g</span><span class="sr-only"> grams</span>'
unitCholesterol : '<span aria-hidden="true">mg</span><span class="sr-only"> milligrams</span>'
unitSodium : '<span aria-hidden="true">mg</span><span class="sr-only"> milligrams</span>'
unitPotassium : '<span aria-hidden="true">mg</span><span class="sr-only"> milligrams</span>' // this is for the legacy version
unitPotassium_base : '<span aria-hidden="true">mg</span><span class="sr-only"> milligrams</span>' // this is for the 2018 version
unitPotassium_percent : '%' // this is for the 2018 version
unitTotalCarb : '<span aria-hidden="true">g</span><span class="sr-only"> grams</span>'
unitFibers : '<span aria-hidden="true">g</span><span class="sr-only"> grams</span>'
unitSugars : '<span aria-hidden="true">g</span><span class="sr-only"> grams</span>'
unitAddedSugars : '<span aria-hidden="true">g</span><span class="sr-only"> grams</span>'
unitSugarAlcohol : '<span aria-hidden="true">g</span><span class="sr-only"> grams</span>'
unitProteins : '<span aria-hidden="true">g</span><span class="sr-only"> grams</span>'
unitVitaminA : '%'
unitVitaminA_base: '<span aria-hidden="true"> IU</span><span class="sr-only"> international units</span>' // this is for the 2018 version
unitVitaminA_percent: "%" // this is for the 2018 version
unitVitaminC : '%'
unitVitaminC_base: '<span aria-hidden="true">mg</span><span class="sr-only"> milligrams</span>' // this is for the 2018 version
unitVitaminC_percent: "%" // this is for the 2018 version
unitVitaminD_base : '<span aria-hidden="true">mcg</span><span class="sr-only"> micrograms</span>' // this is for the 2018 version
unitVitaminD_percent : '%' // this is for the 2018 version
unitCalcium : '%'
unitCalcium_base : '<span aria-hidden="true">mg</span><span class="sr-only"> milligrams</span>' // this is for the 2018 version
unitCalcium_percent : '%' // this is for the 2018 version
unitIron : '%'
unitIron_base : '<span aria-hidden="true">mg</span><span class="sr-only"> milligrams</span>' // this is for the 2018 version
unitIron_percent : '%' // this is for the 2018 version
unitVitaminE_base: '<span aria-hidden="true"> IU</span><span class="sr-only"> international units</span>'
unitVitaminE_percent: "%"
unitVitaminK_base: '<span aria-hidden="true"> IU</span><span class="sr-only"> international units</span>'
unitVitaminK_percent: "%"
unitThiamin_base: '<span aria-hidden="true">mg</span><span class="sr-only"> milligrams</span>'
unitThiamin_percent: "%"
unitRiboflavin_base: '<span aria-hidden="true">mg</span><span class="sr-only"> milligrams</span>'
unitRiboflavin_percent: "%"
unitNiacin_base: '<span aria-hidden="true">mg</span><span class="sr-only"> milligrams</span>'
unitNiacin_percent: "%"
unitVitaminB6_base: '<span aria-hidden="true">mg</span><span class="sr-only"> milligrams</span>'
unitVitaminB6_percent: "%"
unitFolate_base: '<span aria-hidden="true">µg</span><span class="sr-only"> micrograms</span>'
unitFolate_percent: "%"
unitVitaminB12_base: '<span aria-hidden="true">µg</span><span class="sr-only"> micrograms</span>'
unitVitaminB12_percent: "%"
unitBiotin_base: '<span aria-hidden="true">µg</span><span class="sr-only"> micrograms</span>'
unitBiotin_percent: "%"
unitPantothenicAcid_base: '<span aria-hidden="true">mg</span><span class="sr-only"> micrograms</span>'
unitPantothenicAcid_percent: "%"
unitPhosphorus_base: '<span aria-hidden="true">mg</span><span class="sr-only"> micrograms</span>'
unitPhosphorus_percent: "%"
unitIodine_base: '<span aria-hidden="true">µg</span><span class="sr-only"> micrograms</span>'
unitIodine_percent: "%"
unitMagnesium_base: '<span aria-hidden="true">mg</span><span class="sr-only"> micrograms</span>'
unitMagnesium_percent: "%"
unitZinc_base: '<span aria-hidden="true">mg</span><span class="sr-only"> micrograms</span>'
unitZinc_percent: "%"
unitSelenium_base: '<span aria-hidden="true">µg</span><span class="sr-only"> micrograms</span>'
unitSelenium_percent: "%"
unitCopper_base: '<span aria-hidden="true">mg</span><span class="sr-only"> micrograms</span>'
unitCopper_percent: "%"
unitManganese_base: '<span aria-hidden="true">mg</span><span class="sr-only"> micrograms</span>'
unitManganese_percent: "%"
unitChromium_base: '<span aria-hidden="true">µg</span><span class="sr-only"> micrograms</span>'
unitChromium_percent: "%"
unitMolybdenum_base: '<span aria-hidden="true">µg</span><span class="sr-only"> micrograms</span>'
unitMolybdenum_percent: "%"
unitChloride_base: '<span aria-hidden="true">mg</span><span class="sr-only"> micrograms</span>'
unitChloride_percent: "%"
valueCol1CalorieDiet : 2000
valueCol2CalorieDiet : 2500
valueCol1DietaryTotalFat : 0
valueCol2DietaryTotalFat : 0
valueCol1DietarySatFat : 0
valueCol2DietarySatFat : 0
valueCol1DietaryCholesterol : 0
valueCol2DietaryCholesterol : 0
valueCol1DietarySodium : 0
valueCol2DietarySodium : 0
valueCol1DietaryPotassium : 0
valueCol2DietaryPotassium : 0
valueCol1DietaryTotalCarb : 0
valueCol2DietaryTotalCarb : 0
valueCol1Dietary : 0
valueCol2Dietary : 0
These text settings are so you can create nutrition labels in different languages or to simply change them as needed
textNutritionFacts : 'Nutrition Facts'
textDailyValues : 'Daily Value'
textServingSize : 'Serving Size:'
textServingsPerContainer : 'Servings Per Container'
textAmountPerServing : 'Amount Per Serving'
textCalories : 'Calories'
textFatCalories : 'Calories from Fat'
textTotalFat : 'Total Fat'
textSatFat : 'Saturated Fat'
textTransFat : '<em>Trans</em> Fat'
textPolyFat : 'Polyunsaturated Fat'
textMonoFat : 'Monounsaturated Fat'
textCholesterol : 'Cholesterol'
textSodium : 'Sodium'
textPotassium : 'Potassium'
textTotalCarb : 'Total Carbohydrates'
textFibers : 'Dietary Fiber'
textSugars : 'Sugars'
textAddedSugars1 : 'Includes '
textAddedSugars2 : ' Added Sugars'
textSugarAlcohol : 'Sugar Alcohol'
textProteins : 'Protein'
textVitaminA : 'Vitamin A'
textVitaminC : 'Vitamin C'
textVitaminD : 'Vitamin D'
textCalcium : 'Calcium'
textIron : 'Iron'
textVitaminE: "Vitamin E"
textVitaminK: "Vitamin K"
textThiamin: "Thiamin"
textRiboflavin: "Riboflavin"
textNiacin: "Niacin"
textVitaminB6: "Vitamin B<sub>6</sub>"
textFolate: "Folate"
textVitaminB12: "Vitamin B<sub>12</sub>"
textBiotin: "Biotin"
textPantothenicAcid: "Pantothenic Acid"
textPhosphorus: "Phosphorus"
textIodine: "Iodine"
textMagnesium: "Magnesium"
textZinc: "Zinc"
textSelenium: "Selenium"
textCopper: "Copper"
textManganese: "Manganese"
textChromium: "Chromium"
textMolybdenum: "Molybdenum"
textChloride: "Chloride"
textNotApplicable : '-'
ingredientList : 'None'
textPercentDailyPart1 : 'Percent Daily Values are based on a'
textPercentDailyPart2 : 'calorie diet'
textPercentDaily2018VersionPart1 : 'The % Daily Value (DV) tells you how much a nutrient in a serving of food contributes to a daily diet. '
textPercentDaily2018VersionPart2 : ' calories a day is used for general nutrition advice.'
textGoogleAnalyticsEventCategory : 'Nutrition Label'
textGoogleAnalyticsEventActionUpArrow : 'Quantity Up Arrow Clicked'
textGoogleAnalyticsEventActionDownArrow : 'Quantity Down Arrow Clicked'
textGoogleAnalyticsEventActionTextbox : 'Quantity Textbox Changed'
showLegacyVersion : true
More details here nutritionix#77 (comment)
legacyVersion: 1