{"id":19084231,"url":"https://github.com/d3-node/d3node-barchart","last_synced_at":"2025-07-15T10:36:08.131Z","repository":{"id":18604167,"uuid":"84699962","full_name":"d3-node/d3node-barchart","owner":"d3-node","description":"BarChart module using D3-Node","archived":false,"fork":false,"pushed_at":"2022-12-08T19:06:22.000Z","size":191,"stargazers_count":18,"open_issues_count":5,"forks_count":15,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-07-02T11:20:25.161Z","etag":null,"topics":["barchart","d3","d3-node","visualization"],"latest_commit_sha":null,"homepage":"","language":"HTML","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/d3-node.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}},"created_at":"2017-03-12T04:33:19.000Z","updated_at":"2022-04-01T19:14:46.000Z","dependencies_parsed_at":"2023-01-11T19:55:01.190Z","dependency_job_id":null,"html_url":"https://github.com/d3-node/d3node-barchart","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/d3-node/d3node-barchart","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/d3-node%2Fd3node-barchart","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/d3-node%2Fd3node-barchart/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/d3-node%2Fd3node-barchart/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/d3-node%2Fd3node-barchart/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/d3-node","download_url":"https://codeload.github.com/d3-node/d3node-barchart/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/d3-node%2Fd3node-barchart/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265429046,"owners_count":23763677,"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":["barchart","d3","d3-node","visualization"],"created_at":"2024-11-09T02:50:31.257Z","updated_at":"2025-07-15T10:36:08.071Z","avatar_url":"https://github.com/d3-node.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"## BarChart\n\nBarChart generator in node.js.\n\n## Install\n\n```bash\nnpm install d3node-barchart\n```\n\n## Usage\n\n```js\nconst d3nBar = require('d3node-barchart');\nconst bar = d3nBar({ data, selector, container, style })\n```\n\nCheck out the [example](./example) for usage.\n\n##### Output the visualization result to a image\n\n```\nnpm start\n```\n\n## Output Preview (png):\n\n![chart](./example/output.png)\n\n\n## API\n\n### d3nBar({data[, selector, container, style]})\n\n#### data\n\n- Type: `Array`\n\nData from file or web processed by d3 library.\n\n#### selector\n\n- Type: `String`\n- Default: `'#chart'`\n\nDOM selector in container.\n\n#### container\n\n- Type: `String`\n- Default: `\u003cdiv id=\"container\"\u003e\u003ch2\u003eBar Chart\u003c/h2\u003e\u003cdiv id=\"chart\"\u003e\u003c/div\u003e\u003c/div\u003e`\n\nDOM contain the visualization result.\n\n#### style\n\n- Type: `String`\u003cbr\u003e\n- Default:\n```html\n.bar{fill: steelblue;}\n.bar:hover{fill: brown;}\n.axis{font: 10px sans-serif;}\n.axis path,.axis line{fill: none;stroke: #000;shape-rendering: crispEdges;}\n.x.axis path{display: none;}\n```\n\n##### width\n\n- Type: `Number`\n- Default: `960`\n\n##### height\n\n- Type: `Number`\n- Default: `500`\n\n##### margin\n\n- Type: `Object`\n- Default without labels: `{ top: 20, right: 20, bottom: 30, left: 40 }`\n- Default with labels: `{ top: 20, right: 20, bottom: 40, left: 50 }`\n\n##### barColor\n\n- Type: `String`\n- Default: `steelblue`\n\n##### barHoverColor\n\n- Type: `String`\n- Default: `brown`\n\n##### labels\n\n- Type: `Object`\n- Default: `{ xAxis: '', yAxis: '' }`\n\n## Contributing\n\n1. Fork it!\n2. Create your feature branch: `git checkout -b my-new-feature`\n3. Commit your changes: `git commit -am 'Add some feature'`\n4. Push to the branch: `git push origin my-new-feature`\n5. Submit a pull request :D\n\n\n### LICENSE\n\n[MIT](LICENSE) \u0026copy; [d3-node](https://github.com/d3-node)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fd3-node%2Fd3node-barchart","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fd3-node%2Fd3node-barchart","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fd3-node%2Fd3node-barchart/lists"}