Skip to content
Minimalistic wrapper around chartkick for using it within iruby
Ruby Shell
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
bin
lib/iruby
spec
vendor/assets/javascripts
.gitignore
.rspec
.ruby-version
.travis.yml
CHANGELOG.md
Gemfile
Gemfile.lock
LICENSE.txt
README.md
Rakefile
iruby-chartkick.gemspec

README.md

iruby-chartkick Build Status

You like writing Ruby within Juypter notebooks? Awesome, you're not alone - we do so, too ☀️ Since we also fell in love with the handy charting API of ankane/chartkick, we wrote this little gem bringing them together.

iruby-chartkick was made for easy plug-n-play plotting data using the awesomeness of chartkick within IRuby-backed Jupyter notebooks.

Installation

gem install iruby-chartkick

Usage

You can either include the module IRuby::Chartkick and use the wrapper methods, like line_chart:

include IRuby::Chartkick
		
data = {
  2019 => 1,
  2020 => 122,
  2021 => 34
}
 
line_chart(data)

Or you use the chart wrapper classes directly:

include IRuby::Chartkick
		
data = {
  2019 => 1,
  2020 => 122,
  2021 => 34
}

IRuby::Chartkick::LineChart.new(data).plot

Examples:

Bildschirmfoto 2019-11-04 um 16 57 36 Bildschirmfoto 2019-11-04 um 16 54 38 Bildschirmfoto 2019-11-04 um 16 55 35 Bildschirmfoto 2019-11-04 um 16 56 04 Bildschirmfoto 2019-11-04 um 16 56 17 Bildschirmfoto 2019-11-04 um 16 56 31 Bildschirmfoto 2019-11-04 um 16 47 49 Bildschirmfoto 2019-11-04 um 16 56 17 Bildschirmfoto 2019-11-04 um 16 43 15 Bildschirmfoto 2019-11-04 um 16 46 17

You can’t perform that action at this time.