npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

ngx-simple-charts

v19.0.0

Published

This is a small chart library for Angular based on D3js. It currently supports single line and multi line charts with a legend. Bar and Donut charts are now supported too. The token service and token interceptor are now included in a configurable manner.

Downloads

178

Readme

NgxSimpleCharts

This is a small chart library for Angular based on D3js. It currently supports single line and multi line charts with a legend. Bar and Donut charts are now supported too. The token service and token interceptor are now included in a configurable manner. The Bar charts, line charts, donut, and Date/Timeline charts and the services are in separate entry points to enable the Angular Compiler to put only the required code in the modules that use the features. Its purpose is to enable fast updates to new Angular versions. To enable the fast updates and due to limited time the library will continue have a small feature set.

Minimum Supported Angular Version

Angular 19

CodeQL

Articles

Line Charts

To use the line chart component this module has to be imported: NgxLineChartsModule

Then the component can be used: <sc-line-chart [chartPoints]="..." [replaceName]="..." [replaceSymbol]="...">

The lines are defined in the ChartPoints interface. To draw multiple lines in a chart multiple chartPoints have to be provided. The interface for the chartPoints can be found here: ChartPoints

To enable styling of the chart these classes can be used: Component.scss The classes have to be overwritten with '::ng-deep' and the ViewEncapsulation.ShadowDom is not supported for the enclosing component. To style multiple lines '::ng-deep' classes with the naming convention line-'ChartPoints.name'(for example: 'line-abc') with the name in lower case can be used. The ChartPoints.name is filtered with this Regex: '[^a-zA-Z0-9-]' that cuts off the name if a character is found that is not a letter, number or '-'(for example 'line-Abc1.d' -> 'line-abc1') and changes it to lower case.

The legend shows the names of the ChartPoints in the color that set for the lines. If one 'ChartPoints.name' should be replaced the 'replaceSymbol' has to be a string that the 'ChartPoints.name' includes and is replaced with the 'replaceName'.

The Line Charts are animated.

Bar Charts

To use the bar chart component this module has to be imported: NgxBarChartsModule

Then the component can be used: <sc-bar-chart [chartBars]="...">

The bars are defined in the ChartBars interface. The interface for the chartPoints can be found here: ChartBars

To enable styling of the chart these classes can be used: Component.scss The classes have to be overwritten with '::ng-deep' and the ViewEncapsulation.ShadowDom is not supported for the enclosing component. To style multiple bars '::ng-deep' classes with the naming convention line-'ChartBar.x'(for example: 'bar-abc') with the name in lower case can be used. The ChartBar.x is filtered with this Regex: '[^a-zA-Z0-9-]' that cuts off the name if a character is found that is not a letter, number or '-'(for example 'bar-Abc1.d' -> 'line-abc1') and changes it to lower case.

The Bar Charts are animated.

Donut Charts

To use the bar chart component this module has to be imported: NgxDonutChartsModule

Then the component can be used: <sc-donut-chart [chartState]="..." [chartSlices]="...">

The slices are defined in the ChartSlices interface. The interface for the chartSlices can be found here: ChartSlices

The chartState is a string with the values of 'ready' or 'not-ready'. The animation starts when 'not-ready' is set to 'ready'.

To enable styling the optional 'color' property of the ChartSlice can be used to provide a custom color. It needs to be in Css color format.

Date/TimeLine Charts

This is a scolling chart to display time periods in bars vertically in units of years or months. To use the Date/Timeline chart componnent this module has to be imported: NgxDateTimeChartsModule

Then the component can be used: <sc-date-time-chart [showDays]="..." [items]="..."> The property 'showDays' switches the on the view with months and days and the 'items' property contains the ChartItems to display.

Token Services

The services/interceptors for the Jwt token handling are now included.

To use the token handling this module has to be imported: NgxServiceModule

Examples howto use it can be found in the AngularAndSpring and AngularPortfolioMgr projects.

Some time in the future

For more features pull requests are welcome.