{"id":13702001,"url":"https://github.com/Makanz/chartjs-plugin-trendline","last_synced_at":"2025-05-05T04:30:39.764Z","repository":{"id":27065234,"uuid":"112182848","full_name":"Makanz/chartjs-plugin-trendline","owner":"Makanz","description":"This plugin draws an linear trendline in your Chart. Made for Chart.js \u003e 3.0","archived":false,"fork":false,"pushed_at":"2025-04-29T21:04:59.000Z","size":381,"stargazers_count":92,"open_issues_count":7,"forks_count":60,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-04-29T21:35:32.304Z","etag":null,"topics":["chartjs-plugin","trendline"],"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/Makanz.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":"2017-11-27T10:36:36.000Z","updated_at":"2025-04-29T20:43:46.000Z","dependencies_parsed_at":"2024-01-22T21:34:52.369Z","dependency_job_id":"74d2c5df-2ec8-4cc1-b439-748636c0fe98","html_url":"https://github.com/Makanz/chartjs-plugin-trendline","commit_stats":{"total_commits":63,"total_committers":23,"mean_commits":2.739130434782609,"dds":0.6190476190476191,"last_synced_commit":"65c826bed5fadc35eb0fe09b018b7a9c866ce631"},"previous_names":[],"tags_count":22,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Makanz%2Fchartjs-plugin-trendline","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Makanz%2Fchartjs-plugin-trendline/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Makanz%2Fchartjs-plugin-trendline/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Makanz%2Fchartjs-plugin-trendline/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Makanz","download_url":"https://codeload.github.com/Makanz/chartjs-plugin-trendline/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251589469,"owners_count":21613896,"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":["chartjs-plugin","trendline"],"created_at":"2024-08-02T21:00:29.423Z","updated_at":"2025-05-05T04:30:39.749Z","avatar_url":"https://github.com/Makanz.png","language":"JavaScript","readme":"# chartjs-plugin-trendline\n\nThis plugin draws an linear trendline in your Chart.\nIt has been tested with Chart.js version 4.4.4.\n\n## Installation\n\n#### Load directly in the browser\n\nLoad Chart.js first, then the plugin which will automatically register itself with Chart.js\n\n```html\n\u003cscript src=\"https://cdn.jsdelivr.net/npm/chart.js@4.4.4/dist/chart.min.js\"\u003e\u003c/script\u003e\n\u003cscript src=\"https://cdn.jsdelivr.net/npm/chartjs-plugin-trendline/dist/chartjs-plugin-trendline.min.js\"\u003e\u003c/script\u003e\n```\n\n#### As a Chart.JS plugin\n\nInstall \u0026 import the plugin via npm:\n\n`npm i chart.js chartjs-plugin-trendline`\n\n```js\nimport ChartJS from 'chart.js';\nimport chartTrendline from 'chartjs-plugin-trendline';\n\nChartJS.plugins.register(chartTrendline);\n```\n\n## Configuration\n\nTo configure the trendline plugin you simply add a new config options to your dataset in your chart config.\n\n```javascript\n{\n\ttrendlineLinear: {\n\t\tcolorMin: Color,\n\t\tcolorMax: Color,\n\t\tlineStyle: string, // \"dotted\" | \"solid\" | \"dashed\" | \"dashdot\"\n\t\twidth: number,\n\t\txAxisKey: string, // optional\n\t\tyAxisKey: string, // optional\n\t\tprojection: boolean, // optional\n\t\t// optional\n\t\tlabel: {\n\t\t\tcolor: Color,\n\t\t\ttext: string,\n\t\t\tdisplay: boolean,\n\t\t\tdisplayValue: boolean,\n\t\t\toffset: number,\n\t\t\tpercentage: boolean,\n\t\t\tfont: {\n\t\t\t\tfamily: string,\n\t\t\t\tsize: number,\n\t\t\t}\n\t\t},\n\t\t// optional\n\t\tlegend: {\n\t\t\ttext: string,\n\t\t\tstrokeStyle: Color,\n\t\t\tfillStyle: Color,\n\t\t\tlineCap: string,\n\t\t\tlineDash: number[],\n\t\t\tlineWidth: number,\n\t\t}\n\t}\n}\n```\n\n## Supported chart types\n\n-   bar\n-   line\n-   scatter\n\n## Contributing\n\nPull requests and issues are always welcome.\nFor bugs and feature requests, [please create an issue](https://github.com/Makanz/chartjs-plugin-trendline/issues).\n\n## License\n\nchartjs-plugin-trendline.js is available under the [MIT license](http://opensource.org/licenses/MIT).\n\n## Star History\n\n[![Star History Chart](https://api.star-history.com/svg?repos=Makanz/chartjs-plugin-trendline\u0026type=Date)](https://star-history.com/#Makanz/chartjs-plugin-trendline\u0026Date)\n","funding_links":[],"categories":["Plugins"],"sub_categories":["Features"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FMakanz%2Fchartjs-plugin-trendline","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FMakanz%2Fchartjs-plugin-trendline","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FMakanz%2Fchartjs-plugin-trendline/lists"}