Skip to content

Match the hourly chart legends to what is drawn - #4824

Merged
louispt1 merged 1 commit into
masterfrom
always-show-target-line-legend
Oct 6, 2026
Merged

louispt1 merged 1 commit into
masterfrom
always-show-target-line-legend

Conversation

@aaccensi

Copy link
Copy Markdown
Member

Context

Five chart views drop series from the legend when all their values are zero, but their red target line is drawn even when empty, therefore the legend for the target line should not be dropped.

Implemented changes

The legend for the target line is now exempt from the filter (as it already was in category_bar and StackedBar).

Additionally, the heat demand and production chart had the reverse problem. "Deficit" and "Buffering and time-shifting"(named "Surplus" internally) label two areas derived in dataForChart rather than real series, and were added always to the legend even when empty. They are now filtered on the values dataForChart computes for them.

Related

Actually related to issue #3839
But closes issue #4816

Checklist

  • I have tested these changes
  • I have updated documentation as needed
  • I have tagged the relevant people for review

@louispt1 louispt1 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM code wise, I did not check functionally 👍

Five chart views drop series from the legend when all their values are zero, but their red target line is drawn even when empty, therefore the legend for the target line should not be droped. It is now exempt from the filter (as it already was in category_bar and StackedBar).

The heat demand and production chart had the reverse problem. "Deficit" and "Buffering and time-shifting"(Surplus) label two areas derived in dataForChart rather than real series, and were added always to the legend even when empty. They are now filtered on the values dataForChart computes for them.

Related to #3839
Closes #4816
@aaccensi
aaccensi force-pushed the always-show-target-line-legend branch from d9eec8e to c0f895a Compare October 5, 2026 09:32
@louispt1

louispt1 commented Oct 6, 2026

Copy link
Copy Markdown
Member

Now also functionally checked - LGTM

@louispt1
louispt1 merged commit b510308 into master Oct 6, 2026
5 checks passed
@louispt1
louispt1 deleted the always-show-target-line-legend branch October 6, 2026 13:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants