var variableCostingTotalFixedCostCalc = {
inputs: {
fixedCosts: \”\”,
totalFixedCosts: \”\”,\n },\n results: {},\n init: function () {\n var fixedCosts = document.getElementById(\”fixedCosts\”);\n if (fixedCosts) {\n fixedCosts.addEventListener(\”input\”, function () {\n variableCostingTotalFixedCostCalc.calculate();\n });\n }\n },\n calculate: function () {\n var fixedCosts = parseFloat(document.getElementById(\”fixedCosts\”).value);\n var resultEl = document.getElementById(\”totalFixedCosts\”);\n var result = null;\n if (fixedCosts >= 0) {\n result = fixedCosts;\n document.getElementById(\”totalFixedCosts\”).value = result.toFixed(2);\n } else {\n document.getElementById(\”totalFixedCosts\”).value = \”\”;\n }\n this.results.totalFixedCosts = result;\n var ctx = document.getElementById(\”fixedCostsChart\”).getContext(\”2d\”);\n var fixedCostsChart = new Chart(ctx, {\n type: \”bar\”,\n data: {\n labels: [\”Fixed Costs\”],\n datasets: [\n {\n label: \”Fixed Costs\”,\n data: [fixedCosts],\n backgroundColor: \”#004a99\”,\n },\n ],\n },\n });\n },\n};\nvar fixedCosts = document.getElementById(\”fixedCosts\”);\nfixedCosts.addEventListener(\”input\”, function () {\n variableCostingTotalFixedCostCalc.calculate();\n});\nvariableCostingTotalFixedCostCalc.init();\n\n\n
\n \n
\n\n
Total Fixed Costs
\n \n
\n
Fixed Costs Chart
\n \n
\n
\n
\n \n \n\nvar fixedCosts = document.getElementById(\”fixedCosts\”);\nfixedCosts.addEventListener(\”input\”, function () {\n variableCostingTotalFixedCostCalc.calculate();\n});\nvariableCostingTotalFixedCostCalc.init();\n\n\n
\n