{"id":13784230,"url":"https://github.com/derbyjs/d-d3-barchart","last_synced_at":"2025-10-31T13:30:42.875Z","repository":{"id":15760371,"uuid":"18499185","full_name":"derbyjs/d-d3-barchart","owner":"derbyjs","description":"a barchart component for Derby demonstrating a common pattern with d3.js","archived":false,"fork":false,"pushed_at":"2016-01-12T06:32:59.000Z","size":3,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-10-02T09:46:21.415Z","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":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/derbyjs.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-04-06T20:59:26.000Z","updated_at":"2016-01-12T06:33:00.000Z","dependencies_parsed_at":"2022-07-22T22:49:46.660Z","dependency_job_id":null,"html_url":"https://github.com/derbyjs/d-d3-barchart","commit_stats":null,"previous_names":["codeparty/d-d3-barchart"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/derbyjs/d-d3-barchart","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/derbyjs%2Fd-d3-barchart","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/derbyjs%2Fd-d3-barchart/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/derbyjs%2Fd-d3-barchart/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/derbyjs%2Fd-d3-barchart/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/derbyjs","download_url":"https://codeload.github.com/derbyjs/d-d3-barchart/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/derbyjs%2Fd-d3-barchart/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":280664368,"owners_count":26369815,"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","status":"online","status_checked_at":"2025-10-23T02:00:06.710Z","response_time":142,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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-03T19:00:37.819Z","updated_at":"2025-10-23T17:42:58.651Z","avatar_url":"https://github.com/derbyjs.png","language":"JavaScript","funding_links":[],"categories":["Components"],"sub_categories":[],"readme":"d-d3-barchart\n==================\n\nExample d3 Bar chart Derby component.\nsee also:\n[d-barchart-vanilla](http://github.com/derbyjs/d-barchart-vanilla)\n[d-barchart](http://github.com/derbyjs/d-d3-barchart)\n\n# Usage\n[Example usage](http://github.com/derbyjs/derby-examples/tree/master/charts)\n\n## In your template\n```\n\u003cview name=\"d-barchart\" data={{_page.data}} width=300 height=200\u003e\u003c/view\u003e\n```\nsome optional arguments\n```\n\u003cview name=\"d-barchart\" data={{_page.data}} margins={{_page.margins}}\u003e\u003c/view\u003e\n```\n\n\n## Your data\n```\nmodel.set(\"_page.data\", [ { value: 1 }, { value: 10 } ]);\n```\n\nOptional data\n```\nmodel.set(\"_page.margins\", {top: 0, right: 20, bottom: 0, left: 20 });\n```\n\n## Implementation pattern\n\nWe let d3 handle the DOM manipulation to take advantage of its transition API. We also render the DOM elements with Derby in an __unbound__ template block so that the initial bar chart gets rendered on the server.\nd3's selection API finds the existing elements and binds it's data to them.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fderbyjs%2Fd-d3-barchart","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fderbyjs%2Fd-d3-barchart","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fderbyjs%2Fd-d3-barchart/lists"}