MCPcopy Index your code
hub / github.com/swimlane/ngx-charts

github.com/swimlane/ngx-charts @24.0.0 sqlite

repository ↗ · DeepWiki ↗ · release 24.0.0 ↗
1,247 symbols 2,282 edges 174 files 22 documented · 2%
README

ngx-charts

Join the chat at https://gitter.im/swimlane/ngx-charts Codacy Badge npm version npm downloads

Declarative Charting Framework for Angular!

ngx-charts is unique because we don't merely wrap d3, nor any other chart engine for that matter. It is using Angular to render and animate the SVG elements with all of its binding and speed goodness, and uses d3 for the excellent math functions, scales, axis and shape generators. By having Angular do all of the rendering it opens us up to endless possibilities the Angular platform provides such as AoT, SSR, etc.

Data visualization is a science but that doesn't mean it has to be ugly. One of the big efforts we've made while creating this project is to make the charts aesthetically pleasing. The styles are also completely customizable through CSS, so you can override them as you please.

Also, constructing custom charts is possible by leveraging the various ngx-charts components that are exposed through the ngx-charts module.

For more info, check out the documentation and the demos.

Features

Chart Types

  • Horizontal & Vertical Bar Charts (Standard, Grouped, Stacked, Normalized)
  • Line
  • Area (Standard, Stacked, Normalized)
  • Pie (Explodable, Grid, Custom legends)
  • Bubble
  • Donut
  • Gauge (Linear & Radial)
  • Heatmap
  • Treemap
  • Number Cards
  • Sankey Diagram

Customization

  • Autoscaling
  • Timeline Filtering
  • Line Interpolation
  • Configurable Axis Labels
  • Legends (Labels & Gradient)
  • Advanced Label Positioning
  • Real-time data support
  • Advanced Tooltips
  • Data point Event Handlers
  • Works with ngUpgrade

Install

To use ngx-charts in your project install it via npm:

npm i @swimlane/ngx-charts --save

Custom Charts

To learn how to use the ngx-charts components to build custom charts and find examples, please refer to our Custom Charts Page.

Release

  • Checkout master (git checkout master)
  • Pull master (git pull)
  • Refresh node modules (yarn install --frozen-lockfile)
  • Run tests (yarn test)
  • Examine log to determine next version (X.Y.Z)
  • Run git checkout -b release/X.Y.Z
  • Update version in projects/swimlane/ngx-charts/package.json
  • Update changelog in projects/docs/changelog.md
  • Run yarn package
  • Run git commit -am "(release): X.Y.Z"
  • Run git tag X.Y.Z
  • Run git push origin HEAD --tags
  • Run yarn publish:lib
  • Submit PR

Credits

ngx-charts is a Swimlane open-source project; we believe in giving back to the open-source community by sharing some of the projects we build for our application. Swimlane is an automated cyber security operations and incident response platform that enables cyber security teams to leverage threat intelligence, speed up incident response and automate security operations.

SecOps Hub is an open, product-agnostic, online community for security professionals to share ideas, use cases, best practices, and incident response strategies.

Extension points exported contracts — how you extend this code

CardModel (Interface)
(no doc)
projects/swimlane/ngx-charts/src/lib/number-card/card-series.component.ts
Cell (Interface)
(no doc)
projects/swimlane/ngx-charts/src/lib/heat-map/heat-map-cell-series.component.ts
RectItem (Interface)
(no doc)
projects/swimlane/ngx-charts/src/lib/heat-map/heat-map.component.ts
Color (Interface)
(no doc)
projects/swimlane/ngx-charts/src/lib/utils/color-sets.ts
PieData (Interface)
(no doc)
projects/swimlane/ngx-charts/src/lib/pie-chart/pie-label.component.ts

Core symbols most depended-on inside this repo

getColor
called by 38
projects/swimlane/ngx-charts/src/lib/common/color.helper.ts
calculateViewDimensions
called by 29
projects/swimlane/ngx-charts/src/lib/common/view-dimensions.helper.ts
formatLabel
called by 25
projects/swimlane/ngx-charts/src/lib/common/label.helper.ts
escapeLabel
called by 25
projects/swimlane/ngx-charts/src/lib/common/label.helper.ts
id
called by 20
projects/swimlane/ngx-charts/src/lib/utils/id.ts
trimLabel
called by 17
projects/swimlane/ngx-charts/src/lib/common/trim-label.helper.ts
select
called by 16
src/app/app.component.ts
formatDates
called by 13
projects/swimlane/ngx-charts/src/lib/common/base-chart.component.ts

Shape

Method 884
Class 241
Function 63
Interface 45
Enum 14

Languages

TypeScript100%

Modules by API surface

src/app/app.component.ts50 symbols
src/app/custom-charts/combo-chart/combo-chart.component.ts28 symbols
src/app/custom-charts/bubble-chart-interactive/models.ts26 symbols
projects/swimlane/ngx-charts/src/lib/polar-chart/polar-chart.component.ts24 symbols
projects/swimlane/ngx-charts/src/lib/line-chart/line-chart.component.ts23 symbols
projects/swimlane/ngx-charts/src/lib/box-chart/box.component.ts23 symbols
src/app/custom-charts/bubble-chart-interactive/bubble-chart-interactive.component.ts22 symbols
projects/swimlane/ngx-charts/src/lib/bubble-chart/bubble-chart.component.ts22 symbols
projects/swimlane/ngx-charts/src/lib/sankey/sankey.component.ts21 symbols
projects/swimlane/ngx-charts/src/lib/area-chart/area-chart.component.ts21 symbols
projects/swimlane/ngx-charts/src/lib/area-chart/area-chart-stacked.component.ts21 symbols
projects/swimlane/ngx-charts/src/lib/bar-chart/bar-horizontal-2d.component.ts20 symbols

Dependencies from manifests, versioned

@angular-devkit/architect0.2102.9 · 1×
@angular-devkit/build-angular21.2.9 · 1×
@angular-eslint/eslint-plugin21.3.1 · 1×
@angular-eslint/eslint-plugin-template21.3.1 · 1×
@angular-eslint/schematics21.3.1 · 1×
@angular-eslint/template-parser21.3.1 · 1×
@angular/animations21.2.9 · 1×
@angular/build21.2.9 · 1×
@angular/cdk21.2.9 · 1×
@angular/cli21.2.9 · 1×
@angular/common21.2.9 · 1×

For agents

$ claude mcp add ngx-charts \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact