{"id":20275597,"url":"https://github.com/michenriksen/chart","last_synced_at":"2025-08-03T20:38:35.175Z","repository":{"id":247235221,"uuid":"825336086","full_name":"michenriksen/chart","owner":"michenriksen","description":"Command-line tool for rendering bar charts that can be displayed directly in the terminal or in text-based files like Markdown.","archived":false,"fork":false,"pushed_at":"2024-07-07T15:43:18.000Z","size":194,"stargazers_count":18,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-10T19:32:05.220Z","etag":null,"topics":["charts","cli","data-visualization","golang"],"latest_commit_sha":null,"homepage":"","language":"Go","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/michenriksen.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"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,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-07-07T13:54:58.000Z","updated_at":"2024-10-30T10:09:18.000Z","dependencies_parsed_at":"2024-07-07T15:10:02.649Z","dependency_job_id":"4ec34950-0c3c-49c8-bf52-8525fc0707e1","html_url":"https://github.com/michenriksen/chart","commit_stats":null,"previous_names":["michenriksen/chart"],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/michenriksen%2Fchart","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/michenriksen%2Fchart/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/michenriksen%2Fchart/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/michenriksen%2Fchart/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/michenriksen","download_url":"https://codeload.github.com/michenriksen/chart/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248346610,"owners_count":21088486,"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":["charts","cli","data-visualization","golang"],"created_at":"2024-11-14T13:09:59.355Z","updated_at":"2025-04-11T05:24:13.423Z","avatar_url":"https://github.com/michenriksen.png","language":"Go","readme":"# chart\n\nA command-line tool for rendering bar charts that can be displayed directly in the terminal or in text-based files like\nMarkdown.\n\n## Usage\n\nBy default, `chart` accepts line-based data with a numeric value and label text separated by a space or common tabular\nsymbols. It also tolerates additional whitespace, empty lines, common punctuation, and currency symbols:\n\n```console\n$ cat examples/quarterly-stats.csv\n18.67,2021-Q1\n19.45,2021-Q2\n20.89,2021-Q3\n21.34,2021-Q4\n21.78,2022-Q1\n22.45,2022-Q2\n23.89,2022-Q3\n24.34,2022-Q4\n23.54,2023-Q1\n24.78,2023-Q2\n25.89,2023-Q3\n26.34,2023-Q4\n28.15,2024-Q1\n25.44,2023-Q2\n$ chart -i examples/quarterly-stats.csv\n2021-Q1 ▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇ 18.67\n2021-Q2 ▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇ 19.45\n2021-Q3 ▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇ 20.89\n2021-Q4 ▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇ 21.34\n2022-Q1 ▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇ 21.78\n2022-Q2 ▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇ 22.45\n2022-Q3 ▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇ 23.89\n2022-Q4 ▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇ 24.34\n2023-Q1 ▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇ 23.54\n2023-Q2 ▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇ 25.44\n2023-Q3 ▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇ 25.89\n2023-Q4 ▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇ 26.34\n2024-Q1 ▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇ 28.15\n```\n\nYou can also chart the occurrences of lines using the `-c/--count` flag:\n\n```console\n$ cat examples/count-occurrences.txt\nThree\nTwo\nFour\nFive\nFour\nOne\nThree\nThree\nFive\nTwo\nFive\nFour\nFive\nFour\nFive\n$ chart -i examples/count-occurrences.txt --count\nThree ▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇ 3\n  Two ▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇ 2\n Four ▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇ 4\n Five ▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇ 5\n  One ▇▇▇▇▇▇▇▇▇▇▇▇▇▇ 1\n```\n\n### Piping data\n\nPipes allow you to feed data to `chart`, making it easy to chart the output of other terminal commands. For example,\nif you have a file with newline-delimited JSON data from a source code security scanner, you can chart statistics on\nidentified CWEs. Process the data with `jq`, count the lines with `sort` and `uniq`, and pipe it into `chart` for\nvisualization:\n\n```console\n$ jq -r '.cwe' examples/sast-findings.jsonld | sort | uniq -c | chart\nCWE-200 ▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇ 2\n CWE-22 ▇▇▇▇▇▇▇▇▇▇ 1\n CWE-23 ▇▇▇▇▇▇▇▇▇▇ 1\nCWE-248 ▇▇▇▇▇▇▇▇▇▇ 1\nCWE-284 ▇▇▇▇▇▇▇▇▇▇ 1\nCWE-307 ▇▇▇▇▇▇▇▇▇▇ 1\nCWE-312 ▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇ 3\nCWE-327 ▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇ 3\nCWE-362 ▇▇▇▇▇▇▇▇▇▇ 1\nCWE-400 ▇▇▇▇▇▇▇▇▇▇ 1\nCWE-434 ▇▇▇▇▇▇▇▇▇▇ 1\nCWE-502 ▇▇▇▇▇▇▇▇▇▇ 1\nCWE-532 ▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇ 2\nCWE-601 ▇▇▇▇▇▇▇▇▇▇ 1\nCWE-611 ▇▇▇▇▇▇▇▇▇▇ 1\nCWE-676 ▇▇▇▇▇▇▇▇▇▇ 1\n CWE-78 ▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇ 6\n CWE-79 ▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇ 7\nCWE-798 ▇▇▇▇▇▇▇▇▇▇ 1\n CWE-89 ▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇ 7\nCWE-918 ▇▇▇▇▇▇▇▇▇▇ 1\n CWE-94 ▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇ 5\n```\n\n### Sorting and ordering\n\nBy default, the chart displays bars in the order of insertion. This is usually fine, but sorting the chart differently\ncan make the data easier to read and understand. Let's order the CWE chart by label:\n\n```console\n$ jq -r '.cwe' examples/sast-findings.jsonld | sort | uniq -c | chart --sort label\nCWE-200 ▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇ 2\n CWE-22 ▇▇▇▇▇▇▇▇▇▇ 1\n CWE-23 ▇▇▇▇▇▇▇▇▇▇ 1\nCWE-248 ▇▇▇▇▇▇▇▇▇▇ 1\nCWE-284 ▇▇▇▇▇▇▇▇▇▇ 1\nCWE-307 ▇▇▇▇▇▇▇▇▇▇ 1\nCWE-312 ▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇ 3\nCWE-327 ▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇ 3\nCWE-362 ▇▇▇▇▇▇▇▇▇▇ 1\nCWE-400 ▇▇▇▇▇▇▇▇▇▇ 1\nCWE-434 ▇▇▇▇▇▇▇▇▇▇ 1\nCWE-502 ▇▇▇▇▇▇▇▇▇▇ 1\nCWE-532 ▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇ 2\nCWE-601 ▇▇▇▇▇▇▇▇▇▇ 1\nCWE-611 ▇▇▇▇▇▇▇▇▇▇ 1\nCWE-676 ▇▇▇▇▇▇▇▇▇▇ 1\n CWE-78 ▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇ 6\n CWE-79 ▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇ 7\nCWE-798 ▇▇▇▇▇▇▇▇▇▇ 1\n CWE-89 ▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇ 7\nCWE-918 ▇▇▇▇▇▇▇▇▇▇ 1\n CWE-94 ▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇ 5\n```\n\nThe chart is now sorted alphabetically, but it's more natural for this data to be sorted by the numbers in the CWE\nidentifiers. By using `labelnum` as the sorting option, numeric characters are extracted from the labels and sorted as\nintegers:\n\n```console\n$ jq -r '.cwe' examples/sast-findings.jsonld | sort | uniq -c | chart --sort labelnum\n CWE-22 ▇▇▇▇▇▇▇▇▇▇ 1\n CWE-23 ▇▇▇▇▇▇▇▇▇▇ 1\n CWE-78 ▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇ 6\n CWE-79 ▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇ 7\n CWE-89 ▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇ 7\n CWE-94 ▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇ 5\nCWE-200 ▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇ 2\nCWE-248 ▇▇▇▇▇▇▇▇▇▇ 1\nCWE-284 ▇▇▇▇▇▇▇▇▇▇ 1\nCWE-307 ▇▇▇▇▇▇▇▇▇▇ 1\nCWE-312 ▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇ 3\nCWE-327 ▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇ 3\nCWE-362 ▇▇▇▇▇▇▇▇▇▇ 1\nCWE-400 ▇▇▇▇▇▇▇▇▇▇ 1\nCWE-434 ▇▇▇▇▇▇▇▇▇▇ 1\nCWE-502 ▇▇▇▇▇▇▇▇▇▇ 1\nCWE-532 ▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇ 2\nCWE-601 ▇▇▇▇▇▇▇▇▇▇ 1\nCWE-611 ▇▇▇▇▇▇▇▇▇▇ 1\nCWE-676 ▇▇▇▇▇▇▇▇▇▇ 1\nCWE-798 ▇▇▇▇▇▇▇▇▇▇ 1\nCWE-918 ▇▇▇▇▇▇▇▇▇▇ 1\n```\n\nYou can also sort the chart by value and specify the order. Let's sort by value in descending order to easily identify\nthe most and least common weaknesses:\n\n```console\n$ jq -r '.cwe' examples/sast-findings.jsonld | sort | uniq -c | chart --sort value --desc\n CWE-89 ▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇ 7\n CWE-79 ▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇ 7\n CWE-78 ▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇ 6\n CWE-94 ▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇ 5\nCWE-327 ▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇ 3\nCWE-312 ▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇ 3\nCWE-532 ▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇ 2\nCWE-200 ▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇ 2\nCWE-918 ▇▇▇▇▇▇▇▇▇▇ 1\nCWE-798 ▇▇▇▇▇▇▇▇▇▇ 1\nCWE-676 ▇▇▇▇▇▇▇▇▇▇ 1\nCWE-611 ▇▇▇▇▇▇▇▇▇▇ 1\nCWE-601 ▇▇▇▇▇▇▇▇▇▇ 1\nCWE-502 ▇▇▇▇▇▇▇▇▇▇ 1\nCWE-434 ▇▇▇▇▇▇▇▇▇▇ 1\nCWE-400 ▇▇▇▇▇▇▇▇▇▇ 1\nCWE-362 ▇▇▇▇▇▇▇▇▇▇ 1\nCWE-307 ▇▇▇▇▇▇▇▇▇▇ 1\nCWE-284 ▇▇▇▇▇▇▇▇▇▇ 1\nCWE-248 ▇▇▇▇▇▇▇▇▇▇ 1\n CWE-23 ▇▇▇▇▇▇▇▇▇▇ 1\n CWE-22 ▇▇▇▇▇▇▇▇▇▇ 1\n```\n\n### Scaling\n\nSometimes, smaller values are overshadowed by larger values in the distribution:\n\n```console\n$ cat examples/statistics.txt\n1.2    Sales leads\n3.8    Conversion rate\n12.6   Monthly subs\n34.9   Quarterly revenue\n79.4   Client meetings\n158.2  Product launches\n367.1  Employees\n952.5  Support calls\n2764.8 Website traffic\n7360.4 Marketing budget\n$ chart -i examples/statistics.txt\n      Sales leads ▏ 1.2\n  Conversion rate ▏ 3.8\n     Monthly subs ▏ 12.6\nQuarterly revenue ▏ 34.9\n  Client meetings ▇ 79.4\n Product launches ▇ 158.2\n        Employees ▇▇▇ 367.1\n    Support calls ▇▇▇▇▇▇▇ 952.5\n  Website traffic ▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇ 2764.8\n Marketing budget ▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇ 7360.4\n```\n\nUsing the `--scale` flag scales the chart logarithmically, improving readability in these situations:\n\n```console\n$ chart -i examples/statistics.txt --scale\n      Sales leads ▇▇▇▇▇ 1.2\n  Conversion rate ▇▇▇▇▇▇▇▇▇▇ 3.8\n     Monthly subs ▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇ 12.6\nQuarterly revenue ▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇ 34.9\n  Client meetings ▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇ 79.4\n Product launches ▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇ 158.2\n        Employees ▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇ 367.1\n    Support calls ▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇ 952.5\n  Website traffic ▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇ 2764.8\n Marketing budget ▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇ 7360.4\n```\n\n### Output formats\n\nIn addition to text-based charts, `chart` can generate Mermaid XY charts using the `--mermaid` flag:\n\n```console\n$ chart -i examples/count-occurrences.txt --count --sort value --mermaid --title 'Occurrences'\nxychart-beta\n  title \"Occurrences\"\n  x-axis [\"One\", \"Two\", \"Three\", \"Four\", \"Five\"]\n  bar [1, 2, 3, 4, 5]\n```\n\nSee the [rendered chart here](https://mermaid.live/edit#pako:eNo9j70OwjAMhF_F8hwG_pbOiA0xwATpYBJDI2hSuQm0Qrw7KRS2891n2fdEEyxjgV1vKpI4OXEk7QGiizcGjVtjkgh7w63GIegm1LkWjjnyrFFlZv8Io6iER28dkozK3bNXDrsnEjhOFcwUzBUsFCxLVFiz1ORsfuI5QBpjxXVeKbK0JNfh7itzlGLY9d5gcaZbywolpEv1n1JjKfLK0UWo_rtsXQyy-Zb8dFXYkD-E8GNebwNZU54).\n\nIt can also generate a basic configuration for a Chart.js bar chart using the `--chartjs` flag:\n\n```console\n$ chart -i examples/count-occurrences.txt --count --sort value --chartjs --title 'Occurrences'\n// Chart.js configuration (https://www.chartjs.org/docs/latest/configuration/).\n// Generated by chart (https://github.com/michenriksen/chart).\nconst config = {\n  type: \"bar\",\n  data: {\n    datasets: [{\n      data: [1,2,3,4,5],\n    }],\n    labels: [\"One\",\"Two\",\"Three\",\"Four\",\"Five\"],\n  },\n  options: {\n    plugins: {\n      title: {\n        display: true,\n        text: \"Occurrences\"\n      }\n    }\n  }\n}\n```\n\n### Additional options\n\nSee `chart --help` for additional flags and options.\n\n## Installation\n\nDownload the latest pre-compiled binary for your operating system from the [releases page].\n\nIf you have Go installed, you can also install the latest binary with:\n\n```bash\ngo install github.com/michenriksen/chart/cmd/chart@latest\n```\n\n## Similar tools\n\n- [termgraph]: A more powerful CLI tool, and the inspiration for `chart`, supporting multiple data sets, colors, and\nheat maps.\n- [spark]: Another CLI tool for rendering simple sparklines in the terminal.\n\n[CWEs]: https://cwe.mitre.org/\n[jq]: https://jqlang.github.io/jq/\n[sort]: https://man7.org/linux/man-pages/man1/sort.1.html\n[uniq]: https://www.man7.org/linux/man-pages/man1/uniq.1.html\n[Mermaid]: https://mermaid.live/\n[Chart.js]: https://www.chartjs.org/\n[releases page]: https://github.com/michenriksen/chart/releases\n[termgraph]: https://github.com/mkaz/termgraph\n[spark]: https://github.com/holman/spark\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmichenriksen%2Fchart","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmichenriksen%2Fchart","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmichenriksen%2Fchart/lists"}