[Weekly Progress Report GSoC 2025] Improve OpenWISP NetJSONGraph
Hello everyone,
May 26 – May 30
List of Tasks I have worked on:
Completed major refactor and namespacing for the PR #374
– Scoped global styles under .njg-container
, updated selectors to use .njg-*
classes
– Updated JS modules and tests accordingly
– Cleaned up duplicate CSS blocks and improved documentation in README
– Addressed all final suggestions from Federico
Worked on different approaches for resolving the cluster overlap issue in PR #349
– Explored and implemented logic where clusters repel when overlapping
– Still refining and testing edge cases to ensure consistency
Participated in discussions with Federico for clarification regarding the cluster behavior issue
Tested changes in OpenWISP Monitoring with new CSS refactor applied
Tasks I will be working on next week:
Finalize and push refined solution for cluster overlap handling in PR #349
Blockers:
Currently, there are no blockers
Regards,
Yash
Hello everyone,
June 2 – June 6
Finalized and implemented the new clustering logic for overlapping clusters in PR #349:
Updated test suite and README.md in the same PR to reflect the new logic.
Regards,
Yash
# [Weekly Progress Report GSoC 2025] Improve OpenWISP NetJSONGraphHello everyone,**June 2 – June 6**### List of Tasks I have worked on:- Finalized and implemented the new clustering logic for overlapping clusters in [PR #349](https://github.com/openwisp/netjsongraph.js/pull/349):- Clusters at the same pixel location are now separated using configurable offsets in a circular pattern.- Introduced `clusterSeparation` option (default: 20px), demonstrated with a 15px setting in the example.- Ensures clusters from different categories are distinguishable on the map.- Updated test suite and `README.md` in the same PR to reflect the new logic.- Generated a new minified version of the library and integrated it in [openwisp-monitoring#668](https://github.com/openwisp/openwisp-monitoring/pull/668), updating the configuration to use the new clustering behavior.- Made further improvements to handle cases where even a single node can form a cluster.- Confirmed behavior with mentors and tested results.- Investigated a reported issue where the map appears smaller after the update; working on a fix.### Tasks I will be working on next week:- Continue testing and resolving the map resizing issue in OpenWISP Monitoring.- Review and address mentor feedback on both PRs (#349 and #668).- Final refinement and stability testing before merging.### Blockers:- Internal assessments scheduled from **June 13–16**, which may limit availability during that period.---**Regards**,Yash
Blockers:
- Internal assessments of College scheduled from June 13–16, which may limit availability during that period.
Hello everyone,
June 9 – June 13
List of Tasks I have worked on:
For netjsongraph.js#349:
– Replicated and resolved the bug reported by Nitesh regarding cluster separation
– Created additional examples to test and isolate the issue with cluster behavior, which helped uncover more edge cases.
– Improved the clustering example to use real-world data rather than synthetic clusters.
– Made the cluster separation mechanism more robust for handling multiple attribute-based clusters at the same location.
– Implemented a screen distance based repulsion algorithm to guarantee that clusters never overlap, regardless of their initial positions or sizes.
For openwisp-monitoring#668:
– Updated the minified version of the netjsongraph.js
library to include the latest clustering changes.
– Investigated the issue of the map shrinking and attempted various fixes (still unresolved).
– Re-reviewed and updated the min.js
file to ensure consistency with the upstream PR.
Tasks I will be working on next week:
Resume work on refining and testing the universal cluster separation logic in PR #349.
Continue debugging and resolving the map resizing issue in PR #668.
Address mentor feedback (if any) on both PRs once back from exams.
Blockers:
None
Regards,
Yash
On 7 Jun 2025, at 12:28 AM, Yashaswi Kumar <mr.aven...@gmail.com> wrote:# [Weekly Progress Report GSoC 2025] Improve OpenWISP NetJSONGraphHello everyone,
**June 2 – June 6**### List of Tasks I have worked on:- Finalized and implemented the new clustering logic for overlapping clusters in [PR #349](https://github.com/openwisp/netjsongraph.js/pull/349):- Clusters at the same pixel location are now separated using configurable offsets in a circular pattern.- Introduced `clusterSeparation` option (default: 20px), demonstrated with a 15px setting in the example.- Ensures clusters from different categories are distinguishable on the map.- Updated test suite and `README.md` in the same PR to reflect the new logic.- Generated a new minified version of the library and integrated it in [openwisp-monitoring#668](https://github.com/openwisp/openwisp-monitoring/pull/668), updating the configuration to use the new clustering behavior.- Made further improvements to handle cases where even a single node can form a cluster.- Confirmed behavior with mentors and tested results.- Investigated a reported issue where the map appears smaller after the update; working on a fix.### Tasks I will be working on next week:- Continue testing and resolving the map resizing issue in OpenWISP Monitoring.- Review and address mentor feedback on both PRs (#349 and #668).- Final refinement and stability testing before merging.### Blockers:- Internal assessments scheduled from **June 13–16**, which may limit availability during that period.---**Regards**,Yash
On Saturday, May 31, 2025 at 2:09:22 AM UTC+5:30 Yashaswi Kumar wrote:
--
You received this message because you are subscribed to the Google Groups "OpenWISP Google Summer of Code" group.
To unsubscribe from this group and stop receiving emails from it, send an email to openwisp-gso...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/openwisp-gsoc/89e81683-e435-4643-98c5-cc11ac78f1d8n%40googlegroups.com.
Hello everyone,
June 14 – June 20
List of Tasks I have worked on:
For netjsongraph.js#349:
– Addressed mentor feedback by adding comments explaining the mathematical operations for cluster creation and separation logic.
– Modified cluster-click behavior to pan and zoom the map instead of exploding clusters into child nodes.
– Improved internal logic to directly use the status
attribute for clustering, avoiding the need for synthetic category
assignment.(Not committed in the PR.)
For openwisp-monitoring#668:
– Applied updated CSS changes based on netjsongraph.js#374, ensuring scoped styling using .njg-container
classes.
– Successfully ran OpenWISP Monitoring locally using the database provided by Federico.
– Replaced dynamic AJAX data loading with static GeoJSON for better local testing.(Not Committed in the PR)
– Validated cluster rendering and icon behavior using sample test data and internal clustering logic.
Tasks I will be working on next week:
Finalize and push a polished version of the cluster separation algorithm in PR #349.
Continue debugging the map resizing issue in PR #668.
Respond to any further mentor feedback and ensure integration between both PRs remains smooth.
Blockers:
None
Regards,
Yash
Hello everyone,
July 7 – July 11, 2025
List of Tasks I have worked on:
For netjsongraph.js#349:
– Refactored the map rendering pipeline to support both GeoJSON and NetJSON formats uniformly using ECharts.
– Created a utility method geojsonToNetjson()
to convert GeoJSON Point features into a NetJSON-compatible format.
– Ensured seamless integration of clustering, rendering, and interaction logic for both formats.
– Maintained original geometries (e.g., Polygons) by rendering them via Leaflet with style support.
– Removed dependency on Leaflet.markercluster
, transitioning fully to ECharts for clustering.
For openwisp-monitoring#668:
– Updated the monitoring API to output per-device GeoJSON Features instead of aggregated site-level data.
– Ensured the new format aligns with the frontend’s clustering pipeline.
– Reverted the backend changes later in the week to maintain backward compatibility and resolve fullscreen/zoom issues.
– Fully tested the new streamlined rendering logic in OpenWISP Monitoring.
– Verified fullscreen behavior and fixed related bugs.
– Confirmed that ECharts-based rendering behaves consistently in both clustered and non-clustered scenarios.
– Finalized the pipeline that converts and processes data in canvas, ensuring clustering, tooltips, and click events work correctly.
Technical Research & Collaboration:
– Investigated overlapping cluster issues and evaluated solutions using Leaflet and ECharts.
– Concluded ECharts is more suitable due to better performance, styling flexibility, and canvas-based rendering.
– Proposed standardizing clustering across both GeoJSON and NetJSON modes using ECharts.
– Discussed strategy with mentors and aligned on the direction for refactoring and decoupling from Leaflet.
Tasks I will be working on next week:
– Finalize and open a PR in openwisp-monitoring
for the streamlined map rendering logic.
Blockers:
None at the moment.
Regards,
Yash
Hello everyone,
July 12 – July 17, 2025
List of Tasks I have worked on:
For netjsongraph.js#396 – Streamlining GeoJSON Map Rendering:
– Refactored and simplified the rendering pipeline for GeoJSON-based maps.
– Removed bloated if-else
conditions and redundant logic to improve code clarity and maintainability.
– Eliminated the legacy Leaflet-based clustering logic and removed the leaflet.markercluster
dependency.
– Ensured clustering now fully leverages ECharts for improved performance and styling consistency.
– Added updated test cases to increase test coverage and validate new rendering logic.
– Conducted detailed testing with various GeoJSON samples to verify robustness.
For netjsongraph.js#401 – Clustering Overlap Fix:
– Verified clustering logic for both GeoJSON and NetJSON formats using a wide range of test data.
– Tested against real-world scenarios to detect and resolve cluster overlapping issues.
– Cherry-picked only the necessary logic from PR #396 to avoid redundancy.
– Ensured consistent behavior in both tooltips and polygon shapes.
– Planning further refinements to keep the PR minimal and focused.
For openwisp-monitoring#668 – GeoJSON Support & Integration:
– Integrated the newly built minified JS file from netjsongraph.js
into OpenWISP Monitoring.
– Reverted recent backend API changes to fix the fullscreen issue in Monitoring.
– Validated the clustering and polygon rendering functionality with both NetJSON and GeoJSON datasets.
– Tested UI features including zoom, fullscreen, and marker visibility for consistency.
Technical Collaboration & Testing:
– Conducted full-scale manual tests to verify map rendering stability across formats.
– Improved test coverage and aligned on a unified rendering and deployment workflow.
Tasks I will be working on next week:
– Refine the Clustering Overlap Fix PR (#401) to minimize code duplication and increase specificity.
– Finalize review and cleanup of all PRs based on feedback from mentors.
– Final integration of GeoJSON rendering logic into OpenWISP Monitoring.
Blockers:
None at the moment.
Regards,
Yash
Hello everyone,
Here’s my weekly update for :
July 21 – July 25, 2025
– Finalized rendering logic for all GeoJSON geometry types: Point
, MultiPoint
, LineString
, MultiLineString
, Polygon
, and MultiPolygon
.
– Ensured overlays are correctly displayed and no markers are incorrectly rendered for polygon coordinates.
– Cleaned and structured sample GeoJSON data, removing redundant properties and [Object, Object]
values.
– Converted properties.name
into label
and ensured consistent NetJSON formatting with full test coverage.
– Converted LineString
and MultiLineString
into links
, and added assertions for correct link creation.
– Ensured all features contain valid id
fields and removed misleading labels like Gjn_4
.
– Prevented conversion of Polygon
and MultiPolygon
features into links
, preserving their rendering integrity.
– Verified rendering compatibility via geojson.io and GitHub’s visualizer.
– Adjusted clustering z-index to ensure polygons render behind markers and overlays.
– Validated clustering logic and interaction behavior across both NetJSON and GeoJSON formats.
– Confirmed that the polygon overlap issue is resolved since polygons are now handled strictly as overlays.
– Clarified that certain interaction bugs were specific to the Monitoring frontend and not the clustering engine.
– Prepared this PR to be finalized after merging #396 to avoid redundancy.
For openwisp-monitoring#668 :
– Coordinated integration of new streamlining changes into Monitoring.
– Discussed timing of merge to avoid conflict with other active work (e.g., Deepanshu’s features).
– Planned update of the minified JavaScript file after the Streamlining PR is merged.
None at the moment.
Regards,
Yash
On 19 Jul 2025, at 5:20 AM, Yashaswi Kumar <mr.aven...@gmail.com> wrote:
Hello everyone,
July 12 – July 17, 2025
Weekly Report: July 28 – August 1, 2025
Hi Federico Capoano,
Here’s my summary of this week’s progress:
Cleaned up how different geometry types (Point, Polygon, MultiPolygon) are handled.
Fixed polygon rendering by removing the processCoordsSeq
function.
Unified rendering logic using ECharts, ensuring backward compatibility.
Ensured polygons no longer behave like nodes in clustering logic.
Resolved interference between node clustering and GeoJSON layers.
Replaced outdated Leaflet bindings with netjsongraphInstance.layer.onclick
.
Added dynamic tooltip formatting for better readability of node metadata.
Refactored map bounds handling using temporary layers (invisible).
Fixed dateline world-wrap issues by cloning features across longitude ±180°.
Removed deprecated L.geoJSON
code and ensured it doesn’t break legacy functionality.
Verified behavior aligns with what was originally patched in issue #462.
Final cleanup and testing of PR #668.
Update the minified JS in Monitoring after merge.
Coordinate final feedback and prepare for release.
Best regards,
Yash
Weekly Report: August 5 – 8, 2025
PR #349 – Clustering Example and Filtering Fixes
Finalized clustering implementation and example.
Updated clustering example with new GeoJSON dataset and tuned attributes/zoom behavior.
Fixed node filtering logic in NetJSONGraphUtil
to properly detect clusterable nodes.
Added _featureType: "Point"
property to test data for better accuracy.
Wrote unit tests for prepareData
(category assignment) and onClickElement
(sidebar/meta rendering).
Replaced placeholder sample data with clean, production-friendly data.
PR successfully merged. 🎉
PR #407 – Label Styling Improvements
Enhanced visual styling and configurability of node and edge labels.
Added background color, padding, and border radius for better readability.
Enabled text color customization and semi-transparent backgrounds for dynamic clarity on maps.
Updated configuration defaults while maintaining backward compatibility.
Adjusted zoom visibility — labels now appear from zoom level 15 to 18.
Replaced dataset with human-friendly country names.
Increased padding for improved aesthetics.
Reviewed PR feedback and tested changes.
Checked PR #333 for potential label improvements.
PR #668 – Monitoring GeoJSON Support
Updated the PR following recent changes.
Performed functional testing on updated implementation to ensure compatibility with new map rendering logic.
Next Steps
Finalize label styling fixes in PR #407.
Integrate any useful improvements from PR #333.
Continue coordination to ensure smooth merging of interdependent PRs.
Blockers
None at the moment.
Best Regards
Yash
Weekly Report: August 11 – 15, 2025
PR #407 – Improve label styling
Re-tested after UX changes in PR #411 to ensure styling stability.
Fixed zoom-level logic: labels now appear correctly between levels 15–18.
Verified semi-transparent label backgrounds render clearly across both light and dark map styles.
Maintained backward compatibility for default label styling.
Regression tested label padding, borders, and clustered node readability.
PR #668 – Add support for rendering Monitoring GeoJSON in updated NetJSONGraph – Merged 🎉
Synced with upstream to resolve conflicts.
Verified rendering of device popups, tooltips, and sidebar.
Tested new GeoJSON format against real monitoring data for compatibility.
Confirmed seamless integration with existing monitoring logic.
Successfully merged after review.
PR #371 – Add node selection feature
Reviewed mwaring’s earlier implementation of node selection.
Compared with updated approach in PR #411.
Identified overlapping functionality and recommended consolidating to reduce redundancy.
Next Steps
Address review feedback and finalize PR #411.
Complete refinements and approval process for PR #407.
Begin clustering-related improvements once selection and label styling PRs are merged.
Blockers
None at the moment.
Best Regards,
Yash
Hey Federico,
Since Element is facing issues, I’m reaching out here instead. The changes you requested on PR #411 have been addressed I’ve added the browser test, and the QA checks are now also passing. Please take a look and let me know if any further changes are required.
Thanks!
Weekly Report – Sept 8 to Sept 12
PR #419
Updated render logic and config:
Defaulted showGraphLabelsAtZoom
to disabled (null
).
Implemented conditional graphRoam
: only reacts to zoom and triggers resize on threshold crossing.
Renamed series IDs: graph-series → network-graph
, map-nodes → geo-map
.
Updated tests to reflect new series IDs and conditional roam behavior.
Lints run on edited files; all clean.
Addressed QA check failures and restored passing status.
PR #441
Improved README:
Reorganized “Live Examples” ordering, normalized wording (“demo”→“example”), and simplified “Contributing.”
Replaced verbose configuration section with concise API reference.
Fixed broken examples:
Multiple tiles example now uses ArcGIS World Imagery.
Multiple interfaces example loads correctly from dist/
.
Proposed re-recording of outdated GIFs.
Addressed requested changes from review and confirmed functionality.
Next Steps
Finalize remaining README refinements and GIF updates for PR #441.
Continue refining and testing graphRoam zoom/label threshold behavior in PR #419.
Monitor review feedback and address final refinements before merge.