You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

chart_helpers

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

chart_helpers

0.0.2
bundlerRubygems
Version published
Maintainers
1
Created
Source

Chart Helpers

Chart Helpers is a gem that can parse markdown-like text and turn it into SVG files.

Gantt Chart

Installation

Add this line to your application's Gemfile:

gem 'chart_helpers'

And then execute:

$ bundle

Or install it yourself as:

$ gem install charts_helpers

Usage

Gantt Chart

require 'charts_helpers'

chart = <<EOF
gantt
title My Title
numberFormat .%2f

row 0, :group1, 0.000, 0.100
row 1, :group1, 0.100, 0.200
row 2, :group1, 0.200, 0.300
EOF
ChartHelpers.render_chart(chart, 'my_chart.svg')

Flowchart

require 'charts_helpers'

chart = <<EOF
graph
A-->B
subgraph Name
  B--text-->C
end
EOF
ChartHelpers.render_chart(chart, 'my_chart.svg')

Supported arrows:

Line Type
A-->BSolid arrow
B---CSolid line
C--text-->DSolid arrow with label
D--text---ESolid line with label
E-.text.->FDotted arrow with label
F-.->GDotted arrow
G==>HBold arrow
H==text===>IBold line with text

DOT Format

Full support for GraphViz's .dot format

require 'charts_helpers'

chart = <<EOF
graph graphname {
  a -- b -- c;
  b -- d;
}
EOF
ChartHelpers.render_chart(chart, 'my_chart.svg')

Development

After checking out the repo, run bin/setup to install dependencies. It is developed using the ruby version indicated in dev.yml. You will also need the homebrew packages listed in dev.yml, or the corresponding Linux packages if you are using Linux.

Then, run bin/testunit to run the tests. You can also run bin/console for an interactive prompt that will allow you to experiment.

To install this gem onto your local machine, run bundle exec rake install. To release a new version, update the version number in version.rb, and then run bundle exec rake release, which will create a git tag for the version, push git commits and tags, and push the .gem file to rubygems.org.

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/ChartHelpers. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the Contributor Covenant code of conduct.

FAQs

Package last updated on 19 Sep 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts