[GH-ISSUE #11] Feature request #7

Closed
opened 2026-03-04 01:01:04 +03:00 by kerem · 4 comments
Owner

Originally created by @andrewuhl on GitHub (Jan 11, 2018).
Original GitHub issue: https://github.com/rivo/tview/issues/11

Any plans / scope in this project to add basic plotting widgets? E.g. scatter, line or bar plots?

Originally created by @andrewuhl on GitHub (Jan 11, 2018). Original GitHub issue: https://github.com/rivo/tview/issues/11 Any plans / scope in this project to add basic plotting widgets? E.g. scatter, line or bar plots?
kerem closed this issue 2026-03-04 01:01:04 +03:00
Author
Owner

@rivo commented on GitHub (Jan 11, 2018):

I'm not sure. I find that github.com/gizak/termui does a pretty good job at that. I was trying to focus on things that termui doesn't cover.

I'm not ruling it out at this point but plots/charts would more likely be on the long-term roadmap.

Is there a specific reason you'd like to have it in here instead of using termui?

<!-- gh-comment-id:356976058 --> @rivo commented on GitHub (Jan 11, 2018): I'm not sure. I find that [github.com/gizak/termui](https://github.com/gizak/termui) does a pretty good job at that. I was trying to focus on things that `termui` doesn't cover. I'm not ruling it out at this point but plots/charts would more likely be on the long-term roadmap. Is there a specific reason you'd like to have it in here instead of using `termui`?
Author
Owner

@andrewuhl commented on GitHub (Jan 11, 2018):

termui was the inspiration for my question. Is it possible to embed a termui component in one of your flex panels? I haven't tried this yet, but perhaps an integration is straightforward?

<!-- gh-comment-id:356996400 --> @andrewuhl commented on GitHub (Jan 11, 2018): ```termui``` was the inspiration for my question. Is it possible to embed a ```termui``` component in one of your flex panels? I haven't tried this yet, but perhaps an integration is straightforward?
Author
Owner

@rivo commented on GitHub (Jan 11, 2018):

I had a quick look at how termui works. I'm by no means an expert on termui internals but it looks like they draw their charts into buffers whose content then gets copied over to github.com/nsf/termbox-go. tviewis not based on termbox but on tcell but termui looks losely coupled enough to be connected to something different.

My guess is that instead of calling their render() function, you could create your own primitive in tview whose Draw() function would read out the termui plot buffer and draw it into tview's screen.

But like I said, this is just a guess based on a very brief look.

<!-- gh-comment-id:357044887 --> @rivo commented on GitHub (Jan 11, 2018): I had a quick look at how `termui` works. I'm by no means an expert on `termui` internals but it looks like they draw their charts into buffers whose content then gets copied over to [github.com/nsf/termbox-go](https://github.com/nsf/termbox-go). `tview`is not based on `termbox` but on `tcell` but `termui` looks losely coupled enough to be connected to something different. My guess is that instead of calling their [render()](https://github.com/gizak/termui/blob/e9a3a6b3d6472ce875254d734f36335c15ebd4e6/render.go#L101) function, you could create your own primitive in `tview` whose [Draw()](https://godoc.org/github.com/rivo/tview#Primitive) function would read out the `termui` plot buffer and draw it into `tview`'s screen. But like I said, this is just a guess based on a very brief look.
Author
Owner

@darkhz commented on GitHub (Dec 13, 2022):

Line charts has now been implemented in tvxwidgets, import and use.

<!-- gh-comment-id:1348461246 --> @darkhz commented on GitHub (Dec 13, 2022): Line charts has now been implemented in [tvxwidgets](https://github.com/navidys/tvxwidgets), import and use.
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/tview#7
No description provided.