(dataObj)
| 32 | } |
| 33 | |
| 34 | export function populateSelects(dataObj) { |
| 35 | const columnNames = ['None'].concat(dataObj.getDataColumnNames()); |
| 36 | for (const selectSeries of [selectSeries1, selectSeries2]) { |
| 37 | while (selectSeries.firstChild) { |
| 38 | selectSeries.removeChild(selectSeries.firstChild); |
| 39 | } |
| 40 | console.log(columnNames); |
| 41 | for (const name of columnNames) { |
| 42 | const option = document.createElement('option'); |
| 43 | option.setAttribute('value', name); |
| 44 | option.textContent = name; |
| 45 | selectSeries.appendChild(option); |
| 46 | } |
| 47 | } |
| 48 | |
| 49 | if (columnNames.indexOf('T (degC)') !== -1) { |
| 50 | selectSeries1.value = 'T (degC)'; |
| 51 | } |
| 52 | if (columnNames.indexOf('p (mbar)') !== -1) { |
| 53 | selectSeries2.value = 'p (mbar)'; |
| 54 | } |
| 55 | timeSpanSelect.value = 'week'; |
| 56 | dataNormalizedCheckbox.checked = true; |
| 57 | } |
| 58 | |
| 59 | export const TIME_SPAN_RANGE_MAP = { |
| 60 | hour: 6, |
no test coverage detected