{"id":19019244,"url":"https://github.com/exsper/lchart","last_synced_at":"2025-07-17T06:04:30.250Z","repository":{"id":143885382,"uuid":"309079899","full_name":"Exsper/lchart","owner":"Exsper","description":"Streamlined and efficient line-chart tool designed to draw line charts for large amounts of data.","archived":false,"fork":false,"pushed_at":"2020-12-27T08:16:06.000Z","size":232,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-07-10T15:45:04.509Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/Exsper.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":"2020-11-01T11:22:36.000Z","updated_at":"2020-12-27T08:16:09.000Z","dependencies_parsed_at":null,"dependency_job_id":"ce2a0fa1-f63e-4f14-b4ed-5260ee231c9e","html_url":"https://github.com/Exsper/lchart","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Exsper/lchart","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Exsper%2Flchart","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Exsper%2Flchart/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Exsper%2Flchart/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Exsper%2Flchart/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Exsper","download_url":"https://codeload.github.com/Exsper/lchart/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Exsper%2Flchart/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265571138,"owners_count":23790025,"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":[],"created_at":"2024-11-08T20:11:41.055Z","updated_at":"2025-07-17T06:04:30.222Z","avatar_url":"https://github.com/Exsper.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# lchart\n\n[![npm](https://img.shields.io/npm/v/lchart?style=flat-square)](https://www.npmjs.com/package/lchart)\n\nWARNING: Not compatible with versions below v0.1\n\nStreamlined and efficient line-chart tool designed to draw line charts for large amounts of data.\n\n## install\n```javascript\nnpm install lchart\n```\n\n## usage\n```javascript\nconst Chart = require(\"lchart\");\nconst yourData = [\n    {\n        name: \"line's name\",\n        points: [{x:Number, y:Number}, ...],\n        configs: {\n            lineColor: \"#E74C3C\",\n            pointFillColor: \"#C0392B\"\n        }\n    }\n, {...}, ...];\nconst configs = {Object}; // see ##configs\nconst chart = new Chart(yourData, configs);\nconst picUrl = chart.draw(); // base64 url like \"data:image/png;base64,#picdata#\"\n```\n\n## example\n### test1\ncode: [test1](/doc/test1.js)\n![test1](/doc/result1.png)\n\n### test2\ncode: [test2](/doc/test2.js)\n![test2](/doc/result2.png)\n\n### test3\ncode: [test2](/doc/test3.js)\n![test2](/doc/result3.png)\n\n### test4\ncode: [test2](/doc/test4.js)\n![test2](/doc/result4.png)\n\n## data\n```javascript\ndata = [\n    {\n        name: \"line's name\", // for multi line's legend\n        points: [{x:Number, y:Number}, ...],\n        configs: {\n            lineColor: \"#E74C3C\",\n            pointFillColor: \"#C0392B\"\n        }\n    }\n, {...}, ...]\n```\n\n## configs\n```javascript\nconfigs = { // All can be omitted\n    padding: {\n        left, right, up, down // Number, padding of the main data chart\n    },\n    size: {\n        width, height // Number, pic size\n    },\n    font, // String, exp: \"15px Georgia\"\n    color: {\n        background, title, titleX, titleY, coordinate, grid // String\n    },\n    label: {\n        title, titleX, titleY, // String\n        divideX, divideY // Number, max number of  coordinate marks\n    },\n    xDateMode, // Boolean, x-coordinate is date etc... divited evenly, point.x must be [1, 2, 3, ...] or [3, 5, 6, ...] etc...\n    xDateLabel // Array\u003cString\u003e, when xDateMode = true, show xDateLabel at x-coordinate instead of x value, length must contains all data's point.x\n               // for example:   line1 point.x [1, 2, 3, 4, 5]   line2 point.x [2, 4, 6, 7, 8]\n               // xDateLabel should be like [\"day1\", \"day2\", \"day3\", \"day4\", \"day5\", \"day6\", \"day7\", \"day8\"] contains 1-8\n               // the reason that I don't use Date() directly is x-coordinate can be other things like team numbers, seasons, years...\n\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fexsper%2Flchart","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fexsper%2Flchart","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fexsper%2Flchart/lists"}