{"id":19032480,"url":"https://github.com/creadone/redraw","last_synced_at":"2026-04-15T18:01:56.140Z","repository":{"id":70234290,"uuid":"187914950","full_name":"creadone/redraw","owner":"creadone","description":"Prototyping tool for charts with c3js and Rails","archived":false,"fork":false,"pushed_at":"2019-05-22T21:42:43.000Z","size":130,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-07-20T06:41:07.774Z","etag":null,"topics":["c3js","charts","d3js","gem","ruby-on-rails"],"latest_commit_sha":null,"homepage":"","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/creadone.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"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":"2019-05-21T21:18:12.000Z","updated_at":"2023-03-05T00:55:52.000Z","dependencies_parsed_at":"2023-07-29T09:16:09.497Z","dependency_job_id":null,"html_url":"https://github.com/creadone/redraw","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/creadone/redraw","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/creadone%2Fredraw","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/creadone%2Fredraw/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/creadone%2Fredraw/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/creadone%2Fredraw/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/creadone","download_url":"https://codeload.github.com/creadone/redraw/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/creadone%2Fredraw/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31853279,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-15T15:24:51.572Z","status":"ssl_error","status_checked_at":"2026-04-15T15:24:39.138Z","response_time":63,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["c3js","charts","d3js","gem","ruby-on-rails"],"created_at":"2024-11-08T21:28:49.663Z","updated_at":"2026-04-15T18:01:56.108Z","avatar_url":"https://github.com/creadone.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Redraw\n\nRedraw is a prototyping tool for create custom charts with [C3.js](http://c3js.org) and Rails. C3.js is the very flexible library based on D3.js for create the charts with [many options](https://github.com/c3js/c3/blob/master/src/config.js) for fine tuning result.\n\nWhile you creating each chart you need try the many variations until you reach the final result, it's a bit tiring. This Gem allow work with the chart configuration as usual Ruby class containing hash-like DSL for save you time.\n\nCurrently project status is a **proof-of-concept** and not completed yet. Described below is worked but will change and can break existing functionality, use only in sandbox.\n\n## Install\n\nAdd to Gemfile and then `bundle install`\n\n```\ngem 'redraw', git: 'git@github.com:creadone/redraw.git'\n```\n\nIn `application.js` add:\n\n```\n//= require d3.min\n//= require c3.min\n```\n\n## Quick Start\n\nMake directory for the charts store. You can use any but most easy way to add it inside `/app` like `/app/charts`, in development Spring will be reload code on each change without editing Rails autoload path. Then for create the first chart put empty config file `/app/charts/line_chart.rb` and paste code below:\n\n```Ruby\nRedraw::Chart.new(\"LineChart\").build do\n\n  bindto 'container_name'\n  data do\n    columns [\n      ['data1', 30, 200, 100, 400, 150, 250],\n      ['data1', 50, 20, 10, 40, 15, 25]\n    ]\n  end\n\nend\n```\n\nNow you can render chart in views:\n\n```ERB\n\u003c%= redraw_chart 'LineChart' %\u003e\n```\n\n## Todo\n- [ ] Expose any config variables for the passing data from view\n- [ ] Allow inline javascript like `format: d3.format('$,')`\n- [ ] Writing javascript and css in config directly\n- [ ] Caching config and delivering them through assets pipeline\n- [ ] Adding tests after API completed\n- [ ] Chart inheritance (may be)\n- [ ] Baking charts into static files or building stand-alone widget (may be)\n- [ ] Flexible config for interacting with D3 (may be)\n- [ ] Get rid of Rails dependency (may be)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcreadone%2Fredraw","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcreadone%2Fredraw","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcreadone%2Fredraw/lists"}