Skip to content

Fix mixed-sign stacked chart rendering#219

Merged
novykh merged 6 commits into
mainfrom
fix/diverging-stacked-charts
Jul 13, 2026
Merged

Fix mixed-sign stacked chart rendering#219
novykh merged 6 commits into
mainfrom
fix/diverging-stacked-charts

Conversation

@ktsaou

@ktsaou ktsaou commented Jul 10, 2026

Copy link
Copy Markdown
Member

What changed

  • replace Dygraphs' single cumulative stack with per-point positive and negative accumulators
  • render stacked area and stacked bars from independent diverging bounds
  • select the hovered signed stack band without relying on Dygraphs' one-sided hit testing
  • keep raw payload values unchanged for legends and popovers

Why

Dygraphs uses one cumulative value per timestamp. Positive and negative series therefore cancel each other, and dimensions that cross zero render in the wrong stack.

The new data handler computes bounds during Dygraphs' existing reverse series pass. This preserves series order, zoom-aware extrema, null gaps, and selected-dimension rebasing without allocating a transformed copy of the payload.

Validation

  • yarn test --runInBand
  • yarn build
  • yarn build-storybook
  • targeted ESLint for all changed files
  • Storybook browser verification for stacked area, stacked bar, mixed signs, crossing dimensions, hover, and selected-dimension scaling

@ktsaou ktsaou marked this pull request as ready for review July 10, 2026 20:23
Base automatically changed from fix/popover-unit-header-exponential-values to main July 13, 2026 06:41
@novykh

novykh commented Jul 13, 2026

Copy link
Copy Markdown
Member

@copilot resolve the merge conflicts in this pull request

Copilot AI commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

@copilot resolve the merge conflicts in this pull request

Resolved. Merged origin/main into the branch — the only conflict was in src/unitsScalingChartTypes.stories.js (dimension IDs), which was resolved by keeping the fixed identifiers from this branch (93e628b).

@CLAassistant

CLAassistant commented Jul 13, 2026

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
2 out of 3 committers have signed the CLA.

✅ ktsaou
✅ novykh
❌ Copilot
You have signed the CLA already but the status is still pending? Let us recheck it.

Copilot AI requested a review from novykh July 13, 2026 06:52
@novykh novykh merged commit bfaec1b into main Jul 13, 2026
1 of 2 checks passed
@novykh novykh deleted the fix/diverging-stacked-charts branch July 13, 2026 07:01
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.

4 participants