{"id":14973405,"url":"https://github.com/pertrai1/angular-nvd3-charts","last_synced_at":"2025-10-01T23:30:49.514Z","repository":{"id":57178860,"uuid":"113949662","full_name":"pertrai1/angular-nvd3-charts","owner":"pertrai1","description":"Official Fork of Angular nvd3 - AngularJS directive for NVD3 reusable charting library (based on D3). Easily customize your charts via JSON API.","archived":false,"fork":true,"pushed_at":"2018-05-18T09:18:42.000Z","size":5210,"stargazers_count":5,"open_issues_count":1,"forks_count":1,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-01-19T22:14:13.144Z","etag":null,"topics":["angular1","angularjs","directives","nvd3"],"latest_commit_sha":null,"homepage":"https://pertrai1.github.io/angular-nvd3-charts","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"krispo/angular-nvd3","license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pertrai1.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"Contributing.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-12-12T05:57:10.000Z","updated_at":"2018-07-03T11:04:48.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/pertrai1/angular-nvd3-charts","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pertrai1%2Fangular-nvd3-charts","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pertrai1%2Fangular-nvd3-charts/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pertrai1%2Fangular-nvd3-charts/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pertrai1%2Fangular-nvd3-charts/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pertrai1","download_url":"https://codeload.github.com/pertrai1/angular-nvd3-charts/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":234909088,"owners_count":18905505,"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":["angular1","angularjs","directives","nvd3"],"created_at":"2024-09-24T13:48:40.345Z","updated_at":"2025-10-01T23:30:49.204Z","avatar_url":"https://github.com/pertrai1.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Angular-nvD3\n\n[![Build Status](https://travis-ci.org/pertrai1/angular-nvd3-charts.svg?branch=master)](https://travis-ci.org/pertrai1/angular-nvd3-charts)\n[![NPM Version](http://img.shields.io/npm/v/angular-nvd3-charts.svg?style=flat)](https://www.npmjs.org/package/angular-nvd3)\n\nThis is the [\"official\"](https://github.com/krispo/angular-nvd3/pull/728) fork of [krispo's Angular nvd3](https://github.com/krispo/angular-nvd3).\n\nAngular nvd3 charts is designed to make it easier to work with [nvd3.js](https://github.com/novus/nvd3) re-usable charting library. This directive allows you to easily customize your charts via JSON API.\n\nThe key feature is that the original hierarchical structure of nvd3 models is completely preserved in directive JSON structure. This means that while you creating a complex chart that containing multiple elementary chart models (such as `line`, `bar`, `axis`, ...), you can in turn customize the properties of each internal elementary models as well as the global charting properties the way you want. This can be done as usual, but it becomes quite easily to customize while applying JSON approach to.\n\nTry it [online](http://pertrai1.github.io/angular-nvd3-charts/).\n\n##### npm\n\n    $ npm install angular-nvd3-charts\n\n##### download\n\nIf you don't use bower or npm, you can manually download and unpack directive with the latest version ([zip](https://github.com/pertrai1/angular-nvd3-charts/archive/v1.0.8.zip), [tar.gz](https://github.com/pertrai1/angular-nvd3-charts/archive/v1.0.8.tar.gz)).\n\n### Basic usage\n\nInject `nvd3` directive into angular module, set up some chart options and push some data to the controller:\n```javascript\nangular.module('myApp', ['nvd3'])\n       .controller('myCtrl', function('$scope'){\n           $scope.options = { /* JSON data */ };\n           $scope.data = { /* JSON data */ }\n        })\n```\n\nand in html again you can use it like:\n```html\n\u003cdiv ng-app='myApp'\u003e\n    \u003cdiv ng-controller='myCtrl'\u003e\n        \u003cnvd3 options='options' data='data'\u003e\u003c/nvd3\u003e\n    \u003c/div\u003e\n\u003c/div\u003e\n```\n\nThe chart would be displayed on the page.\n\n### Example\n\nLet's create a simple **Discrete Bar Chart**.\n\nConfigure options:\n```javascript\n$scope.options = {\n    chart: {\n        type: 'discreteBarChart',\n        height: 450,\n        margin : {\n            top: 20,\n            right: 20,\n            bottom: 60,\n            left: 55\n        },\n        x: function(d){ return d.label; },\n        y: function(d){ return d.value; },\n        showValues: true,\n        valueFormat: function(d){\n            return d3.format(',.4f')(d);\n        },\n        transitionDuration: 500,\n        xAxis: {\n            axisLabel: 'X Axis'\n        },\n        yAxis: {\n            axisLabel: 'Y Axis',\n            axisLabelDistance: 30\n        }\n    }\n};\n```\n\nPush some data:\n```javascript\n$scope.data = [{\n    key: \"Cumulative Return\",\n    values: [\n        { \"label\" : \"A\" , \"value\" : -29.765957771107 },\n        { \"label\" : \"B\" , \"value\" : 0 },\n        { \"label\" : \"C\" , \"value\" : 32.807804682612 },\n        { \"label\" : \"D\" , \"value\" : 196.45946739256 },\n        { \"label\" : \"E\" , \"value\" : 0.19434030906893 },\n        { \"label\" : \"F\" , \"value\" : -98.079782601442 },\n        { \"label\" : \"G\" , \"value\" : -13.925743130903 },\n        { \"label\" : \"H\" , \"value\" : -5.1387322875705 }\n    ]\n}];\n```\n\nSee the [result](https://pertrai1.github.io/angular-nvd3-charts/#/discreteBarChart).\n\nRead more [docs](https://pertrai1.github.io/angular-nvd3-charts/#/quickstart).\n\n---\n\n## License\nLicensed under the terms of the [MIT License](https://github.com/pertrai1/angular-nvd3-charts/blob/master/LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpertrai1%2Fangular-nvd3-charts","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpertrai1%2Fangular-nvd3-charts","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpertrai1%2Fangular-nvd3-charts/lists"}