{"id":17450453,"url":"https://github.com/jkuri/ngx-graph","last_synced_at":"2025-07-26T04:38:01.657Z","repository":{"id":41617124,"uuid":"273225210","full_name":"jkuri/ngx-graph","owner":"jkuri","description":"Angular Beautiful and Customizable SVG Charts, Line \u0026 Area Chart, Realtime Chart, Pie Chart","archived":false,"fork":false,"pushed_at":"2023-10-07T22:19:15.000Z","size":3377,"stargazers_count":4,"open_issues_count":10,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-06-09T14:59:22.687Z","etag":null,"topics":["angular","area-chart","charts","line-chart","ng","pie-chart","real-time","realtime","realtime-chart","svg"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/jkuri.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-06-18T11:54:15.000Z","updated_at":"2023-12-12T11:07:25.000Z","dependencies_parsed_at":"2024-10-20T03:50:36.901Z","dependency_job_id":null,"html_url":"https://github.com/jkuri/ngx-graph","commit_stats":{"total_commits":70,"total_committers":1,"mean_commits":70.0,"dds":0.0,"last_synced_commit":"8e3cecdd2c7fe93a35b1973720bd198eac1ddff6"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/jkuri/ngx-graph","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jkuri%2Fngx-graph","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jkuri%2Fngx-graph/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jkuri%2Fngx-graph/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jkuri%2Fngx-graph/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jkuri","download_url":"https://codeload.github.com/jkuri/ngx-graph/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jkuri%2Fngx-graph/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265167543,"owners_count":23721462,"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":["angular","area-chart","charts","line-chart","ng","pie-chart","real-time","realtime","realtime-chart","svg"],"created_at":"2024-10-17T22:19:00.781Z","updated_at":"2025-07-26T04:38:01.615Z","avatar_url":"https://github.com/jkuri.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Angular SVG Charts\n\nThis is a set of fully customizable Angular components for visualizing data.\n\nCurrently it includes Line/Area Chart, Realtime Line/Area Chart and Pie Chart.\n\nCheck live [demo](https://ngx-graph.jankuri.com).\n\n[CodeSandbox Demo - Line Chart](https://codesandbox.io/s/ngx-graph-line-chart-example-2jdpc)\n\n## Running Demo Locally\n\nYou can run demo app locally, just follow this steps.\n\n```sh\ngit clone https://github.com/jkuri/ngx-graph\ncd ngx-graph\nnpm install // or yarn install\nnpm start\n```\n\n## Installation\n\nInstall the npm package.\n\n```sh\nnpm i ngx-graph\n```\n\nImport module that you need.\n\n```ts\nimport { LineChartModule, RealtimeChartModule, PieChartModule } from 'ngx-graph';\n\n@NgModule({\n  imports: [LineChartModule, RealtimeChartModule, PieChartModule]\n})\n```\n\n## Line / Area Chart\n\n### Preview\n\nSample of Line / Area Chart:\n\n![Screenshot 2020-06-18 at 19 33 45](https://user-images.githubusercontent.com/1796022/85053421-c1a33500-b19a-11ea-83ab-904f9aa45b3a.png)\n\n### Usage\n\nThis is sample usage of preview above with full source accessible [here](https://github.com/jkuri/ngx-graph/tree/master/projects/app/src/app/components/demo-line-area-chart).\n\nIn template:\n\n```html\n\u003cngx-line-chart [options]=\"options\" [data]=\"data\"\u003e\u003c/ngx-line-chart\u003e\n```\n\nIn your component:\n\n```ts\nimport { LineChartData, LineChartOptions } from 'ngx-graph';\n\noptions: LineChartOptions = {\n  height: 300,\n  margin: { top: 20, right: 40, bottom: 80, left: 60 },\n  yScale: { min: 0, max: 3000 },\n  xGrid: {\n    opacity: .4,\n    textColor: '#333'\n  },\n  yGrid: {\n    tickPadding: 13,\n    tickFormat: (num: number) =\u003e format('~s')(num) + ' €',\n    tickTextAnchor: 'end',\n    tickNumber: 5,\n    opacity: .4,\n    textColor: '#333'\n  },\n  transitions: true,\n  transitionDuration: 400,\n  legend: true,\n  legendPosition: 'bottom',\n  legendMargin: { top: 0, right: 0, left: 0, bottom: 0 },\n  initialTransition: false,\n  interaction: {\n    axisLine: true,\n    axisLineSize: 4,\n    axisLineColor: '#eef0f7',\n    tooltip: true,\n  }\n};\n\ndata: LineChartData[] = [\n  new LineChartData({\n    id: 'progress',\n    data: this.data.generateRandomDateValues(10, 2000, 2900),\n    area: true,\n    areaOpacity: .4,\n    curve: 'linear',\n    markers: true,\n    color: '#FACF55',\n    areaColor: '#FACF55',\n    markerColor: '#FACF55',\n    lineSize: 3\n  }),\n  new LineChartData({\n    id: 'income',\n    data: this.data.generateRandomDateValues(10, 1200, 1900),\n    area: true,\n    areaOpacity: .4,\n    curve: 'linear',\n    markers: true,\n    lineSize: 3\n  }),\n  new LineChartData({\n    id: 'expenses',\n    data: this.data.generateRandomDateValues(10, 400, 950),\n    area: true,\n    areaOpacity: .4,\n    curve: 'linear',\n    markers: true,\n    color: '#34B77C',\n    areaColor: '#34B77C',\n    markerColor: '#34B77C',\n    lineSize: 3\n  })\n];\n```\n\nFor a full list of options please check [here](https://github.com/jkuri/ngx-graph/blob/master/projects/ngx-graph/src/lib/line-chart/line-chart.class.ts#L233-L246).\n\n## Real-Time Chart\n\n### Preview\n\n![ngx-graph-realtime](https://user-images.githubusercontent.com/1796022/85064398-ccb29100-b1ab-11ea-9729-c90cd2de98e6.gif)\n\n### Usage\n\nFor above sample you can check source code [here](https://github.com/jkuri/ngx-graph/tree/master/projects/app/src/app/components/demo-realtime-chart).\n\nIn your template:\n\n```html\n\u003cngx-realtime-chart\n  [options]=\"realtimeChartOptions\"\n  [data]=\"realtimeChartData\"\n\u003e\u003c/ngx-realtime-chart\u003e\n```\n\nIn your component:\n\n```ts\nimport { interval } from 'rxjs';\nimport { timeInterval } from 'rxjs/operators';\nimport { RealtimeChartOptions } from 'ngx-graph';\n\nrealtimeChartOptions: RealtimeChartOptions = {\n  height: 300,\n  margin: { left: 40 },\n  lines: [\n    { color: '#34B77C', lineWidth: 3, area: true, areaColor: '#34B77C', areaOpacity: .2 }\n  ],\n  xGrid: { tickPadding: 15, tickNumber: 5 },\n  yGrid: { min: 0, max: 100, tickNumber: 5, tickFormat: (v: number) =\u003e `${v}%`, tickPadding: 25 }\n};\n\nngOnInit(): void {\n  // push new value to real-time chart every second (example)\n  interval(1000)\n    .pipe(timeInterval())\n    .subscribe(() =\u003e {\n      this.realtimeChartData[0].push({ date: new Date(), value: this.data.randomInt(0, 100) });\n    })\n}\n```\n\nFor full list of options please check [here](https://github.com/jkuri/ngx-graph/blob/master/projects/ngx-graph/src/lib/realtime-chart/realtime-chart.interface.ts#L47-L56).\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjkuri%2Fngx-graph","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjkuri%2Fngx-graph","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjkuri%2Fngx-graph/lists"}