Experiment/canvas chart prototype#1184
Conversation
|
Hi @GyulyVGC , I opened the PR as a draft for now because it partially addresses #1042 and became broader than expected during implementation. The initial goal was to prototype an interactive replacement for the Overview line-series chart, since the current While working on it, I ran into renderer compatibility issues with I don’t think this fully closes #1042 yet. It should give us the foundation for future improvements that would close it, especially adding donut segment hover and richer line-chart hover details such as involved hosts, services, and notifications for each point in time. I’m keeping it in draft until I do more manual testing and add screenshots before requesting review. |
|
Hey @TheMasterOfDisasters thanks for your time implementing this, but I prefer not moving forward with this feature for two reasons:
In general, if you are planning to do considerable changes to the codebase, I suggest you to verify that the related GitHub issue isn't assigned to someone yet. You can also check issues with the
help wanted
|
Summary
This PR improves chart compatibility with Sniffnet's
tiny-skiasoftware renderer fallback while preserving the existing default-renderer behavior.The Overview traffic chart now uses a renderer-compatible Iced geometry widget with hover support. This avoids relying on
plotters-iced2for the interactive Overview chart path and keeps rendering inside Iced's selected renderer.For the initial adapter page, the default renderer keeps the existing plotters preview charts. Under
ICED_BACKEND=tiny-skia, adapter preview charts are replaced with lightweight incoming/outgoing packet-rate indicators. This avoids the tiny-skia geometry/clipping artifacts found when rendering chart geometry inside scrollable adapter cards.Why
The original goal was to prototype an interactive chart replacement without making Sniffnet more dependent on GPU-only rendering.
During testing, the Overview chart worked correctly with both the default renderer and
tiny-skiaafter switching to an Iced-native geometry widget.Adapter preview charts exposed a separate tiny-skia issue: chart geometry inside the scrollable adapter list could render, but its clipping/damage tracking did not consistently follow scrolling or page changes. Multiple geometry and Canvas approaches were tested, but the reliable tiny-skia-compatible solution was to avoid chart geometry in that scrollable list.
Changes
Testing
cargo fmtcargo checkcargo testcargo build --releaseICED_BACKEND=tiny-skia