17.0.1 • Published 5 months ago

ngx-simple-charts v17.0.1

Weekly downloads
28
License
Apache License Ve...
Repository
-
Last release
5 months ago

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 17

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.

17.0.0-pre1

5 months ago

17.0.0-pre2

5 months ago

17.0.1

5 months ago

17.0.0

5 months ago

16.1.0-beta1

11 months ago

16.1.0-beta2

11 months ago

16.1.1

10 months ago

16.1.0

11 months ago

16.1.2

10 months ago

16.0.0

12 months ago

15.0.0-beta1

1 year ago

15.0.0

1 year ago

14.4.0

1 year ago

14.4.1

1 year ago

14.1.0

2 years ago

14.2.0

2 years ago

14.1.1

2 years ago

14.3.0

2 years ago

14.1.2

2 years ago

14.3.1

2 years ago

14.1.3

2 years ago

14.0.0

2 years ago

14.0.1

2 years ago

14.0.0-alpha-0

2 years ago

13.3.3

2 years ago

13.3.1

2 years ago

13.3.2

2 years ago

13.3.0

2 years ago

13.2.0

2 years ago

13.1.1

2 years ago

13.2.1

2 years ago

13.1.0

2 years ago

1.1.0

2 years ago

13.0.0

2 years ago

1.0.6

3 years ago

1.0.5

3 years ago

1.0.4

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago

0.0.7

3 years ago

0.0.5

3 years ago

0.0.6

3 years ago

0.0.4

3 years ago

0.0.3

3 years ago

0.0.2

3 years ago

0.0.1

3 years ago