{ "info": { "author": "Igor Kroitor", "author_email": "igor.kroitor@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Environment :: Console", "Intended Audience :: Developers", "Intended Audience :: Financial and Insurance Industry", "Intended Audience :: Information Technology", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: JavaScript", "Programming Language :: PHP", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Topic :: Office/Business :: Financial :: Investment", "Topic :: Software Development :: Build Tools" ], "description": "# asciichart\n\n[![npm](https://img.shields.io/npm/v/asciichart.svg)](https://npmjs.com/package/asciichart) [![Travis](https://travis-ci.org/kroitor/asciichart.svg?branch=master)](https://travis-ci.org/kroitor/asciichart) [![Coverage Status](https://coveralls.io/repos/github/kroitor/asciichart/badge.svg?branch=master)](https://coveralls.io/github/kroitor/asciichart?branch=master) [![license](https://img.shields.io/github/license/kroitor/asciichart.svg)]()\n\nConsole ASCII line charts in pure Javascript (for NodeJS and browsers) with no dependencies. This code is absolutely free for any usage, you just do whatever the fuck you want.\n\n\"Console\n\n## Usage\n\n### NodeJS\n\n```sh\nnpm install asciichart\n```\n\n```javascript\nvar asciichart = require ('asciichart')\nvar s0 = new Array (120)\nfor (var i = 0; i < s0.length; i++)\n s0[i] = 15 * Math.sin (i * ((Math.PI * 4) / s0.length))\nconsole.log (asciichart.plot (s0))\n```\n\n### Browsers\n\n```html\n\n\n \n \n \n asciichart\n \n \n \n \n \n\n```\n\n### Options\n\nThe width of the chart will always equal the length of data series. The height and range are determined automatically.\n\n```javascript\nvar s0 = new Array (120)\nfor (var i = 0; i < s0.length; i++)\n s0[i] = 15 * Math.sin (i * ((Math.PI * 4) / s0.length))\nconsole.log (asciichart.plot (s0))\n```\n\n\"Console\n\nThe output can be configured by passing a second parameter to the `plot (series, config)` function. The following options are supported:\n```javascript\nvar config = {\n\n offset: 3, // axis offset from the left (min 2)\n padding: ' ', // padding string for label formatting (can be overrided)\n height: 10, // any height you want\n\n // the label format function applies default padding\n format: function (x, i) { return (padding + x.toFixed (2)).slice (-padding.length) }\n}\n```\n\n### Scale To Desired Height\n\n\"Console\n\n```javascript\nvar s = []\nfor (var i = 0; i < 120; i++)\n s[i] = 15 * Math.cos (i * ((Math.PI * 8) / 120)) // values range from -15 to +15\nconsole.log (asciichart.plot (s, { height: 6 })) // this rescales the graph to \u00b13 lines\n```\n\n\"Console\n\n\n### Auto-range\n\n```javascript\nvar s2 = new Array (120)\ns2[0] = Math.round (Math.random () * 15)\nfor (i = 1; i < s2.length; i++)\n s2[i] = s2[i - 1] + Math.round (Math.random () * (Math.random () > 0.5 ? 2 : -2))\nconsole.log (asciichart.plot (s2))\n```\n\n\"Console\n\n### See Also\n\nA util by [madnight](https://github.com/madnight) for drawing Bitcoin/Ether/altcoin charts in command-line console: [bitcoin-chart-cli](https://github.com/madnight/bitcoin-chart-cli).\n\n![bitcoin-chart-cli](https://camo.githubusercontent.com/494806efd925c4cd56d8370c1d4e8b751812030a/68747470733a2f2f692e696d6775722e636f6d2f635474467879362e706e67)\n\n### Ports\n\nSpecial thx to all who helped port it to other languages, great stuff!\n\n- [Python port](https://pypi.org/project/asciichartpy) included!\n- Java: [ASCIIGraph](https://github.com/MitchTalmadge/ASCIIGraph),\u00a0ported by [MitchTalmadge](https://github.com/MitchTalmadge). If you're a Java-person, check it out!\n- Go: [asciigraph](https://github.com/guptarohit/asciigraph), ported by [guptarohit](https://github.com/guptarohit), Go people! )\n- Haskell: [asciichart](https://github.com/madnight/asciichart), ported by [madnight](https://github.com/madnight) to Haskell world!\n- Ruby: [ascii_chart](https://github.com/zhustec/ascii_chart), ported by [zhustec](https://github.com/zhustec)!\n- Elixir: [asciichart](https://github.com/sndnv/asciichart), ported by [sndv](https://github.com/sndnv)!\n- Perl: [App::AsciiChart](https://github.com/vti/app-asciichart), ported by [vti](https://github.com/vti)!\n- C: [plot](https://github.com/annacrombie/plot), ported by [annacrombie](https://github.com/annacrombie) with a ruby extension!\n\n### Future work (coming soon, hopefully)\n\n- multi-line colored charts in console!\n- levels and points on the graph!\n- even better value formatting and auto-scaling!\n\n![preview](https://user-images.githubusercontent.com/1294454/31798504-ca2af4cc-b53c-11e7-946c-620d744f6d16.gif)\n\n\n\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/kroitor/asciichart", "keywords": "asciichart,ascii,chart,charting,charts,console,terminal,draw,box-drawing,box drawing,drawing,stats,line,linear,plot,graph,ascii graphics,graphics,command line,commandline,bash,shell,sh,light", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "asciichartpy", "package_url": "https://pypi.org/project/asciichartpy/", "platform": "", "project_url": "https://pypi.org/project/asciichartpy/", "project_urls": { "Homepage": "https://github.com/kroitor/asciichart" }, "release_url": "https://pypi.org/project/asciichartpy/1.5.9/", "requires_dist": [ "setuptools", "flake8 ; extra == 'qa'" ], "requires_python": "", "summary": "Nice-looking lightweight console ASCII line charts \u256d\u2508\u256f with no dependencies", "version": "1.5.9" }, "last_serial": 5442916, "releases": { "1.5.1": [ { "comment_text": "", "digests": { "md5": "54c47c6f103e2c0773f6bc026a86cb6f", "sha256": "ad5969d24d55ad0b85d3b8d0a3f8956e2dc171d40f9d36dd3212feef017eca7b" }, "downloads": -1, "filename": "asciichartpy-1.5.1.tar.gz", "has_sig": false, "md5_digest": "54c47c6f103e2c0773f6bc026a86cb6f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5437, "upload_time": "2017-09-02T21:35:49", "url": "https://files.pythonhosted.org/packages/d6/2c/47926dc244dfcb039224fa31cefb0572c76d27e70945e06f6862c822ec56/asciichartpy-1.5.1.tar.gz" } ], "1.5.3": [ { "comment_text": "", "digests": { "md5": "5bbcc42b96877de37ff8da72cd7d71f3", "sha256": "7f7eabc69506c6f48189c362293fb9b30048932e5a192825a81e338173cd19e6" }, "downloads": -1, "filename": "asciichartpy-1.5.3-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "5bbcc42b96877de37ff8da72cd7d71f3", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 6404, "upload_time": "2017-12-10T03:28:15", "url": "https://files.pythonhosted.org/packages/b9/69/e2f4b672f17f017fb2385f05308a13ed61304af1dcad89dcb06d4a206d9a/asciichartpy-1.5.3-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "e952eb9ea510555a9b15808133fe1d3b", "sha256": "d5523db90876f3511a123d0b9387a56c6db286b0f7077454884012012df70272" }, "downloads": -1, "filename": "asciichartpy-1.5.3.tar.gz", "has_sig": false, "md5_digest": "e952eb9ea510555a9b15808133fe1d3b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5522, "upload_time": "2017-12-10T03:28:16", "url": "https://files.pythonhosted.org/packages/9f/03/1cfb5c96a871694ce43c8d6def39b3f80b4624c985b8a0795916c2bd84b2/asciichartpy-1.5.3.tar.gz" } ], "1.5.4": [ { "comment_text": "", "digests": { "md5": "8327567e5c69c78b1ba748194424543f", "sha256": "f5229ef176799a07c9444cc667230b3cdb615e651f989bd7f3d4259d207a3c5f" }, "downloads": -1, "filename": "asciichartpy-1.5.4.macosx-10.12-x86_64.tar.gz", "has_sig": false, "md5_digest": "8327567e5c69c78b1ba748194424543f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4297, "upload_time": "2017-12-10T03:35:43", "url": "https://files.pythonhosted.org/packages/9b/79/7a280795d4f9ad8732e62b97843aae33389ed7ace8283c29a5ce2d3bf339/asciichartpy-1.5.4.macosx-10.12-x86_64.tar.gz" } ], "1.5.5": [ { "comment_text": "", "digests": { "md5": "0e2de36456f8b6fe3fcb4793644dbcf3", "sha256": "4c48b5c522f0021b07d5976d1b1ce90625f7a44c0d15c134b8ecd82105b82d4c" }, "downloads": -1, "filename": "asciichartpy-1.5.5.macosx-10.12-x86_64.tar.gz", "has_sig": false, "md5_digest": "0e2de36456f8b6fe3fcb4793644dbcf3", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4298, "upload_time": "2017-12-10T03:37:49", "url": "https://files.pythonhosted.org/packages/86/b5/27ba53f5051ca8deb32c5e1224183838f5155fa19695fc96094aa51d50cf/asciichartpy-1.5.5.macosx-10.12-x86_64.tar.gz" } ], "1.5.7": [ { "comment_text": "", "digests": { "md5": "f764c04b8124da9836e695a5e9f3ef90", "sha256": "17a47204ce075f97d7286ece0e1a6ee32a78800bc3de76609432ae80eaa97a7c" }, "downloads": -1, "filename": "asciichartpy-1.5.7.tar.gz", "has_sig": false, "md5_digest": "f764c04b8124da9836e695a5e9f3ef90", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5522, "upload_time": "2017-12-10T03:39:32", "url": "https://files.pythonhosted.org/packages/97/f3/fb492368de390f248bc198495e7550c491142c5ee5075cce6f449fcc4b76/asciichartpy-1.5.7.tar.gz" } ], "1.5.9": [ { "comment_text": "", "digests": { "md5": "c48be6562da1ab686aca3443797cf21d", "sha256": "17fd76c48b1541136488fc5fda7b658188fe54bbdf4946821283710cf9996ea5" }, "downloads": -1, "filename": "asciichartpy-1.5.9-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "c48be6562da1ab686aca3443797cf21d", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 5381, "upload_time": "2019-06-24T22:41:05", "url": "https://files.pythonhosted.org/packages/27/b7/7b74600ed424aaea2b4a69f3574b86248669e4146b3d631d1d36dd1c57bf/asciichartpy-1.5.9-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "c3fadf02af33eb9dc6df34e2bb5f9e3e", "sha256": "06e256552aa4fae03b9a7a2fd2b1f69879fe256218c23704645ab6055dc9267d" }, "downloads": -1, "filename": "asciichartpy-1.5.9.tar.gz", "has_sig": false, "md5_digest": "c3fadf02af33eb9dc6df34e2bb5f9e3e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6330, "upload_time": "2019-06-24T22:41:07", "url": "https://files.pythonhosted.org/packages/d9/9e/0c1d1497343f538cad0c9b62bed8ed5da2bb78a127eb76c11e19c40a552b/asciichartpy-1.5.9.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "c48be6562da1ab686aca3443797cf21d", "sha256": "17fd76c48b1541136488fc5fda7b658188fe54bbdf4946821283710cf9996ea5" }, "downloads": -1, "filename": "asciichartpy-1.5.9-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "c48be6562da1ab686aca3443797cf21d", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 5381, "upload_time": "2019-06-24T22:41:05", "url": "https://files.pythonhosted.org/packages/27/b7/7b74600ed424aaea2b4a69f3574b86248669e4146b3d631d1d36dd1c57bf/asciichartpy-1.5.9-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "c3fadf02af33eb9dc6df34e2bb5f9e3e", "sha256": "06e256552aa4fae03b9a7a2fd2b1f69879fe256218c23704645ab6055dc9267d" }, "downloads": -1, "filename": "asciichartpy-1.5.9.tar.gz", "has_sig": false, "md5_digest": "c3fadf02af33eb9dc6df34e2bb5f9e3e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6330, "upload_time": "2019-06-24T22:41:07", "url": "https://files.pythonhosted.org/packages/d9/9e/0c1d1497343f538cad0c9b62bed8ed5da2bb78a127eb76c11e19c40a552b/asciichartpy-1.5.9.tar.gz" } ] }