claudiob/squid
关于
A Ruby library to plot charts in PDF files
开发工具实测星标增长
- 24小时
- 0
- 7天
- 0
- 15天
- 正在收集历史
- 1个月
- 正在收集历史
各周期内的星标净变化,周期相互重叠,并非每日新增。缺失的测量保持空白。星标代表关注度,不代表软件质量。
README.md
原文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.
Quickstart
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

A comprehensive guide to Squid options
All the settings available for the chart method are detailed on the Squid homepage:
Please proceed to http://nullscreen.github.io/squid for more details and examples.
How to install
Squid requires Ruby 2.4 or higher. If used in a Rails project, requires Rails 5.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! :v: Feel free to try it the gem, explore the code, and send issues or pull requests.
All pull requests will have to make GitHub Actions 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!
探索相关项目
加载中…
