{"id":20865224,"url":"https://github.com/yfractal/chartkick","last_synced_at":"2025-10-05T14:08:33.400Z","repository":{"id":57713351,"uuid":"93457782","full_name":"yfractal/chartkick","owner":"yfractal","description":"Create beautiful JavaScript charts with one line of Clojure","archived":false,"fork":false,"pushed_at":"2017-06-10T06:50:18.000Z","size":9,"stargazers_count":23,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-21T13:44:09.582Z","etag":null,"topics":["chart","chartkick","clojure"],"latest_commit_sha":null,"homepage":"","language":"Clojure","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"epl-1.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/yfractal.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-06-06T00:06:06.000Z","updated_at":"2024-10-20T03:59:35.000Z","dependencies_parsed_at":"2022-09-05T22:50:22.526Z","dependency_job_id":null,"html_url":"https://github.com/yfractal/chartkick","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yfractal%2Fchartkick","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yfractal%2Fchartkick/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yfractal%2Fchartkick/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yfractal%2Fchartkick/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yfractal","download_url":"https://codeload.github.com/yfractal/chartkick/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253720077,"owners_count":21952959,"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","chartkick","clojure"],"created_at":"2024-11-18T05:48:02.764Z","updated_at":"2025-10-05T14:08:28.356Z","avatar_url":"https://github.com/yfractal.png","language":"Clojure","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Chartkick\n\n![Chartkick example](https://user-images.githubusercontent.com/3775525/26999689-645cdad8-4dd2-11e7-9cfa-cc971633c454.png)\n\nCreate beautiful Javascript charts with one line of Clojure. No more fighting with charting libraries!\n\n[See it in action](http://chartkick.com/).\n\nAny feedback, suggestions, comments or PRs are welcome.\n\n## Charts\n\n```clojure\n(require '[chartkick.core :as chartkick])\n\n(def data [[175 60] [190 80] [180 75]])\n\n```\n\nLine chart\n\n```clojure\n(chartkick/line-chart data)\n```\n\nPie chart\n\n```clojure\n(chartkick/pie-chart data)\n```\n\nColumn chart\n\n```clojure\n(chartkick/column-chart data)\n```\n\nBar chart\n\n```clojure\n(chartkick/bar-chart data)\n```\n\nArea chart\n\n```clojure\n(chartkick/area-chart data)\n```\n\nScatter chart\n\n```clojure\n(chartkick/scatter-chart data)\n```\n\nGeo chart\n\n```clojure\n(chartkick/geo-chart [[\"United States\" 44] [\"Germany\"] 23])\n```\n\nTimeline\n\n```clojure\n(chartkick/timeline [[\"Washington\" \"1789-04-29\" \"1797-03-03\"]\n                     [\"Adams\" \"1797-03-03\" \"1801-03-03\"]\n                     [\"Jefferson\" \"1801-03-03\" \"1809-03-03\"]])\n```\n\n### Options\n\nId and height\n\n```clojure\n(chartkick/line-chart data {:id \"the-chart-id\" :height \"500px\"})\n```\n\nMin and max values\n\n```clojure\n(chartkick/line-chart data {:min 1000 :max 5000})\n\n```\n\n`min` defaults to 0 for charts with non-negative values. Use `nil` to let the charting library decide.\n\nColors\n\n```clojure\n(chartkick/line-chart data {:colors [\"pink\" \"#999\"]})\n```\n\nStacked columns or bars\n\n```clojure\n(chartkick/column-chart data {:stacked true})\n```\n\nDiscrete axis\n\n```clojure\n(chartkick/line-chart data {:discrete true})\n```\n\nAxis titles\n\n```clojure\n(chartkick/line-chart data {:xtitle \"Time\" :ytitle \"Population\"})\n```\n\nThe current implementation does unfortunately not allow you to pass options directly to the charting library yet.. PRs are welcome!\n\nSee the documentation for [Google Charts](https://developers.google.com/chart/interactive/docs/gallery) and [Highcharts](http://api.highcharts.com/highcharts) for more info.\n\n### Data\n\nPass data as a Map or Array\n\n```clojure\n(chartkick/pie-chart {:Football 10 :Basketball 5})\n(chartkick/pie-chart [[\"Football\" 10] [\"Basketball\" 5]])\n```\n\nFor multiple series, use the format\n\n```clojure\n(chartkick/line-chart\n  [{:name \"Series A\" :data [[\"Football\" 10] [\"Basketball\" 5]] }\n   {:name \"Series B\", :data [[\"Baseball\" 2] [\"Pingpong\" 3]]}])\n```\n\nTimes can be a time, a timestamp, or a string (strings are parsed)\n\n```clojure\n(chartkick/line-chart\n  {1368174456 4,\n   \"2013-05-07 00:00:00 UTC\" 7\n   (new java.util.Date) 10})\n```\n\n## Installation\n\nAdd the following to your project :deps list:\n\n```clojure\n[chartkick \"0.1.0\"]\n```\n\nBy default when you render a chart it will return both the HTML-element and JS that initializes the chart.\nThis will only work if you load Chartkick in the `\u003chead\u003e` tag.\nYou can chose to render the JS \u0026 HTML separately using the `only: :html` or `only: :script` option.\nNote that if you use those options you need to pass `id` otherwise it wont work.\n\n```clojure\n(chartkick/line-chart [] {:id \"my-line-chart\" :only :html})\n(chartkick/line-chart [] {:id \"my-line-chart\" :only :script})\n```\n\nFor Google Charts, use:\n\n```html\n\u003cscript src=\"//www.google.com/jsapi\"\u003e\u003c/script\u003e\n\u003cscript src=\"/path/to/chartkick.js\"\u003e\u003c/script\u003e\n```\n\nIf you prefer Highcharts, download highcharts.js and use:\n\n```html\n\u003cscript src=\"/path/to/highcharts.js\"\u003e\u003c/script\u003e\n\u003cscript src=\"/path/to/chartkick.js\"\u003e\u003c/script\u003e\n```\n\n### Localization\n\nTo specify a language for Google Charts, add:\n\n```html\n\u003cscript\u003e\n  Chartkick.configure({language: \"de\"});\n\u003c/script\u003e\n```\n\nafter the JavaScript files and before your charts.\n\n\n## JavaScript API\n\nAccess a chart with:\n\n```javascript\nvar chart = Chartkick.charts[\"chart-id\"];\n```\n\nGet the underlying chart object with:\n\n```javascript\nchart.getChartObject();\n```\n\nYou can also use:\n\n```javascript\nchart.getElement();\nchart.getData();\nchart.getOptions();\n```\n\n## No Clojure? No Problem\n\nCheck out\n\n* JS [chartkick.js](https://github.com/ankane/chartkick.js)\n* Ruby [chartkick](https://github.com/ankane/chartkick)\n* Python [chartkick.py](https://github.com/mher/chartkick.py)\n\n## History\n\nView the [changelog](https://github.com/yfractal/chartkick/blob/master/CHANGELOG.md)\n\nChartkick follows [Semantic Versioning](http://semver.org/)\n\n## Contributing\n\nEveryone is encouraged to help improve this project. Here are a few ways you can help:\n\n- [Report bugs](https://github.com/yfractal/chartkick/issues)\n- Fix bugs and [submit pull requests](https://github.com/yfractal/chartkick/pulls)\n- Write, clarify, or fix documentation\n- Suggest or add new features\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyfractal%2Fchartkick","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyfractal%2Fchartkick","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyfractal%2Fchartkick/lists"}