@@ -128,7 +128,7 @@ window.homeStrandObj = {
dataArray.push({
num: max,
- label: `${ingredientList[index].name}: ${ingredientList[index].quantity} ${ingredientList[index].unit}`
+ label: `${ingredientList[index].name}: ${+ingredientList[index].quantity.toFixed(2)} ${ingredientList[index].unit}`
});
ingredientList.splice(index, 1);
}
@@ -245,7 +245,6 @@ class HorizontalBarGraph{
// num: number for the actual data
// label: text to display on bar
addData(dataArray){
- let data = [];
this.context.clearRect(0, 0, this.canvas.width, this.canvas.height);
for(let point of dataArray){