squid rspec travis-ci ruby Rubygems

A Ruby library to plot charts in PDF files

Squid

Squid helps you write Ruby code to draw graphs in PDF files.

The source code is available on GitHub and the documentation on RubyDoc.

Build Status Coverage Status Dependency Status Code Climate Online docs Gem Version

Prawn is a great Ruby library to generate PDF files but lacks high-level components to draw graphs.

Squid adds a single method chart(data = {}, options = {}) to Prawn.

Provide the data to plot as a hash, with each key/value representing a series.

For instance, the following code generates the graph below:

data = {views: {2013 => 182, 2014 => 46, 2015 => 134}}
chart data

01-basic”)

A comprehensive guide to Squid options

All the settings available for the chart method are detailed on the Squid homepage:

Squid homepage

Please proceed to http://fullscreen.github.io/squid for more details and examples.

How to install

Squid requires Ruby 2.1 or higher. If used in a Rails project, requires Rails 4.0 or higher.

To include in your project, add gem 'squid', '~> 1.2' to the Gemfile file of your Ruby project.

How to generate the manual

rake manual

How to contribute

If you’ve made it this far in the README… thanks! :v: Feel free to try it the gem, explore the code, and send issues or pull requests.

All pull requests will have to make Travis and Code Climate happy in order to be accepted. :kissing_smiling_eyes:

You can also run the tests locally with bundle exec rspec.

Happy hacking!

Related Repositories

squid

squid

A Ruby library to plot charts in PDF files ...

squid

squid

Squid – type-safe metaprogramming and compilation framework for Scala ...

docker-squid

docker-squid

Dockerfile to create a Docker container image for Squid proxy server ...

squidanalyzer

squidanalyzer

Squid Analyzer parses Squid proxy access log and reports general statistics about hits, bytes, users, networks, top URLs, and top second level domains. Statistic reports are oriented toward user and bandwidth control. ...


Top Contributors

claudiob claudiofullscreen tandibar packetmonkey rbngzlv

Releases

-   v1.3.0 zip tar
-   v1.2.0 zip tar
-   v1.1.0 zip tar
-   v1.0.1 zip tar
-   v1.0.0 zip tar
-   v1.0.0.beta4 zip tar
-   v1.0.0.beta3 zip tar
-   v1.0.0.beta2 zip tar
-   v1.0.0.beta1 zip tar