Code Monkey home page Code Monkey logo

squid's Introduction

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.2 or higher. If used in a Rails project, requires Rails 4.0 or higher.

To include in your project, add gem 'squid', '~> 1.4' 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! ✌️ 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. 😙

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

Happy hacking!

squid's People

Contributors

claudiob avatar rmosolgo avatar kangkyu avatar tandibar avatar packetmonkey avatar floriandejonckheere avatar rbngzlv avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.