Open MaxGhenis opened 2 months ago
In terms of displaying, since we can't plot infinity on a chart, we could:
Infinity
(could be, say, MAX_SAFE_INTEGER
)This would allow us to visualize without having to arbitrarily calculate some sort of stand-in that could be wrong, error-prone, or misleading.
Setting something to infinity, on the other hand, could be a bit more challenging.
Incredibly, react-plotly
does not natively support axis breaks
How to display infinity in the years it's that value is a separate issue from what I reported here. For now I think not displaying it is fine.
Note that this is almost certainly driven by infinity itself not being displayed, hence impossible to draw a line to meet with a point at infinity
Yeah for now we can suggest including the last finite value in the year prior to infinity in the country package (https://github.com/PolicyEngine/policyengine-us/issues/5252), but let's keep this open as it would be cleaner to do it in the front-end
See this:
https://policyengine.org/us/policy?focus=gov.irs.deductions.itemized.salt_and_real_estate.cap.JOINT®ion=enhanced_us&timePeriod=2026&baseline=2&reform=56251
It's correctly specified as 10,000 from 2018 to 2025, inf otherwise: https://github.com/PolicyEngine/policyengine-us/blob/master/policyengine_us/parameters/gov/irs/deductions/itemized/salt_and_real_estate/cap.yaml
Should display a line in that range.