Skip to content

Enhancement: Dynamic y category - #3016

Open
Mgetz10 wants to merge 5 commits into
devfrom
enhancement/dynamic-y-category
Open

Enhancement: Dynamic y category#3016
Mgetz10 wants to merge 5 commits into
devfrom
enhancement/dynamic-y-category

Conversation

@Mgetz10

@Mgetz10 Mgetz10 commented Aug 25, 2026

Copy link
Copy Markdown
Collaborator

Summary

Implemented editor-configurable dynamic categorical Y-axis bands that derive thresholds directly from the current filtered chart data and update when geography filters change

Testing Steps

  1. Open level-dash.json and confirm categories change when a different geography is selected

@github-actions

Copy link
Copy Markdown

⚠️ Config documentation probably needs to be updated based on the changes in this PR.

  • packages/core: shared config-related code changed, but packages/core/CONFIG.md was not updated.

If this PR changes consumer-facing config behavior, please update the relevant config docs. Otherwise, no action may be needed.

@github-actions

github-actions Bot commented Aug 25, 2026

Copy link
Copy Markdown

React Doctor found 10 new issues in 4 files · 1 error & 9 warnings · score 65 / 100 (Needs work) · 6 fixed · vs dev

Errors

9 warnings

components/CustomColorsEditor/CustomColorsEditor.tsx

  • ⚠️ L17 Large component is hard to read and change no-giant-component
  • ⚠️ L18 Empty default prop breaks memo rerender-memo-with-default-value
  • ⚠️ L33 State adjusted after a prop changes no-adjust-state-on-prop-change
  • ⚠️ L38 Side effect inside a state updater function no-side-effect-in-state-updater-function
  • ⚠️ L170 Pure function rebuilt every render prefer-module-scope-pure-function
  • ⚠️ L194 Pure function rebuilt every render prefer-module-scope-pure-function

src/components/ChooseTab.tsx

  • ⚠️ L148 Pure function rebuilt every render prefer-module-scope-pure-function

src/helpers/generateRuntimeLegend.ts

  • ⚠️ L421 Chained array iterations js-combine-iterations

src/helpers/getMinMax.ts

  • ⚠️ L127 Chained array iterations js-combine-iterations

Reviewed by React Doctor for commit b0028b7. See inline comments for fixes.

<p>Data-Driven Category Axis</p>
<p>Thresholds are read from the current filtered data. The last category defines the axis maximum.</p>
{dataDrivenCategories.categories?.map((category, index) => (
<div key={`dynamic-category-${index}`} className='edit-block'>

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

React Doctor · react-doctor/no-array-index-as-key (warning)

Your users can see & submit the wrong data when this list reorders or filters, so use a stable id like key={item.id}, not the array index "index".

Fix → Use a stable id from the item, like key={item.id} or key={item.slug}. Index keys break when the list reorders or filters.

Docs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant