[GH-ISSUE #136] XAxisUnscaled doesn't play well with zoom making unzoom impossible #87

Closed
opened 2026-03-03 16:22:14 +03:00 by kerem · 3 comments
Owner

Originally created by @mum4k on GitHub (Feb 18, 2019).
Original GitHub issue: https://github.com/mum4k/termdash/issues/136

When data are continuously coming in, it is impossible to fully unzoom when XAxisUnscaled.

We should return the zoom tracker back to unzoomed state once we hit the "baseX" view.

Originally created by @mum4k on GitHub (Feb 18, 2019). Original GitHub issue: https://github.com/mum4k/termdash/issues/136 When data are continuously coming in, it is impossible to fully unzoom when XAxisUnscaled. We should return the zoom tracker back to unzoomed state once we hit the "baseX" view.
kerem 2026-03-03 16:22:14 +03:00
  • closed this issue
  • added the
    bug
    label
Author
Owner

@mum4k commented on GitHub (Feb 18, 2019):

Secondly when we zoom in and out while the baseX is allowed to scroll, there is a scenario where min > max. Needs investigation:


panic: container.Draw => error: unable to draw widget *linechart.LineChart: failed to create zoomed X axis: invalid min:316, max:311, must be min <= max

goroutine 1 [running]:
main.main()
/Users/mum4k/go/src/github.com/mum4k/termdash/widgets/linechart/linechartdemo/linechartdemo.go:122 +0x6b6
exit status 2

<!-- gh-comment-id:464857936 --> @mum4k commented on GitHub (Feb 18, 2019): Secondly when we zoom in and out while the baseX is allowed to scroll, there is a scenario where min > max. Needs investigation: --- panic: container.Draw => error: unable to draw widget *linechart.LineChart: failed to create zoomed X axis: invalid min:316, max:311, must be min <= max goroutine 1 [running]: main.main() /Users/mum4k/go/src/github.com/mum4k/termdash/widgets/linechart/linechartdemo/linechartdemo.go:122 +0x6b6 exit status 2 ---
Author
Owner

@mum4k commented on GitHub (Feb 18, 2019):

These are two separate issues:

  1. The FSM of the zoom tracker never gets back to the fully unzoomed state.
  2. We have a very basic race - LineChart.Mouse isn't protected by mutex. This causes a race between a mouse event and a redraw.
<!-- gh-comment-id:464864592 --> @mum4k commented on GitHub (Feb 18, 2019): These are two separate issues: 1. The FSM of the zoom tracker never gets back to the fully unzoomed state. 2. We have a very basic race - LineChart.Mouse isn't protected by mutex. This causes a race between a mouse event and a redraw.
Author
Owner

@mum4k commented on GitHub (Feb 18, 2019):

Fixed in the devel branch.

<!-- gh-comment-id:464924984 --> @mum4k commented on GitHub (Feb 18, 2019): Fixed in the devel branch.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/termdash#87
No description provided.