{{ message }}
#826 Remove D3 (mostly)#833
Merged
Merged
Conversation
Contributor
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.

Closes #826
With Claude.
D3.js DOM Manipulation Removal - Complete Migration (#826)
Summary
Successfully completed the removal of D3.js DOM manipulation from all 37 MMGIS frontend files, replacing with jQuery/vanilla JS while preserving D3 for specialized data visualization functions (charts, time formatting, coordinates).
Changes Made
Phase 4-8 Completion & Bug Fixes
Files Fixed (5):
- Header and container initialization
- Image container rendering
- Shape rendering (circle, square, rect, image, icon)
- Gradient and scale rendering with tick marks
- Units labels and positioning
- Tooltip functionality
Files Verified Clean (32):
Critical Bug Fixes
D3 Retained (As Intended)
Full D3 Usage:
Selective D3 Functions:
Migration Pattern Documentation
Key D3 vs jQuery Differences:
// D3: Returns NEW child element
const child = parent.append('div')
// jQuery: Returns PARENT element
const stillParent = parent.append($('
Correct jQuery Pattern:
const child = $('
parent.append(child)
child.append($('')) // Icon inside child ✓
Testing
Bundle Impact
While full D3 package remains due to external dependencies, we've achieved:
Files Changed
Modified (7):
Total Changes: ~2,720 lines added, ~2,263 lines removed
Success Criteria Met
✅ All 37 files migrated (ChemistryTool unchanged per plan)
✅ d3.utcFormat, d3.scaleLinear, d3.axisBottom, d3.pointer preserved
✅ No functional regressions
✅ All user-reported bugs fixed
✅ No console errors
✅ Cleaner, more consistent codebase