Giter Site home page Giter Site logo

Add chart widgets about py_cui HOT 3 OPEN

jwlodek avatar jwlodek commented on May 20, 2024
Add chart widgets

from py_cui.

Comments (3)

jupiterbjy avatar jupiterbjy commented on May 20, 2024

Here's some design factors I was facing with:

  1. Since having numbers left side makes things complicated than it should be, having this right-side looks legit.
  2. Using dots can give similar looks with line chart, and also runs in non-unicode situations like CMD with default config.
  3. Negative value presentation
    • One way to present negative value is adding minimum value to data for drawing and then marking it as negative on left side.
    • Alternative would be having value 0 as starting point and stretch bar to both side. This will require flipping background and char color as there is no vertically flipped progressive characters. But this required so much more calculations and don't quite look great for the effort it took.

Here's demonstration of concept with two overlapping infinite sin waves. Video is fast-forwarded by factor of 2.

ezgif.com-gif-maker.4.mp4

Adding such as a reliable widget won't be easy for sure, and current implementation is so much limited and dirty and easily goes out of height. We'll probably need to limit or sacrifice some factors and design what and how GraphWidget is supposed to do or look - and I definitely need your idea on those.

-p.s. I think we'll have to change default style of SliderWidget someday to match more of py_cui's style, rather than having it barebone as default. This might or might not be a breaking change as toggle_border and toggle_title works as toggle and changing default would invert theme on previously written codes. But since 1.3.0 hasn't been released yet so practically no code other than my ones will be affected. If you also think this change is needed, I'll make a PR before 1.3.0's release.

from py_cui.

jwlodek avatar jwlodek commented on May 20, 2024

This is certainly impressive and a good start, is the code available somewhere? As for the slider, I think it makes sense to have it look more similar to the default configuration as standard, and then have the options to make it look more barebones.

from py_cui.

jupiterbjy avatar jupiterbjy commented on May 20, 2024

Hyperlink above video is the source code - somewhat complex and not easy to read for sure.

It's more of an application so far - for a proof/validation of concept drawn on TextBlock. Logic itself is the things starting with visualizer_* and graph_draw*.

In it's nature it's core logic is from what I used to visualize sorts long ago to support various character rules, but we might not need such feature and could strip down complexity a bit and improve the performance.


Still hasn't decided how to deal with large numbers overflowing out of graphing area, not sure what I should do for such case where axis just decide to disappear out of existence yet.

from py_cui.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.