TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Show HN: ASCII line chart with console, HTML and image outputs, written in PHP

74 点作者 noximo将近 7 年前

6 条评论

protomikron将近 7 年前
Nice work, I love exploiting unicode characters to &quot;draw&quot; in terminal environments. You seem to use &#x27;╰&#x27;, &#x27;╮&#x27;, &#x27;╭&#x27; and &#x27;╯&#x27; to approximate non-straight lines, interesting idea, I haven&#x27;t seen this before.<p>Another approach is to use block characters, like U+259A or U+259E (see <a href="https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Block_Elements" rel="nofollow">https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Block_Elements</a>), but unfortunately it is hard to do when you want to support colors as it doesn&#x27;t go well with intersections.<p>&#x2F;&#x2F;edit: HN does not like block elements, but your 21th century terminal will print them
评论 #17696581 未加载
tutfbhuf将近 7 年前
I can also recommend:<p><a href="https:&#x2F;&#x2F;github.com&#x2F;kroitor&#x2F;asciichart" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;kroitor&#x2F;asciichart</a> (JS, Py)<p><a href="https:&#x2F;&#x2F;github.com&#x2F;guptarohit&#x2F;asciigraph" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;guptarohit&#x2F;asciigraph</a> (Go)<p><a href="https:&#x2F;&#x2F;github.com&#x2F;madnight&#x2F;asciichart" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;madnight&#x2F;asciichart</a> (Haskell)
fluxsauce将近 7 年前
Nicely done! Glad to see the explicit shout-out to <a href="https:&#x2F;&#x2F;github.com&#x2F;kroitor&#x2F;asciichart" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;kroitor&#x2F;asciichart</a><p>FYI, the original calls itself ASCII chart because it limits itself to ASCII - <a href="https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;ASCII" rel="nofollow">https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;ASCII</a><p>However, the curved shapes are from <a href="https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Code_page_866" rel="nofollow">https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Code_page_866</a> which originated from the USSR and was used in DOS and OS&#x2F;2 to write Cyrillic script.<p>I honestly didn&#x27;t know until I searched for it; I was curious and didn&#x27;t recognize the characters.
评论 #17696327 未加载
评论 #17696607 未加载
gitgud将近 7 年前
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.
guptarohit将近 7 年前
Awesome! Good to see you added two new features, i.e. color and multiline. Check the one ported to the Go <a href="https:&#x2F;&#x2F;github.com&#x2F;guptarohit&#x2F;asciigraph" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;guptarohit&#x2F;asciigraph</a>
lixtra将近 7 年前
What’s your use case for this?
评论 #17696745 未加载
评论 #17696143 未加载