neezcha / dashboardProgressTracker

2020 Internship - Dashboard Tracking Progress
0 stars 0 forks source link

leaflet AM/PM select to a button #13

Closed neezcha closed 3 years ago

neezcha commented 3 years ago

Supervisor recommended changing from charts.js to highcharts.js because he found a jFiddle example using responsive radio buttons. The example was responsive because it was in the demo environment jFiddle and does not work local hosting.

Currently, AM/PM is toggled by a selector element, change this to a button element to see if he prefers that. Radio button still does not an automatic listener.

neezcha commented 3 years ago

Oct. 20

neezcha commented 3 years ago

Oct. 20 GOT RADIO BUTTONS WORKING

var radioAM = document.querySelector("input[name='Peak'][value='AM']");
var radioPM = document.querySelector("input[name='Peak'][value='PM']");

radioAM.addEventListener('change', function(){
        changeRoads();
});
radioPM.addEventListener('change', function(){
        changeRoads();
});

function changeRoads(){
        let oRoad = oahuRoads.options[oahuRoads.selectedIndex].value;
        let oPeak = document.querySelector("input[name=Peak]:checked").value;
        ...
}