Add chart widgets
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
Here's some design factors I was facing with:
- Since having numbers left side makes things complicated than it should be, having this right-side looks legit.
- Using dots can give similar looks with line chart, and also runs in non-unicode situations like CMD with default config.
- 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.
https://user-images.githubusercontent.com/26041217/109341870-5f184200-78ae-11eb-933a-ec0591527bf7.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.
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.
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.