{"id":14990479,"url":"https://github.com/nextbitlabs/trend-line","last_synced_at":"2026-01-05T03:41:45.859Z","repository":{"id":57130476,"uuid":"387416960","full_name":"nextbitlabs/trend-line","owner":"nextbitlabs","description":"Web-component implementation of a trendline.","archived":false,"fork":false,"pushed_at":"2021-07-30T14:51:21.000Z","size":1480,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-02-27T04:50:12.334Z","etag":null,"topics":["arrow","chart","trendline","webcomponents"],"latest_commit_sha":null,"homepage":"","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/nextbitlabs.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}},"created_at":"2021-07-19T09:56:22.000Z","updated_at":"2021-07-30T14:51:24.000Z","dependencies_parsed_at":"2022-09-01T02:51:43.509Z","dependency_job_id":null,"html_url":"https://github.com/nextbitlabs/trend-line","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nextbitlabs%2Ftrend-line","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nextbitlabs%2Ftrend-line/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nextbitlabs%2Ftrend-line/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nextbitlabs%2Ftrend-line/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nextbitlabs","download_url":"https://codeload.github.com/nextbitlabs/trend-line/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244888343,"owners_count":20526781,"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":["arrow","chart","trendline","webcomponents"],"created_at":"2024-09-24T14:20:12.197Z","updated_at":"2026-01-05T03:41:45.832Z","avatar_url":"https://github.com/nextbitlabs.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# \u0026lt;trend-line\u0026gt;\n\n![Latest Release](https://badgen.net/github/release/nextbitlabs/trend-line) [![Published on webcomponents.org](https://img.shields.io/badge/webcomponents.org-published-blue.svg)](https://www.webcomponents.org/element/trend-line)\n\nWeb component implementation of a trend-line.\n\n\u003cimg width=\"100px\" src=\"image.png\"\u003e\n\n## Usage\n\nImport `trend-line` and set CSS custom properties:\n\n```html\n\u003chead\u003e\n  \u003cscript type=\"module\"\u003e\n    import \"https://cdn.skypack.dev/@nextbitlabs/trend-line\";\n  \u003c/script\u003e\n  \u003cstyle\u003e\n    /*\n      CSS custom properties penetrate the Shadow DOM.\n      They are useful to provide custom styling.\n    */\n    trend-line {\n      --color: #333; /* default black */\n      --stroke-width: 2px; /* default 2px */\n      --background: #eee; /* default transparent */\n    }\n  \u003c/style\u003e\n\u003c/head\u003e\n```\n\nUse the custom element:\n\n```html\n\u003cbody\u003e\n  \u003ctrend-line\n    x-interval=\"[0, 10]\"\n    y-interval=\"[0, 1]\"\n    width=\"100\"\n    height=\"100\"\n    margin=\"20\"\n  \u003e\u003c/trend-line\u003e\n\u003c/body\u003e\n```\n\nSet the data to plot:\n\n```html\n\u003cscript\u003e\n  const element = document.querySelector(\"trend-line\");\n  element.data = [[1, 3], [2, 5], [3, 2]];\n\u003c/script\u003e\n```\n\nPlease have a look at the [demo](https://github.com/nextbitlabs/trend-line/blob/main/demo/index.html) in the repo, or the live [demo](https://pp41i.csb.app/).\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnextbitlabs%2Ftrend-line","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnextbitlabs%2Ftrend-line","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnextbitlabs%2Ftrend-line/lists"}