mrcrowley42 / Project5

0 stars 0 forks source link

Extend user web page #10

Open mnewbery opened 6 months ago

mnewbery commented 6 months ago

Extend the user web page to include these functions:

  1. Change between single location lookup and two location compare
  2. Select two locations to compare their current (or most recent) observations. If the observations are on different dates, just show the most recent ones
  3. Use a filter to change the date range of the chart(s) - last 24 hours, last week, last month, all time
  4. Chart the observations for a single location - temperature, wind speed, wind direction, dew point
  5. Chart the observations for two locations, on two charts. The second chart will appear below the first - update to this requirement - the charts will have their own date ranges so the user can select the same location twice but different time fields
  6. Chart ONE observation but for two locations over a given date range. The observation shall be selectable from temperature, wind speed, wind direction, dew point
mnewbery commented 6 months ago

Sample code for hiding divs

<!DOCTYPE html>

Sample Div Hider
I am groot
I am not groot
I am GROOT
I am groot
I am not groot
I am GROOT

function toggle_div(div_name, div_id){ let collection = document.getElementsByName(div_name); for(let node in collection) { if (collection[node] !== null && node.length < 2){ if (collection[node].attributes['id'].nodeValue === div_id) { // could have said item.hidden = item.id === div_id) ? false : true; collection[node].style.display = 'block'; } else { collection[node].style.display = 'none'; } } } }

function toggle_div_byClass(div_class, div_id){ let collection = document.getElementsByClassName(div_class); for(let node in collection) { if (collection[node] !== null && node.length < 2){ if (collection[node].attributes['id'].nodeValue === div_id) { // could have said item.hidden = item.id === div_id) ? false : true; collection[node].style.display = 'block'; } else { collection[node].style.display = 'none'; } } } }

mnewbery commented 6 months ago

Where is the styles.css file in source control?