Repository navigation
Conversation
There was a problem hiding this comment.
Hey - I've found 1 issue
Prompt for AI Agents
Please address the comments from this code review:
## Individual Comments
### Comment 1
<location path="packages/modules/web_themes/colors/source/src/components/powerGraph/processDayGraphData.ts" line_range="193" />
<code_context>
currentItem.price = currentRow.prices.grid * 100000
+ } else {
+ currentItem.price = 0
}
// Self Usage
</code_context>
<issue_to_address>
**Missing prices distort price display**
When historical rows lack price data and the price line or tooltip is displayed, `transformRow` sets `price` to zero, so `PriceLine` draws a zero-price line and the tooltip formats unavailable prices as real currency; on days that also contain positive prices, `PriceLine.yScale` falls back to a `[0, 0]` domain and plots the line flat.
Represent missing prices as unavailable rather than zero so the line, tooltip, and scale do not treat them as real prices.
</issue_to_address>| currentItem.price = currentRow.prices.grid * 100000 | ||
| } else { | ||
| currentItem.price = 0 | ||
| } |
There was a problem hiding this comment.
🟡 Medium · Missing prices distort price display
When historical rows lack price data and the price line or tooltip is displayed, transformRow sets price to zero, so PriceLine draws a zero-price line and the tooltip formats unavailable prices as real currency; on days that also contain positive prices, PriceLine.yScale falls back to a [0, 0] domain and plots the line flat.
Represent missing prices as unavailable rather than zero so the line, tooltip, and scale do not treat them as real prices.
Prompt for AI agents
In `packages/modules/web_themes/colors/source/src/components/powerGraph/processDayGraphData.ts` at line 193:
**Missing prices distort price display**
When historical rows lack price data and the price line or tooltip is displayed, `transformRow` sets `price` to zero, so `PriceLine` draws a zero-price line and the tooltip formats unavailable prices as real currency; on days that also contain positive prices, `PriceLine.yScale` falls back to a `[0, 0]` domain and plots the line flat.
Represent missing prices as unavailable rather than zero so the line, tooltip, and scale do not treat them as real prices.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary by Sourcery
Handle historical power graph data without prices safely.
Bug Fixes:
Enhancements: