Code Monkey home page Code Monkey logo

gruff-nmhoang's Introduction

(new features)

  • format string for marker label
  • add secondary y axis
  • add property to specify space between data column (not bars)
  • add composite chart of bar and line
  • bar n line chart can use reference lines from line chart
  • colored boxes for legends can be vary sized (through legend_box_sizes property)

(fixes)

  • legend at bottom

v0.7.1b: fix pre normalize for secondary y axis

v0.7.2:

  • add x_axis_on_top, if true, x axis markers will be drawn on top instead of bottom
  • fix marker_format not working for side bar chart

Gruff Graphs

Build Status Gem Version

A library for making beautiful graphs.

Installation

Add this line to your application's Gemfile:

gem 'gruff'

And then execute:

$ bundle

Or install it yourself as:

$ gem install gruff

Usage

require 'gruff'
g = Gruff::Line.new
g.title = 'Wow!  Look at this!'
g.labels = { 0 => '5/6', 1 => '5/15', 2 => '5/24', 3 => '5/30', 4 => '6/4',
             5 => '6/12', 6 => '6/21', 7 => '6/28' }
g.data :Jimmy, [25, 36, 86, 39, 25, 31, 79, 88]
g.data :Charles, [80, 54, 67, 54, 68, 70, 90, 95]
g.data :Julie, [22, 29, 35, 38, 36, 40, 46, 57]
g.data :Jane, [95, 95, 95, 90, 85, 80, 88, 100]
g.data :Philip, [90, 34, 23, 12, 78, 89, 98, 88]
g.data :Arthur, [5, 10, 13, 11, 6, 16, 22, 32]
g.write('exciting.png')

Examples

You can find many examples in the test directory along with their resulting charts in the output directory.

You can find older examples here: http://nubyonrails.com/pages/gruff

Accumulator bar chart

Accumulator bar chart

Area chart

Area chart

Bar chart

Bar chart

Bezier chart

In progress!

Bezier chart

Bullet chart

In progress!

Bullet chart

Dot chart

Dot chart

Line chart

Line chart

LineXY chart

LineXY chart

Net chart

Net chart

Pie chart

Pie chart

Scatter chart

Scatter chart

Side bar chart

Side bar chart

Side stacked bar chart

Side stacked bar chart

Spider chart

Spider chart

Stacked area chart

Stacked area chart

Stacked bar chart

Stacked bar chart

Documentation

http://www.rubydoc.info/github/topfunky/gruff/frames

Supported Ruby Versions

We aim to support all Ruby implementations supporting Ruby language level 1.9.3 or later. Currently we are running CI for MRI, JRuby, and Rubinius.

Contributing

Source

The source for this project is now kept at GitHub:

http://github.com/topfunky/gruff

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request

gruff-nmhoang's People

Contributors

donv avatar topfunky avatar brimil01 avatar jcoglan avatar nikosd avatar erebor avatar iox avatar jej avatar nmhoang05 avatar jjulian avatar h0tl33t avatar dce avatar house9 avatar albertein avatar alexrozanski avatar flameeyes avatar vicvega avatar gwolf avatar joshgoebel avatar fordguo avatar gawyn avatar scriptedworld avatar jordimassaguerpla avatar kappie avatar marshally avatar bhaak avatar scnaegle avatar prikha avatar bfalling avatar dmaciejak avatar

Watchers

 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.