Enhancement: Dynamic y category - #3016
Conversation
If this PR changes consumer-facing config behavior, please update the relevant config docs. Otherwise, no action may be needed. |
|
React Doctor found 10 new issues in 4 files · 1 error & 9 warnings · score 65 / 100 (Needs work) · 6 fixed · vs Errors
9 warnings
Reviewed by React Doctor for commit |
| <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'> |
There was a problem hiding this comment.
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.
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