prompt-toolkit / prompt-toolkit/python-prompt-toolkit

Preferred way to display charts/plots

Open
#872 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
10.6k
Forks
815
PR merge metrics
No merged PRs in 30d

Description

I am planning to display ascii-art plots / charts within full screen application. My initial idea was to have Window/BufferControl/Buffer combo where I would simply set contents of the buffer with data I would like to display. However, rendering such content requires knowledge of drawable area dimensions, which to my knowledge, are not accessible directly.
I know there is a create_content method for BufferControl, which is called with height/width values.
With that, does it require that I would need to create a new UI Control, that would create plot content upon call to create_content? Or maybe there's a simpler way to just use generic Window/BufferControl/Buffer combo I don't see yet? Or maybe there exists a different dedicated control that can help me with doing the above?

Thank you for any tips and for creating such a useful library.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading the Window, BufferControl, and Buffer APIs, focusing on BufferControl.create_content and its height/width arguments. Determine whether existing controls support size-aware chart rendering or whether a dedicated control is needed; done means documenting or implementing a clear supported approach for displaying ASCII plots in a full-screen application.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
cli
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.