ngx-charts
Primary version
Primary version
  • Introduction
  • Changelog
  • Custom Charts
  • demo
  • Features
  • Installing
  • License
  • Motivation
  • Table of contents
  • contributing
    • Building
    • Community
    • Credits
    • Guidelines
    • Troubleshooting
  • examples
    • Box Chart
    • bubble-chart
    • Gauge Chart
    • Heat Map Chart
    • Linear Gauge Chart
    • Number Card Chart
    • Polar/radar Chart
    • Tree Map Chart
    • bar-charts
      • Grouped Horizontal Bar Chart
      • Grouped Vertical Bar Chart
      • Horizontal Bar Chart
      • Normalized Horizontal Bar Chart
      • Normalized Vertical Bar Chart
      • Stacked Horizontal Bar Chart
      • Stacked Vertical Bar Chart
      • Vertical Bar Chart
    • line-area-charts
      • Area Chart
      • Line Chart
      • Normalized Area Chart
      • Stacked Area Chart
    • pie-charts
      • Advanced Pie Chart
      • Pie Chart
      • Pie Grid Chart
Powered by GitBook
On this page
  • Custom Chart Index
  • Pointers when creating or adapting Custom Charts

Custom Charts

PreviousChangelogNextdemo

Last updated 5 years ago

Other than the library of available charts, ngx-charts also exports all of the components and helpers used as building blocks for the charts. Things like legends, axes, dimension helpers, gradients, shapes, series of shapes, can all be directly imported into your application and used in your components. This allows you to combine them and build custom charts that implement use cases that the pre-made charts do not support.

You can find an example of how to use these components to build a custom chart here:

The demo of the above combo-chart can be seen here:

The charts under the 'Demos' group in our demo page are not distributed with the library. However, their code is available and can be copied directly into your project. We encourage you to submit a pull request for your custom charts to be listed in our 'Demos' section, because they may help other people that have the same use case as you.

Custom Chart Index

If you want to have your custom chart featured above, please submit a pull request to .

Pointers when creating or adapting Custom Charts

  • To develop new charts, start by building the shell in the demo project first.

  • If you start by copying an existing chart from src (recommended), be sure to rename your new component(s) and their selectors, as well as the module that contains them (if applicable).

  • If you discover the tooltip does not display correctly, try exporting the new chart as a module along with ChartCommonModule and import it into the demo's app.module.ts file.

  • For an example of this, look at most any chart in the src folder

  • Always a good idea to give back. Use this link to learn how to contribute to github repos:

https://github.com/swimlane/ngx-charts/tree/master/src/app/custom-charts/combo-chart
https://swimlane.github.io/ngx-charts/#/ngx-charts/combo-chart
Bar/Line Combo Chart
Sparkline
Timeline filter bar chart
Bubble Chart Interactive Drilldown
this file
http://kbroman.org/github_tutorial/pages/fork.html