Skip to content

feat: save visualizer html#236

Open
jaapschoutenalliander wants to merge 10 commits into
mainfrom
pgm/save-visualizer-html
Open

feat: save visualizer html#236
jaapschoutenalliander wants to merge 10 commits into
mainfrom
pgm/save-visualizer-html

Conversation

@jaapschoutenalliander
Copy link
Copy Markdown
Member

  • Added save_html(grid, path) to visualizer.py — exports the grid as a standalone HTML file without starting the Dash server
  • New html_export.py module handles HTML generation: embeds graph elements, stylesheet, and layout as JSON with Cytoscape.js
  • Docs updated with usage example and parameter table; two unit tests cover default and non-default parameter paths

Signed-off-by: Jaap Schouten <jaap.schouten@alliander.com>
Signed-off-by: Jaap Schouten <jaap.schouten@alliander.com>
Signed-off-by: Jaap Schouten <jaap.schouten@alliander.com>
Signed-off-by: Jaap Schouten <jaap.schouten@alliander.com>
Copy link
Copy Markdown
Member

@vincentkoppen vincentkoppen left a comment

Choose a reason for hiding this comment

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

Looks like a nice addition. Haven't tested/viewed the HTML, but the code to maintain this doesn't seem to bad.

Maybe some of the setup surround the layout/stylesheet can be shared even more with the actual app. But if not, this seems fine to me.

@jaapschoutenalliander jaapschoutenalliander marked this pull request as ready for review May 2, 2026 17:17
@Thijss
Copy link
Copy Markdown
Member

Thijss commented May 4, 2026

Looks promising! This has been requested for quite a while I believe 👍 . I'll review later this week

Copy link
Copy Markdown
Member

@Thijss Thijss left a comment

Choose a reason for hiding this comment

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

I tested it locally.

The HTML only contains the graph. The top and bottom sections are not included. In the future we could look whether that is feasible/desirable too (but we'd have to move logic to the JS side instead of Python).

For now, nice addition!

Thijss and others added 2 commits May 11, 2026 08:22
Signed-off-by: Jaap Schouten <jaap.schouten@alliander.com>
@sonarqubecloud
Copy link
Copy Markdown

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants