Skip to content

Commit

Permalink
Fix Table and Automatic Updates
Browse files Browse the repository at this point in the history
justinfmccarty committed Apr 11, 2024
1 parent 64bae98 commit 4734a5d
Showing 3 changed files with 20 additions and 135 deletions.
117 changes: 0 additions & 117 deletions localscripts.py

This file was deleted.

13 changes: 9 additions & 4 deletions static/scripts/app-scripts.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

function capitalizeFirstLetter(string) {
return string.charAt(0).toUpperCase() + string.slice(1);
}
@@ -56,9 +55,7 @@ function createLayerSelections(layers) {
const optionSelect = document.createElement('select');
optionSelect.setAttribute("id", layer.title);
optionSelect.setAttribute("class", "layer-option-select");
// optionSelect.addEventListener('change', function () {
// // logSelect(this);
// });

Object.keys(layer.options).forEach(option => {
const optionElement = document.createElement('option');
optionElement.value = option;
@@ -85,10 +82,17 @@ function createLayerSelections(layers) {

// Trigger change event initially to populate regions for the first option
optionSelect.dispatchEvent(new Event('change'));

optionSelect.addEventListener('change', createImpactCharts)
regionSelect.addEventListener('change', createImpactCharts)

optionSelect.addEventListener('change', displayData)
regionSelect.addEventListener('change', displayData)

layerContainer.appendChild(selectContainer);
container.appendChild(layerContainer);
});
document.getElementById("rear_cover").dispatchEvent(new Event('change'));
};

// var initialLayers = layerJson[moduleTypeSelect]
@@ -937,6 +941,7 @@ function displaySums(inputData) {
function populateTableWithD3(data, targetID) {
// Select the div where the table will be created
const div = d3.select(`#${targetID}`);
document.getElementById(targetID).innerHTML = "";

// Create a table and append it to the div
const table = div.append('table');
25 changes: 11 additions & 14 deletions todo.txt
Original file line number Diff line number Diff line change
@@ -1,26 +1,23 @@
04.04.2024
11.04.2024
- General
- Add some way of seeing the absolute valeus for configured device
- remove 3D model element
- add a download function to get the configured device and chart data
- add the layers chosen as a row in the downloaded csv
- add system size
- add inverter choice
- add bypass diodes
- Carbon curve
- when the performance ratio slider is changed the entire graph needs to update
- move the area and black curve simultanesously
- Update to be sensitive to the changes made in the layers
- Add performance ratio as a control
- show regional grid mixes and their aligning x values
- indicate crossover of grid mix and curve on x
- Adapt to be the other impacts
- add explainer about the threshhold value
- fix the alignments
- y locator
- Add hovers "?"
- Pie charts
- change these to stacked bars?
- change y-axis upper limit to 1.5
- hover information
- add explainer about the threshold value
- general information about the chart and calculation
- Stacked charts
- add a switch to show the absolute value instead of percent
- fix the label alignment across browsers
- when hovering over stacked section highlight
- CSS and Style
- manage the style of the selects
- coordinate the fonts
- clean the labels

0 comments on commit 4734a5d

Please sign in to comment.