Cool little project, I would put the gif of the graph at the beginning of the Readme before the advanced example. This shows off the application a bit earlier.
Nice work, I love exploiting unicode characters to "draw" in terminal environments. You seem to use '╰', '╮', '╭' and '╯' to approximate non-straight lines, interesting idea, I haven't seen this before.
Another approach is to use block characters, like U+259A or U+259E (see https://en.wikipedia.org/wiki/Block_Elements), but unfortunately it is hard to do when you want to support colors as it doesn't go well with intersections.
//edit: HN does not like block elements, but your 21th century terminal will print them
No? Even this very Wikipedia article says CP866 inherited the box-drawing characters from CP437 (and I bet that wasn't the first character set that had them).
I'm trying to make a trading bot but shifting through over a milion of historical prices tends to be a bit uncomfortable when they are outputted in a simple table.
So i looked for some chart that could help me visualize it but found none written in php so I wrote one myself.
13 comments
[ 0.26 ms ] story [ 43.2 ms ] threadAnother approach is to use block characters, like U+259A or U+259E (see https://en.wikipedia.org/wiki/Block_Elements), but unfortunately it is hard to do when you want to support colors as it doesn't go well with intersections.
//edit: HN does not like block elements, but your 21th century terminal will print them
But from what I gathered, these symbols are made for drawing, so I'm not really exploiting anything: https://en.wikipedia.org/wiki/Box-drawing_character
FYI, the original calls itself ASCII chart because it limits itself to ASCII - https://en.wikipedia.org/wiki/ASCII
However, the curved shapes are from https://en.wikipedia.org/wiki/Code_page_866 which originated from the USSR and was used in DOS and OS/2 to write Cyrillic script.
I honestly didn't know until I searched for it; I was curious and didn't recognize the characters.
No? Even this very Wikipedia article says CP866 inherited the box-drawing characters from CP437 (and I bet that wasn't the first character set that had them).
I'm using the same characters that the original uses. Pretty much ctrl+c ctrl+v them into my code :)
So i looked for some chart that could help me visualize it but found none written in php so I wrote one myself.
https://github.com/kroitor/asciichart (JS, Py)
https://github.com/guptarohit/asciigraph (Go)
https://github.com/madnight/asciichart (Haskell)