{"id":24364424,"url":"https://github.com/kbychkov/dailychart","last_synced_at":"2025-04-10T12:04:01.325Z","repository":{"id":98722440,"uuid":"135674249","full_name":"kbychkov/dailychart","owner":"kbychkov","description":"Tiny SVG charting library to display stock sparklines","archived":false,"fork":false,"pushed_at":"2022-10-28T05:07:51.000Z","size":423,"stargazers_count":45,"open_issues_count":2,"forks_count":8,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-22T12:36:04.556Z","etag":null,"topics":["chart","graph","javascript","sparkline","stock","svg"],"latest_commit_sha":null,"homepage":"https://kbychkov.github.io/dailychart/","language":"JavaScript","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/kbychkov.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-06-01T06:01:07.000Z","updated_at":"2025-01-03T22:46:23.000Z","dependencies_parsed_at":"2023-06-02T19:00:46.477Z","dependency_job_id":null,"html_url":"https://github.com/kbychkov/dailychart","commit_stats":{"total_commits":88,"total_committers":4,"mean_commits":22.0,"dds":0.5,"last_synced_commit":"bd16d34414ebe2412e5244410292fe9d2354ecb5"},"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kbychkov%2Fdailychart","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kbychkov%2Fdailychart/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kbychkov%2Fdailychart/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kbychkov%2Fdailychart/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kbychkov","download_url":"https://codeload.github.com/kbychkov/dailychart/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248216101,"owners_count":21066627,"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","graph","javascript","sparkline","stock","svg"],"created_at":"2025-01-18T23:53:05.292Z","updated_at":"2025-04-10T12:04:01.302Z","avatar_url":"https://github.com/kbychkov.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Dailychart.js\n\n[![npm](https://img.shields.io/npm/v/dailychart.svg)](https://www.npmjs.com/package/dailychart)\n[![Travis (.org)](https://img.shields.io/travis/kbychkov/dailychart.svg)](https://travis-ci.org/kbychkov/dailychart)\n\nDailychart.js is a tiny standalone SVG charting library to display daily graph of a stock market security. Try the [demo](https://kbychkov.github.io/dailychart/).\n\n## Installation\n\nThe simplest way is to include the library file from CDN:\n\n```html\n\u003cscript src='https://unpkg.com/dailychart/dist/dailychart.min.js'\u003e\u003c/script\u003e\n```\n\nIt's also possible to install the package as a dependency from NPM\n\n```bash\nnpm install dailychart --save\n```\n\nthen include the library into your project:\n\n```js\nvar Dailychart = require('dailychart');\n```\n\n## Usage\n\nFirst, create a container for the chart and fill with data using attributes.\n\n- `data-dailychart-values` (required) - comma-separated values for the chart.\n- `data-dailychart-close` - the value splits the chart on two areas (positive, negative) with its own colors.\n- `data-dailychart-length` - the total number of data points. Used to scale the chart along the horizontal axis. If `data-dailychart-values` has fewer points the remaining space will be empty. On the other hand, if `data-dailychart-length` isn't defined the chart will fit the container.\n\n```html\n\u003cdiv id=\"chart\"\n     data-dailychart-values=\"12.94,13.0,12.98,13.02,13.0,13.0,12.95,12.85,13.04,13.13\"\n     data-dailychart-close=\"13.08\"\n     data-dailychart-length=\"78\"\u003e\n\u003c/div\u003e\n```\n\nOptionally apply CSS to the container.\n\n```css\n#chart {\n  width: 80px;\n  height: 30px;\n}\n```\n\nFinally, create the chart for the element.\n\n```js\nDailychart.create('#chart', { lineWidth: 2 });\n```\n\nThe first parameter can be a HTML element, a list of HTML elements or a CSS selector string.\n\n## Configuration\n\nThe second parameter of the constructor is an object that contains the number of options to control the appearance of the chart.\n\n- `width` - Chart width. If not set it equals to container's width.\n- `height` - Chart height. If not set it equals to container's height.\n- `lineWidth` - Line width of the graph (default: 1).\n- `colorPositive` - Color of the positive part of the graph (default: '#33AE45').\n- `colorNegative` - Color of the negative part of the graph (default: '#EB5757').\n- `fillPositive` - Fill color of the positive area (default: '').\n- `fillNegative` - Fill color of the negative area (default: '').\n- `closeWidth` - Width of the close line (default: 1).\n- `closeColor` - Color of the close line (default: '#e0e0e0').\n \n ## License\n\n Dailychart.js is available under the [MIT License](https://github.com/kbychkov/dailychart/blob/master/LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkbychkov%2Fdailychart","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkbychkov%2Fdailychart","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkbychkov%2Fdailychart/lists"}