respec / solar-suitability-app

Solar Suitability Application
4 stars 3 forks source link

Check percent source for progress bar and optimal/poor #50

Closed andywalz closed 8 years ago

andywalz commented 8 years ago

Hey where does the 78% on the progress bar get set? I think that it either needs to use annualPercentSun or the Optimal/Poor case statement needs to use whatever 78% comes from (cuz 78% should be Fair, not optimal) Ok, I found this and see how it is done but I may need your help explaining the first line: // Populate gradient var gradient = ((app.query.averagePerDay/4).toFixed(2)*100).toFixed().toString() + '%';

   var $showGradient = $('.showGradient');
   $showGradient.css('width', gradient);
   $('.showGradient>span').text(gradient);

why divide by 4?

image

cmartin616 commented 8 years ago

I don't know what I was thinking. :) I'm wondering if this was legacy code from testing that I didn't update. Can you try it out now with the solarReportFixes branch? It is really hard to find a location that isn't optimal or poor but it seems to be working with those two test cases.

andywalz commented 8 years ago

I pulled solarReportFixes just now but I don't see anything different from my branch yesterday. Am I missing something?