{"id":13463210,"url":"https://github.com/michelson/lazy_high_charts","last_synced_at":"2025-05-14T12:09:45.804Z","repository":{"id":768723,"uuid":"451554","full_name":"michelson/lazy_high_charts","owner":"michelson","description":"Make highcharts a la ruby , works in rails 5.X / 4.X / 3.X, and other ruby web frameworks","archived":false,"fork":false,"pushed_at":"2023-02-11T14:47:59.000Z","size":1815,"stargazers_count":1050,"open_issues_count":39,"forks_count":242,"subscribers_count":38,"default_branch":"master","last_synced_at":"2025-04-11T04:58:17.409Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://www.suipit.com","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/michelson.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"MIT-LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2009-12-28T22:29:14.000Z","updated_at":"2025-04-05T02:42:27.000Z","dependencies_parsed_at":"2023-07-06T08:02:06.868Z","dependency_job_id":null,"html_url":"https://github.com/michelson/lazy_high_charts","commit_stats":{"total_commits":335,"total_committers":65,"mean_commits":5.153846153846154,"dds":0.755223880597015,"last_synced_commit":"54f4b6d19af11adedb0e2f5846822bc835b95a18"},"previous_names":[],"tags_count":17,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/michelson%2Flazy_high_charts","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/michelson%2Flazy_high_charts/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/michelson%2Flazy_high_charts/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/michelson%2Flazy_high_charts/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/michelson","download_url":"https://codeload.github.com/michelson/lazy_high_charts/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248345273,"owners_count":21088244,"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":[],"created_at":"2024-07-31T13:00:48.139Z","updated_at":"2025-04-11T04:58:25.200Z","avatar_url":"https://github.com/michelson.png","language":"Ruby","funding_links":[],"categories":["Ruby","Graphics","Data Visualization"],"sub_categories":["Graphing"],"readme":"# LazyHighCharts\n\n[![Gitter](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/michelson/lazy_high_charts?utm_source=badge\u0026utm_medium=badge\u0026utm_campaign=pr-badge\u0026utm_content=badge)\n\nThis gem provides a simple and extremely flexible way to use HighCharts from ruby code.\nTested on Ruby on Rails, Sinatra and Nanoc, but it should work with others too. Highcharts is not free for commercial use, so make sure you have a valid license to use Highcharts.\n\n\n[![Build Status](https://travis-ci.org/michelson/lazy_high_charts.png?branch=master)](http://travis-ci.org/michelson/lazy_high_charts)\n[![Code Climate](https://codeclimate.com/github/michelson/lazy_high_charts.png)](https://codeclimate.com/github/michelson/lazy_high_charts)\n\n[VERSION](https://github.com/michelson/lazy_high_charts/blob/master/GEM_VERSION)\n[ChangeLog](https://github.com/michelson/lazy_high_charts/blob/master/CHANGELOG.md)\n\n## Information\n\n* RDoc documentation [available on RubyDoc.info](http://rubydoc.info/gems/lazy_high_charts/frames)\n* Source code [available on GitHub](http://github.com/michelson/lazy_high_charts)\n* More information, known limitations, and how-tos [available on the wiki](https://github.com/michelson/lazy_high_charts/wiki)\n\n## Getting Help\n\n* Please report bugs on the [issue tracker](http://github.com/michelson/lazy_high_charts/issues) but read the \"getting help\" section in the wiki first.\n\n## Installation\n\n### Installation with rubygems\n\nTo install it, you just need to add it to your Gemfile:\n\n```ruby\ngem 'lazy_high_charts'\n```\nedge version on trial\n```ruby\ngem 'lazy_high_charts' --pre\n```\n\nthen run\n\n```bash\nbundle install\n```\n\nand make sure to get the latest version (unless you'd like an older version for some reason)\n```bash\nrake highcharts:update\n```\n\nand add this in the application.js\n\n```js\n//= require jquery\n//= require jquery_ujs\n//= require_tree .\n//= require turbolinks\n\n//= require highcharts/highcharts\n//= require highcharts/highcharts-more\n//= require highcharts/highstock\n```\n\nto install it.\n\n## Usage:\n\n### Controller code:\n```ruby\n@chart = LazyHighCharts::HighChart.new('graph') do |f|\n  f.title(text: \"Population vs GDP For 5 Big Countries [2009]\")\n  f.xAxis(categories: [\"United States\", \"Japan\", \"China\", \"Germany\", \"France\"])\n  f.series(name: \"GDP in Billions\", yAxis: 0, data: [14119, 5068, 4985, 3339, 2656])\n  f.series(name: \"Population in Millions\", yAxis: 1, data: [310, 127, 1340, 81, 65])\n\n  f.yAxis [\n    {title: {text: \"GDP in Billions\", margin: 70} },\n    {title: {text: \"Population in Millions\"}, opposite: true},\n  ]\n\n  f.legend(align: 'right', verticalAlign: 'top', y: 75, x: -50, layout: 'vertical')\n  f.chart({defaultSeriesType: \"column\"})\nend\n\n@chart_globals = LazyHighCharts::HighChartGlobals.new do |f|\n  f.global(useUTC: false)\n  f.chart(\n    backgroundColor: {\n      linearGradient: [0, 0, 500, 500],\n      stops: [\n        [0, \"rgb(255, 255, 255)\"],\n        [1, \"rgb(240, 240, 255)\"]\n      ]\n    },\n    borderWidth: 2,\n    plotBackgroundColor: \"rgba(255, 255, 255, .9)\",\n    plotShadow: true,\n    plotBorderWidth: 1\n  )\n  f.lang(thousandsSep: \",\")\n  f.colors([\"#90ed7d\", \"#f7a35c\", \"#8085e9\", \"#f15c80\", \"#e4d354\"])\nend\n```\n\n### View Helpers:\n```ruby\n\u003c%= high_chart_globals(@chart_globals) %\u003e\n\u003c%= high_chart(\"some_id\", @chart) %\u003e\n```\n\n`high_chart_globals` is optional. Use it to set the global options of all charts that are currently displayed on the page. More info [here](http://api.highcharts.com/highcharts#global).\n\n### No Data\n\nWhen your series has no data and you want to display a message using Highcharts' noData feature ([Highcarts doc](http://api.highcharts.com/highcharts/noData)) you have to include the `no-data-to-display.js` file like so:\n\n````\n//= require highcharts/highcharts\n//= require highcharts/highcharts-more\n//= require highcharts/modules/no-data-to-display\n````\n\nYou can then set the actual message that is displayed like so:\n\n````\n    @chart = LazyHighCharts::HighChart.new('graph') do |f|\n      f.options[:lang] = { noData: \"My beautiful noData message\" }\n      f.title(text: nil)\n      f.series([])\n    end\n````\n\n\n### Demo projects:\n\n[Nanoc App](spec/dummy_nanoc)\n\n[Rails App](spec/dummy_rails)\n\n[Sinatra App](spec/dummy_sinatra)\n\n\n### Update to latest js library. Additional command line\n\n  To update to the current highcharts.js directly from http://code.highcharts.com/\",  you can always run \n\n    rake highcharts:update\n\n  And HC will be copied to your vendor/assets directory on your app\n\n### Deprecation notice: \n\nIf you use rails 2.3.x or 3.0.x or 3.1.x, please use versions less than 1.3.3.\n\n## Contributing\n\nWe're open to any contribution. It has to be tested properly though.\n\n* [Fork](http://help.github.com/forking/) the project\n* Do your changes and commit them to your repository\n* Test your changes. We won't accept any untested contributions (except if they're not testable).\n* Create an [issue](https://github.com/michelson/lazy_high_charts/issues) with a link to your commits.\n\nThanks for all [contributors](https://github.com/michelson/lazy_high_charts/contributors)\n\n## Maintainers\n* Deshi Xiao [github/xiaods](https://github.com/xiaods)\n* Miguel Michelson [github/michelson](https://github.com/michelson)\n\n## License\n* Copyright (c) 2008-2014 [MIT LICENSE](MIT-LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmichelson%2Flazy_high_charts","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmichelson%2Flazy_high_charts","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmichelson%2Flazy_high_charts/lists"}