{"id":13626511,"url":"https://github.com/wwwtyro/candygraph","last_synced_at":"2026-02-01T16:38:17.552Z","repository":{"id":38377571,"uuid":"280770837","full_name":"wwwtyro/candygraph","owner":"wwwtyro","description":"Fast by default, flexible 2D plotting library.","archived":false,"fork":false,"pushed_at":"2024-03-19T21:43:27.000Z","size":1610,"stargazers_count":450,"open_issues_count":9,"forks_count":12,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-10-05T05:46:51.274Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/wwwtyro.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}},"created_at":"2020-07-19T01:37:25.000Z","updated_at":"2025-07-04T09:50:42.000Z","dependencies_parsed_at":"2024-04-23T08:06:42.656Z","dependency_job_id":null,"html_url":"https://github.com/wwwtyro/candygraph","commit_stats":{"total_commits":63,"total_committers":6,"mean_commits":10.5,"dds":0.1428571428571429,"last_synced_commit":"0f879abdfee3a33e13d2199fa6512fc52d6970f7"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/wwwtyro/candygraph","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wwwtyro%2Fcandygraph","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wwwtyro%2Fcandygraph/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wwwtyro%2Fcandygraph/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wwwtyro%2Fcandygraph/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wwwtyro","download_url":"https://codeload.github.com/wwwtyro/candygraph/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wwwtyro%2Fcandygraph/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28983077,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-01T16:29:42.054Z","status":"ssl_error","status_checked_at":"2026-02-01T16:29:41.428Z","response_time":56,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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-08-01T21:02:21.012Z","updated_at":"2026-02-01T16:38:17.534Z","avatar_url":"https://github.com/wwwtyro.png","language":"TypeScript","funding_links":[],"categories":["TypeScript"],"sub_categories":[],"readme":"\u003ch1 align=\"center\"\u003e\n  CandyGraph\n\u003c/h1\u003e\n\n\u003cdiv align=\"center\"\u003e\n  A flexible and fast-by-default 2D plotting library tuned for rendering huge datasets on the GPU at interactive speeds.\n\u003c/div\u003e\n\n\u003cdiv align=\"center\"\u003e\n  \u003ch3 align=\"center\"\u003e\n    \u003ca href=\"https://wwwtyro.github.io/candygraph/tutorial/dist/\"\u003eTutorial\u003c/a\u003e |\n    \u003ca href=\"https://wwwtyro.github.io/candygraph/examples/dist/\"\u003eExamples\u003c/a\u003e |\n    \u003ca href=\"https://wwwtyro.github.io/candygraph/api/\"\u003eAPI Docs\u003c/a\u003e\n  \u003c/h3\u003e\n\u003c/div\u003e\n\n- Adopts D3's elegant concept of scales, but implements them on the GPU to maximize data throughput and handle scale changes with no additional cost.\n- Performs all rendering on the GPU, even axes and text. This keeps rendering and compositing fast and simple - no need to overlay a canvas or svg over your plot.\n- Provides a small but growing set of highly optimized primitives that are tuned for handling huge datasets.\n- Provides a set of higher-level composite objects composed of primitives to simplify common rendering tasks.\n\n\u003e CandyGraph is still in [major version zero](https://semver.org/#spec-item-4); the API should be considered unstable.\n\n## Example\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"media/simple-plot.png\"\u003e\n\u003c/p\u003e\n\n```typescript\nimport CandyGraph, {\n  createDefaultFont,\n  LinearScale,\n  OpaqueLineStrip,\n  OrthoAxis,\n  CartesianCoordinateSystem,\n} from \"candygraph\";\n\nasync function main() {\n  const cg = new CandyGraph();\n  cg.canvas.width = cg.canvas.height = 384;\n\n  // Generate some x \u0026 y data.\n  const xs = [];\n  const ys = [];\n  for (let x = 0; x \u003c= 1; x += 0.001) {\n    xs.push(x);\n    ys.push(0.5 + 0.25 * Math.sin(x * 2 * Math.PI));\n  }\n\n  // Create a viewport. Units are in pixels.\n  const viewport = {\n    x: 0,\n    y: 0,\n    width: cg.canvas.width,\n    height: cg.canvas.height,\n  };\n\n  // Create a coordinate system from two linear scales. Note\n  // that we add 32 pixels of padding to the left and bottom\n  // of the viewport, and 16 pixels to the top and right.\n  const coords = new CartesianCoordinateSystem(\n    cg,\n    new LinearScale([0, 1], [32, viewport.width - 16]),\n    new LinearScale([0, 1], [32, viewport.height - 16])\n  );\n\n  // Load the default Lato font\n  const font = await createDefaultFont(cg);\n\n  // Clear the viewport.\n  cg.clear([1, 1, 1, 1]);\n\n  // Render the a line strip representing the x \u0026 y data, and axes.\n  cg.render(coords, viewport, [\n    new OpaqueLineStrip(cg, xs, ys, {\n      colors: [1, 0.5, 0.0],\n      widths: 3,\n    }),\n    new OrthoAxis(cg, coords, \"x\", font, {\n      labelSide: 1,\n      tickOffset: -2.5,\n      tickLength: 6,\n      tickStep: 0.2,\n      labelFormatter: (n) =\u003e n.toFixed(1),\n    }),\n    new OrthoAxis(cg, coords, \"y\", font, {\n      tickOffset: 2.5,\n      tickLength: 6,\n      tickStep: 0.2,\n      labelFormatter: (n) =\u003e n.toFixed(1),\n    }),\n  ]);\n\n  // Copy the plot to a new canvas and add it to the document.\n  document.body.appendChild(cg.copyTo(viewport));\n}\n\nmain();\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwwwtyro%2Fcandygraph","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwwwtyro%2Fcandygraph","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwwwtyro%2Fcandygraph/lists"}