Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/data visualization #14

Closed
wants to merge 8 commits into from

Conversation

vohai611
Copy link

@vohai611 vohai611 commented Oct 4, 2024

Hi @shshemi,
Do you open to add simple visualization feature into this project?
I find the case when I want to quickly view data files in charts (open chart mode with c key)
The code is not polish, but I think enough for POC. If possible, please give me some guideline.

@shshemi
Copy link
Owner

shshemi commented Oct 6, 2024

Hi @vohai611,
I was thinking of adding visualization features. However, I haven't fully decided on the UX.
There are a couple of shortcomings with your implementation:

  1. First of all, the feature branch is so behind the main (it cannot be merged).
  2. Selecting chart aspects through UI is not the best UX, IMO. Users usually select them once and then start using the chart. So, they just take up some space that could be used for the main content, which is the chart itself. Therefore, I would say remove the column select components and add a command instead. For instance, :chart hist price could be the command to show the histogram of prices.
  3. I tried multiple charts for housing.csv, and I didn't find the charts as expressive as they should be. Just passing the ratatui::widgets::Chart inputs to the user is not the best UX, again. Try to implement meaningful charts. (Take a look at SeaBorn's gallery to get some inspiration).
  4. There is another UX question: should a chart open in a new tab or on top of the table (like sheets)? The reason that sheets are opened on top of the tables is that they interact with the table data, with operations such as prev, next, first, or last item. Moving to the next item in the sheet view causes the table to select the next item as well. However, charts do not necessarily interact with the table data. They compute the content once and display it to the user. I would like your opinion on this one.

@shshemi shshemi closed this Jan 6, 2025
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.

2 participants