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

Add chart widgets #59

Open
5 tasks
jwlodek opened this issue Jun 15, 2020 · 3 comments
Open
5 tasks

Add chart widgets #59

jwlodek opened this issue Jun 15, 2020 · 3 comments
Labels
Core Add for issues having to do with core functions Feature Request Add for a new feature request Help wanted Extra attention is needed Widgets Add for issues having to do with widgets
Milestone

Comments

@jwlodek
Copy link
Owner

jwlodek commented Jun 15, 2020

Is your feature request related to a problem? Please describe.
Widgets for charts (line, bar, etc) should be added.

Describe the solution you'd like
A new folder called chart_widgets should be made, and individual chart widgets should be developed and placed there.

  • Bar Chart
  • Line Chart
  • Histogram
  • Pie Chart (Maybe?)
  • Scatterplot
@jwlodek jwlodek added Help wanted Extra attention is needed Feature Request Add for a new feature request Widgets Add for issues having to do with widgets Core Add for issues having to do with core functions labels Jun 15, 2020
@jwlodek jwlodek added this to the v0.2.0 milestone Jun 15, 2020
@jupiterbjy
Copy link
Contributor

jupiterbjy commented Feb 26, 2021

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.

@jwlodek
Copy link
Owner Author

jwlodek commented Mar 4, 2021

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.

@jupiterbjy
Copy link
Contributor

jupiterbjy commented Mar 5, 2021

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Core Add for issues having to do with core functions Feature Request Add for a new feature request Help wanted Extra attention is needed Widgets Add for issues having to do with widgets
Projects
None yet
Development

No branches or pull requests

2 participants