[ 
https://issues.apache.org/jira/browse/GROOVY-11103?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17733503#comment-17733503
 ] 

ASF GitHub Bot commented on GROOVY-11103:
-----------------------------------------

paulk-asert opened a new pull request, #1902:
URL: https://github.com/apache/groovy/pull/1902

   (no comment)




> Provide an ascii barchart method
> --------------------------------
>
>                 Key: GROOVY-11103
>                 URL: https://issues.apache.org/jira/browse/GROOVY-11103
>             Project: Groovy
>          Issue Type: New Feature
>            Reporter: Paul King
>            Assignee: Paul King
>            Priority: Major
>         Attachments: image-2023-06-16-23-12-16-683.png
>
>
> Groovy could provide an ascii barchart method. Python and DuckDB both provide 
> methods for doing a simple barchart. Use would be something like this:
> {code:java}
> ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 
> 'Saturday'].each{
>   println "\n${it.padRight(12)}${bar(it.size(), 0, 10, 10)}"
> }
> {code}
> With this output:
> !image-2023-06-16-23-12-16-683.png! 
> This isn't trying to be a fully-fledged chart package, just providing one 
> simple option which can be handy when working with the console, command-line 
> or groovysh.
> References:
> [https://duckdb.org/docs/sql/functions/char]
> [https://alexwlchan.net/2018/ascii-bar-charts/]



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to