Skip to content

Conversation

@csbnw
Copy link
Contributor

@csbnw csbnw commented Jan 12, 2026

Add a Streamlit backend and add the option to switch between the current Panel/Bokeh dashboard and Streamlit/Plotly. Some UI improvements and bug fixes make both dashboards behave consistently. Significant refactoring of the existing code was needed to separate the 'backend' and dashboard-specific code and minimise code duplication.

Notable changes:

  • New Streamlit dashboard: Add (streamlit_dashboard.py) using Streamlit/Plotly.
  • Multiple backend support: CLI option --backend {panel,streamlit} in ktdashboard.
  • Table toggle: Add a UI checkbox to show/hide the raw data. When disabled, the plot fills more vertical space.
  • Panel/Bokeh improvements: Make the Bokeh plot responsive (fills page width/height when table hidden).
  • Bug fix: Convert categorical values to strings to avoid Bokeh validation errors.
  • Separation of backend and dashboard code: Shared logic moved to dashboard.py (parsing, filtering, etc).
  • The -demo flag didn't seem to work and is removed.

The panel version now looks like this:
image

  • The plot now fills the page
  • An optional data table is shown

And this is the new Streamlit variant:
image
Note the new option to select a colour palette!

For convenience, when --backend=streamlit is specified, providing a cachefile on the command line is optional. The user can start the dashboard and upload cachefile later:
image

@benvanwerkhoven
Copy link
Collaborator

Wow thanks @csbnw! This looks really nice! I'm looking forward to trying this out. I'll have to familiarize myself with the Streamlit API. I hope it's a better designed than the Panel one, which I wasn't very happy with. I'll have an in depth look at all the code later this week, as I'm currently grading exams.

@stijnh
Copy link
Member

stijnh commented Jan 14, 2026

Looks great! I tried it and it works very smoothly on existing cache files.

We could also make a new release with only the Streamlit implementation and drop the panel implementation. I'm not sure of having two similar implementations of the same functionality is worth it.

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