Skip to content

wf2e component table blank in dashboards generated with older script version #32

Description

@Ttheegela

Describe the bug
The component breakdown table showed completely blank rows for all components when wf2e was selected in dashboards generated with an older version of the script. This affected the Amarel-generated amarel_ssp585_gridded.html that was submitted for review.

Root cause
Two separate issues:

  1. Dashboards generated before the FACTS_YEAR_SETS optimization was introduced had no window.FACTS_YEAR_SETS in their HTML. The updated JS tried FACTS_YEAR_SETS[d.y] and crashed silently, causing blank rows.
  2. wf2e data in this particular Amarel run only covers 2020–2100 (9 time steps). Selecting a year beyond 2100 correctly returns no data — this is a characteristic of the run, not a bug.

Fix
JS now falls back to window.FACTS_YEARS when FACTS_YEAR_SETS is missing (backwards compatibility with older HTML). Out-of-range years now display instead of a blank cell so users can distinguish "no data for this year" from a rendering failure.

Fixed in
Commit d3a08d1

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions