Use color bar with vertically split proportion to indicate the percentage of states in a merged region. - #12835
Conversation
…tage of states in a merged region.
There was a problem hiding this comment.
Hi! Thanks for opening this pull request.
Because this is your first time contributing to this repository, make sure you've read our Contributor Guide and Code of Conduct.
|
sorry for the delay! @aedm wanted to have a look at this but he's out on vacation this & next week and didn't manage to do so in time. I'll see if I can find to have a look myself or get it reassigned |
There was a problem hiding this comment.
Some nits, but there's a more high level problem here: it's not stable over time! Right now to see that one has to move in and scroll horizontal, but once the view supports time ranges and follows the time cursor like the time series view does by default on larger recordings (!) this becomes a serious issue as it causes a lot of flickering:
flicker.on.horizontal.move.mov
| let overlap_end = phase_end.min(bucket_t1); | ||
| if overlap_end > overlap_start | ||
| && let Some(content) = &phases[p].content | ||
| && let Some(color_idx) = colors.iter().position(|c| c == &content.color) |
There was a problem hiding this comment.
hmm this gets n-squary computational wise. Makes me a bit uneasy. But probably fine; building up a lookup table is likely overkill 🤔
|
Thanks for feedback @Wumpf ! Yes I agreed that the flicker is tricky - do you think it would be a good solution if I fix the partitioning (instead of binning based on pixel space I bin on absoluate log tick / log time_ns)? Do you have any suggestion on this? |
Co-authored-by: Andreas Reich <r_andreas2@web.de>
Co-authored-by: Andreas Reich <r_andreas2@web.de>
Related
What
When a lane in the state timeline view has many state changes packed too tightly to render individually (narrower than 4px on screen), they're folded into a single merged region. Previously this merged region rendered as a flat, uniformly-colored box labeled "N states" — all information about which states were present, and for how long, was lost.
This PR replaces that flat box with a duration-weighted stacked color chart: the merged region's screen width is split into fixed-width time buckets (~3px each, capped at 512 buckets), and each bucket is rendered as a small stacked column where every distinct state's color contributes a height proportional to the fraction of that bucket's time span it actually occupied. This lets a densely collapsed region still visually convey which state dominated a given interval, instead of hiding that information behind a generic gray box.
Details:
Screenshots
States when compactly folded
States when zoomed in