Calculation of the efficiency of the electrical circuit (HTML5, JavaScript, CSS. Canvas and Chart.js usage)