{"id":18865194,"url":"https://github.com/sndnv/asciichart","last_synced_at":"2025-04-14T13:22:08.470Z","repository":{"id":57479007,"uuid":"144292722","full_name":"sndnv/asciichart","owner":"sndnv","description":"ASCII terminal line charts with no dependencies","archived":false,"fork":false,"pushed_at":"2024-01-06T09:05:27.000Z","size":29,"stargazers_count":21,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-23T02:04:48.260Z","etag":null,"topics":["ascii","ascii-chart","chart","charting","charting-library","elixir","elixir-lang","plot","terminal"],"latest_commit_sha":null,"homepage":"","language":"Elixir","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sndnv.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2018-08-10T13:57:12.000Z","updated_at":"2025-02-12T22:15:57.000Z","dependencies_parsed_at":"2023-12-16T09:46:09.305Z","dependency_job_id":"76c4df41-1c57-41c8-8a16-98ad84d69ecb","html_url":"https://github.com/sndnv/asciichart","commit_stats":{"total_commits":4,"total_committers":2,"mean_commits":2.0,"dds":0.5,"last_synced_commit":"831843a8a1c690c7e0d8252bbead2be099918b0d"},"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sndnv%2Fasciichart","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sndnv%2Fasciichart/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sndnv%2Fasciichart/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sndnv%2Fasciichart/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sndnv","download_url":"https://codeload.github.com/sndnv/asciichart/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248886420,"owners_count":21177664,"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":["ascii","ascii-chart","chart","charting","charting-library","elixir","elixir-lang","plot","terminal"],"created_at":"2024-11-08T04:46:16.993Z","updated_at":"2025-04-14T13:22:08.443Z","avatar_url":"https://github.com/sndnv.png","language":"Elixir","funding_links":[],"categories":[],"sub_categories":[],"readme":"# asciichart\n\n[![Hex version badge](https://img.shields.io/hexpm/v/asciichart.svg)](https://hex.pm/packages/asciichart) [![codecov](https://codecov.io/gh/sndnv/asciichart/graph/badge.svg?token=EVAYGZRRZB)](https://codecov.io/gh/sndnv/asciichart) [![license](https://img.shields.io/github/license/sndnv/asciichart.svg)]()\n\nTerminal ASCII line charts in Elixir with no dependencies.\n\n\u003cimg width=\"789\" alt=\"Terminal ASCII line charts in Elixir\" src=\"https://cloud.githubusercontent.com/assets/1294454/22818709/9f14e1c2-ef7f-11e6-978f-34b5b595fb63.png\"\u003e\n\nPorted to Elixir from [kroitor/asciichart](https://github.com/kroitor/asciichart)\n\n## Install\n\nAdd `asciichart` to the list of dependencies in `mix.exs`:\n\n```elixir\ndef deps do\n  [{:asciichart, \"~\u003e \u003cversion\u003e\"}]\nend\n```\n\n## Usage\n\n```elixir\n{:ok, chart} = Asciichart.plot([1, 2, 3, 3, 2, 1])\nchart |\u003e IO.puts()\n\n# should render as\n\n3.00 ┤ ╭─╮\n2.00 ┤╭╯ ╰╮\n1.00 ┼╯   ╰\n```\n\n## Options\nOne or more of the following settings can be provided:\n- `offset` - number of characters to set as the chart's (left) offset\n- `height` - adjusts the height of the chart\n- `padding` - one or more characters to use for the label's (left) padding\n- `charset` - a customizable character set. See `Asciichart.Charset`.\n- `precision` - number of fractional digits to keep for floating-point values\n\n```elixir\n{:ok, chart} = Asciichart.plot([1, 2, 5, 5, 4, 3, 2, 100, 0], height: 3, offset: 10, padding: \"__\")\nchart |\u003e IO.puts()\n\n# should render as\n\n       ╭─\u003e label\n    ------\n    100.00    ┼      ╭╮\n    _50.00    ┤      ││\n    __0.00    ┼──────╯╰\n    --\n---- ╰─\u003e label padding\n ╰─\u003e remaining offset (without the label)\n\n# Rendering of empty charts is not supported\n\nAsciichart.plot([])\n{:error, \"No data\"}\n```\nIf you want to change the character set, you can use a predefined one in `Asciichart.Charset` or create your own.\n```elixir\n{:ok, chart} = Asciichart.plot([1, 2, 5, 5, 4, 3, 2, 0], height: 5, charset: Asciichart.Charset.single_char(\"*\"))\nchart |\u003e IO.puts()\n\n5.00 ┤ ***\n3.75 ┤ * **\n2.50 ┤ *  **\n1.25 ┤**   **\n0.00 **     *\n```\n\n## Versioning\nWe use [SemVer](http://semver.org/) for versioning.\n\n## License\nThis project is licensed under the Apache License, Version 2.0 - see the [LICENSE](LICENSE) file for details\n\n\u003e Copyright 2018 https://github.com/sndnv\n\u003e\n\u003e Licensed under the Apache License, Version 2.0 (the \"License\");\n\u003e you may not use this file except in compliance with the License.\n\u003e You may obtain a copy of the License at\n\u003e\n\u003e http://www.apache.org/licenses/LICENSE-2.0\n\u003e\n\u003e Unless required by applicable law or agreed to in writing, software\n\u003e distributed under the License is distributed on an \"AS IS\" BASIS,\n\u003e WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n\u003e See the License for the specific language governing permissions and\n\u003e limitations under the License.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsndnv%2Fasciichart","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsndnv%2Fasciichart","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsndnv%2Fasciichart/lists"}