No commit activity in last 3 years
No release in over 3 years
A wrapper for the terminal based gem *barcharts* to make it more customisable.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Runtime

>= 0.1.0, ~> 0.1
 Project Readme

Introducing the unicode_barchart202 gem

require 'unicode_barchart2020'

data = [
  ['Australia',     3000],
  ['Austria',       1000],
  ['Canada',        1000],
  ['Croatia',       1000],
  ['India',         1000],
  ['Poland',        2000],
  ['Spain',         1000],
  ['Switzerland',   1000],
  ['Ukraine',       1000],
  ['United States', 6000],
]

ubc = UnicodeBarchart2020.new data
s = ubc.build do |bar, label, value|
  "%s %s %s" % [bar, value, label]
end

puts s
▉▉▉▉▉▉▉▉▍ 3000 Australia
▉▉▊ 1000 Austria
▉▉▊ 1000 Canada
▉▉▊ 1000 Croatia
▉▉▊ 1000 India
▉▉▉▉▉▋ 2000 Poland
▉▉▊ 1000 Spain
▉▉▊ 1000 Switzerland
▉▉▊ 1000 Ukraine
▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▊ 6000 United States

Resources

barchart barcharts gem unicodebarchart2020 unicode ascii terminal cli