{"id":20699540,"url":"https://github.com/wealthbar/angular-d3","last_synced_at":"2026-03-06T20:31:52.094Z","repository":{"id":8515388,"uuid":"10128538","full_name":"WealthBar/angular-d3","owner":"WealthBar","description":"AngularJS directives for declaratively using D3","archived":false,"fork":false,"pushed_at":"2016-04-30T17:59:12.000Z","size":15187,"stargazers_count":156,"open_issues_count":4,"forks_count":39,"subscribers_count":28,"default_branch":"master","last_synced_at":"2025-07-23T08:04:31.368Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://wealthbar.github.io/angular-d3/","language":"CoffeeScript","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/WealthBar.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"MIT-LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-05-17T17:31:21.000Z","updated_at":"2025-02-14T15:51:17.000Z","dependencies_parsed_at":"2022-08-30T16:11:02.755Z","dependency_job_id":null,"html_url":"https://github.com/WealthBar/angular-d3","commit_stats":null,"previous_names":[],"tags_count":36,"template":false,"template_full_name":null,"purl":"pkg:github/WealthBar/angular-d3","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WealthBar%2Fangular-d3","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WealthBar%2Fangular-d3/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WealthBar%2Fangular-d3/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WealthBar%2Fangular-d3/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/WealthBar","download_url":"https://codeload.github.com/WealthBar/angular-d3/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WealthBar%2Fangular-d3/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266640830,"owners_count":23960809,"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-07-23T02:00:09.312Z","response_time":66,"last_error":null,"robots_txt_status":null,"robots_txt_updated_at":null,"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-11-17T00:30:43.240Z","updated_at":"2026-03-06T20:31:52.060Z","avatar_url":"https://github.com/WealthBar.png","language":"CoffeeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# AngularJS-D3 Module\n\nA set of AngularJS directives that provides a declarative syntax for building\ncommon charts using D3.\n\n## Installing\n\nAngularD3 is available via Bower as `angularD3`\n\n```\nbower install angularD3\n```\n\nAngularD3 is available via NPM as `angular_d3`\n\n```\nnpm install angular_d3\n```\n\n## Project Goals\n\nThis provides an AngularJS module called `ad3` which in turn provides a\ndeclarative HTML syntax for using D3 with AngularJS. The syntax has been\ninspired in part by [Radian](https://github.com/openbrainsrc/Radian) however\nat the time of starting this Radian was not available as an OSS project.\n\nThe goals of AngularD3 are:\n\n- Provide a simple declarative syntax for common D3 graphs and charts\n- An extensible core allowing for almost anything possible D3 to be expressed with a custom directive. You are able to both extend the existing chart visuals as well as create entirely new ones. One example might be adding special elements/labels that have their positions bound to data points based on the chart axes.\n- Designed the \"Angular Way (tm)\" using similar style to extensibility and directive communication used by Angular directives like form and input. AngularD3 provides a `d3Chart` directive which provides `d3ChartController` analagously to `ngFormController` \n- 100% stylable via CSS, with some added D3 'sugar' like allowing the use of the built in color scales with pie charts or being able to bind to a color scale from data.\n- The ability to create custom directives that can both extend existing chart layouts as well as create new ones.\n\nThe overall goal of this project is to create a basic set of D3\ndirectives that are sufficiently complete for flexible\ncharts of most common types. To start: Bar, Line, Area, Pie, Arc. Additional \nchart elements, can be added either to enhance existing chart types or to create \nnew ones simply by requiring `d3ChartController`.\n\nAngularD3 is designed to provide enough flexibility to allow you to extend it with\ncustom directives to do anything you could conceive of with D3 with no limitations, but \nstill provide a convenient set of default functionality. Creating most simple graphs \nshould be built in, while unlimited customization is still possible with relative ease.\n\nIf you have ideas and are interested in lending a hand, please open an issue,\nsubmit a pull request or just ping me\n[@chrismnicola](https://twitter.com/chrismnicola). This could be the beginning\nof beautiful friendship.\n\n## Current Directives\n\n- d3-chart - Provides the top level directives meant to contain the rest of the\n  chart declarations.\n- d3-data - Provides a declarative way to load data into the current scope\n  directly from a URL\n- d3-axis - Defines an axis and provide it's range and location (top, left,\n  bottom, right)\n- d3-area - Define an area graph\n- d3-line - Defines a line graph\n- d3-bars - Defines a set of bars for a bar chart\n- d3-gradient - Support for dynamically generating SVG gradients with data\n- d3-include - Supports including arbitrary SVG with the chart\n\nThe directives are meant to be used to compost charts like so:\n\n```html\n  \u003cd3-data src=\"data/data.csv\" data=\"line\" columns=\"year, savings, total, optimal\"\u003e\u003c/d3-data\u003e\n  \u003cd3-data src=\"data/donutData.csv\" data=\"pie\" columns=\"age,population\"\u003e\u003c/d3-data\u003e\n  \u003cdiv d3-chart data=\"line\" margin=\"{ top: 20, right: 30, bottom: 40, left: 20 }\"\u003e\n    \u003cd3-axis name=\"year\" label=\"Year\" extent=\"true\" orientation=\"bottom\" ticks=\"5\"\u003e\u003c/d3-axis\u003e\n    \u003cd3-axis name=\"savings\" label=\"Deposits\" orientation=\"left\" ticks=\"5\"\u003e\u003c/d3-axis\u003e\n    \u003cd3-axis name=\"total\" label=\"Savings\" orientation=\"right\" ticks=\"5\"\u003e\u003c/d3-axis\u003e\n    \u003cd3-line x=\"year\" y=\"optimal\" yscale=\"total\"\u003e\u003c/d3-line\u003e\n    \u003cd3-area x=\"year\" y=\"total\"\u003e\u003c/d3-area\u003e\n    \u003cd3-bars x=\"year\" y=\"savings\"\u003e\u003c/d3-bars\u003e\n  \u003c/div\u003e\n```\n\nThe `d3-chart` directive will first append `\u003csvg class=\"d3\"\u003e\u003cg\u003e\u003c/g\u003e\u003c/svg\u003e` to\nitself and then each inner directives will attach their own elements, using D3,\nfrom there. The `d3ChartController` provides access to its root `\u003cg\u003e\u003c/g\u003e` element via\n`getChart()` so that child directives can append themselves.\n\nThe `d3-data` directive provides a way of declaratively binding data, but this\nis entirely optional and it simply is a convenient way to bind a CSV data from\nany url directly to your current scope.\n\nDocumentation will be forthcoming as things develop but for now you will have\nto rely on a quick reading of the code.\n\n## Try it out\n\nThis project uses NPM and Webpack. To run it clone this repo and run:\n\n```\nnpm install\nnpm start\n```\n\n## Building\n\nYou can build a minified `angularD3.js` which will be saved in `/dist` by running\n\n    npm run-script build\n\nYou can also update the docs which will be saved in `/docs` by running\n\n    npm run-script docs\n\n## Feature Roadmap\n\n- [x] Basic chart forms for: Area, Line and Bars\n- [x] Supports multiple axis and multiple charts can be stacked\n- [x] Dynamically updating charts supporting animations (should be able to\ndisplay and track incoming time-series data)\n- [x] Data source directives to declaratively specify and load external data\nsources and support D3's built in parsers for CSV, TSV, etc.\n- [ ] Customizable chart legends\n- [ ] Customizable and flexible labels \n- [ ] Mouse and touch overlay support\n- [ ] Scatter and Bubble plots\n- [ ] Bullet charts\n- [x] Stacked area charts\n\nIf you have any other ideas for me, or feel like contributing to help add any\nof this missing functionality, I encourage you to submit a pull request.\n\n## License\n\nAngular-D3 is free software under the [MIT licence](http://opensource.org/licenses/MIT) and may be redistributed under the terms specified in the MIT-LICENSE file.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwealthbar%2Fangular-d3","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwealthbar%2Fangular-d3","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwealthbar%2Fangular-d3/lists"}