Project

pi_charts

0.0
No commit activity in last 3 years
No release in over 3 years
A ruby gem to easily build beautiful charts using chartjs. If you like charts, ruby, and want beautiful javascript charts.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
 Dependencies

Development

~> 1.14
~> 10.0
~> 3.0
 Project Readme

Pi Charts

Pi Charts is a ruby gem to easily generate beautiful charts using chartjs 📈◕📊◔📉🍩

⚠️ This gem is install in development. Things may change to be better in the future.

Installation

$ gem install pi_charts

Usage

Pi Charts is a really good pair with something like sinatra, for example:

require 'sinatra'
require 'pi_charts'

def bake_pie
  chart = PiCharts::Pie.new
  chart.add_dataset(label: "cats", data: 80)
  chart.add_dataset(label: "dogs", data: 50)
  chart.hover
  chart.responsive
  "<head>" + chart.cdn + "</head>" + "<body>" + chart.html(width: 60) + "</body>"
end

get('/serve_pie') { bake_pie }

Screen Shots

fresh pie

bar

line

License

The gem is available as open source under the terms of the MIT License.

Author

Kent 'picat' Gruber