{"id":21162653,"url":"https://github.com/ytbryan/chart","last_synced_at":"2025-07-15T09:07:55.115Z","repository":{"id":46931836,"uuid":"47525457","full_name":"ytbryan/chart","owner":"ytbryan","description":"📊📉 Add beautiful and reusable charts with one line of ruby for Rails 5.x","archived":false,"fork":false,"pushed_at":"2024-07-03T04:07:03.000Z","size":43320,"stargazers_count":42,"open_issues_count":10,"forks_count":2,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-06-13T19:53:43.797Z","etag":null,"topics":["chart","chartjs","google-charts","highcharts","nvd3","rails"],"latest_commit_sha":null,"homepage":"https://rubygems.org/gems/chart","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ytbryan.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2015-12-07T02:51:55.000Z","updated_at":"2024-04-05T17:15:08.000Z","dependencies_parsed_at":"2024-12-15T19:19:23.895Z","dependency_job_id":null,"html_url":"https://github.com/ytbryan/chart","commit_stats":{"total_commits":62,"total_committers":2,"mean_commits":31.0,"dds":"0.016129032258064502","last_synced_commit":"ef0b00e79e159b6f374049e2e1e0268afd666a2a"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ytbryan/chart","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ytbryan%2Fchart","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ytbryan%2Fchart/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ytbryan%2Fchart/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ytbryan%2Fchart/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ytbryan","download_url":"https://codeload.github.com/ytbryan/chart/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ytbryan%2Fchart/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265402623,"owners_count":23759192,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["chart","chartjs","google-charts","highcharts","nvd3","rails"],"created_at":"2024-11-20T13:31:58.018Z","updated_at":"2025-07-15T09:07:55.096Z","avatar_url":"https://github.com/ytbryan.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"![Chart](assets/images/example.gif)\n\n[See an example on heroku](http://chartgemdemo.herokuapp.com) ([Example Source Code](http://github.com/ytbryan/chartdemo))\n\nChart ships with the following awesome charts:  \n\n* [ChartJS](https://github.com/nnnick/Chart.js/) (1.1.1 \u0026 2.2.1) Note: chart.js and Chart2.js are not compatible\n* [NVD3](https://github.com/novus/nvd3) (1.8.2)\n* [Google Chart](https://developers.google.com/chart/)\n* [Highchart](http://www.highcharts.com) (4.2.5)\n\n# Chart\n\n## The motivation for making `chart`\n\nI was reading up on rails engine and decided to test out my new knowledge by making a gem. As my previous project involves making multiple charts, I understand the pain of having duplicate data structure and functions in javascript and ruby just for the different charts.\n\nChart is my solution to quickly add Javascript/HTML chart into rails. You can write coffeescript/javascript to further interact with the rendered chart. Chart is inspired by another awesome gem `chartkick`\n\nThe limitation of chart is  that it generates in-line javascript and it does not aim to be a 100% wrapper for all chart.\n\nChart works with Sprockets and your asset pipeline.\n\nSeveral flavours to choose from.\n\nChartJS (MIT License)\n* Bar Chart `\u003c%= bar :id_of_your_chart, size, data %\u003e`\n* Line Chart `\u003c%= line :id, size, data %\u003e`\n* Pie Chart `\u003c%= pie :id, size, data %\u003e`\n* Radar Chart `\u003c%= radar :id, size, data %\u003e`\n\nNVD3 (MIT License)\n* Box Plot `\u003c%= boxplot :id, size, data %\u003e`\n* Discrete Bar `\u003c%= discrete_bar :id, size, data %\u003e`\n* Horizontal Grouped Bar `\u003c%= horizontal_grouped_bar :id, size, data %\u003e`\n\nGoogle Chart (Open Source)\n* Bar Chart `\u003c%= gBar :id, size, data %\u003e`\n* Line Chart `\u003c%= gLine :id, size, data %\u003e`\n* Pie Chart `\u003c%= gPie :id, size, data %\u003e`\n\nHighchart (Free for Personal usage but paid for Commercial)\n* Bar Chart `\u003c%= hBar %\u003e`\n* Line Chart `\u003c%= hLine %\u003e`\n* Pie Chart `\u003c%= hPie %\u003e`\n* Area Chart `\u003c%= hArea %\u003e`\n\n\n## Installation\n\nAdd this line to your application's Gemfile:\n\n```ruby\ngem 'chart'\n```\n\nAt Application.js, write `//= require chart` after turbolinks. Only require the chart if you need them.\n\n```\n//= require turbolinks\n//= require chart\n//= require chart2 (not compatible with chart 1.1.1)\n//= require nvd3\n//= require google\n//= require highcharts\n```\n\nAt Application.css, write `*= require nvd3`\n\n```\n*= require_tree .\n*= require nvd3\n```\n\n## Example Usage\n\n![Chart](assets/images/pie.gif)\n\nAt your View\n```\n\u003c%= pie :pie_chart, @pieSize, @pieData%\u003e\n```\n\nAt your Controller\n```\n@pieSize = {\n    :height =\u003e 500,\n    :width =\u003e 500\n  }\n\n  @pieData = [\n        {\n          value: 300,\n          color:\"#F7464A\",\n          highlight: \"#FF5A5E\",\n          label: \"Red\"\n        },\n        {\n          value: 50,\n          color: \"#46BFBD\",\n          highlight: \"#5AD3D1\",\n          label: \"Green\"\n        },\n        {\n          value: 100,\n          color: \"#FDB45C\",\n          highlight: \"#FFC870\",\n          label: \"Yellow\"\n        },\n        {\n          value: 40,\n          color: \"#949FB1\",\n          highlight: \"#A8B3C5\",\n          label: \"Grey\"\n        },\n        {\n          value: 120,\n          color: \"#4D5360\",\n          highlight: \"#616774\",\n          label: \"Dark Grey\"\n        }\n\n      ].to_json\n```\n\n## Development\n\nAfter checking out the repo, run `bin/setup` to install dependencies. Then, run `rake false` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.\n\nTo 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](https://rubygems.org).\n\n## Contributing\n\nBug reports and pull requests are welcome on GitHub at https://github.com/ytbryan/chart. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](contributor-covenant.org) code of conduct.\n\n\n## License\n\nThe gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).\n\n\n## Contact\n\n📮 Bryan Lim ytbryan@gmail.com\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fytbryan%2Fchart","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fytbryan%2Fchart","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fytbryan%2Fchart/lists"}