Skip to content

Commit 9313261

Browse files
authored
Merge pull request #108 from tomwanzek/major-d3-5-alignment
feat(d3) update to align with D3 v5.0
2 parents b674403 + 5251b90 commit 9313261

File tree

5 files changed

+117
-92
lines changed

5 files changed

+117
-92
lines changed

README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# D3 Service for Angular 2+
1+
# D3 Service for Angular
22

33
[![Build Status](https://travis-ci.org/tomwanzek/d3-ng2-service.svg?branch=master)](https://travis-ci.org/tomwanzek/d3-ng2-service)
44

@@ -20,14 +20,14 @@ With the release of version 4, **D3** has been completely modularized and seen e
2020
Amongst the many changes since the release of **Angular 2**, the native support for developing at scale in TypeScript and the overhauled componentized structure are but two.
2121

2222
Combining the power of **D3** and **Angular** can be challenging at first. The intent of this package is to provide a simple way to access **D3** as an **Angular service** for use by components requiring the kind of sophisticated visualization support D3 excels at.
23-
The package includes TypeScript 2 definitions to improve development experience and code maintainability.
23+
The package includes TypeScript definitions to improve development experience and code maintainability.
2424

2525
## Intended Use
2626

2727
This package was designed to quickly add **D3** support to an **Angular** application, such as those created with the **angular-cli**.
2828

2929
As is clear from the D3 scope described below, there may be circumstances, where a smaller or larger D3 feature set may be better suited for a given project.
30-
In such cases reviewing the TypeScript source code in the [package's Github repo](https://github.com/tomwanzek/d3-ng2-service) may serve as a starting point for a more tailored solution.
30+
In such cases, reviewing the TypeScript source code in this [package's Github repo](https://github.com/tomwanzek/d3-ng2-service) may serve as a starting point for a more tailored solution.
3131

3232
A suggested approach may also involve starting out with the **d3-ng2-service** for rapid prototyping. Then, once there is more stability regarding the specific, required **D3** feature set,
3333
the D3 service pattern can be preserved by implementing the minimally viable D3 service directly in the project. This amounts to manually "treeshaking" D3 in order to preserve the
@@ -37,9 +37,9 @@ For those interested in using the treeshaking performed "automatically" by third
3737

3838
## Scope of D3 Functionality
3939

40-
As this package is designed for use with **Angular 2+**, it does not strictly mirror the functionality scope included in the [_D3 Standard Bundle_](https://github.com/d3/d3).
40+
As this package is designed for use with **Angular**, it does not strictly mirror the functionality scope included in the [_D3 Standard Bundle_](https://github.com/d3/d3).
4141

42-
The [_d3-request_](https://github.com/d3/d3-request) module has been **omitted** as a design choice given the feature set of **Angular**. By implication, it is recommended to utilize e.g. the **Angular** `http` service for client/server communication. The `d3-ng2-service` package does, however, expose **D3** data parsing functionality such as `csvParse(...)`.
42+
The [_d3-fetch_](https://github.com/d3/d3-fetch) module has been **omitted** as a design choice given the feature set of **Angular**. By implication, it is recommended to utilize e.g. **Angular's** `HttpClient` for client/server communication. The `d3-ng2-service` package does, however, expose **D3** data parsing functionality such as `csvParse(...)`.
4343

4444
The functionality enhancements provided by the now separate [_d3-selection-multi_](https://github.com/d3/d3-selection-multi) module have been included for added convenience.
4545

@@ -54,7 +54,7 @@ To include the package into your **Angular** project, simply use the standard np
5454
npm install d3-ng2-service --save
5555
```
5656

57-
Please note that, the package has a _peer dependency_ on **@angular/core**.
57+
Please note that the package has a _peer dependency_ on **@angular/core**.
5858

5959
## Usage
6060

index.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,10 @@ export {
5050
LabColorFactory,
5151
RGBColor,
5252
RGBColorFactory,
53+
// d3-contour
54+
ContourDensity,
55+
ContourMultiPolygon,
56+
Contours,
5357
// d3-dispatch
5458
Dispatch,
5559
// d3-drag
@@ -130,8 +134,6 @@ export {
130134
Quadtree,
131135
QuadtreeInternalNode,
132136
QuadtreeLeaf,
133-
// d3-queue
134-
Queue,
135137
// d3-random
136138
RandomBates,
137139
RandomExponential,
@@ -155,6 +157,8 @@ export {
155157
ScaleSequential,
156158
ScaleThreshold,
157159
ScaleTime,
160+
// d3-scale-chromatic
161+
// No interfaces or types
158162
// d3-selection
159163
ArrayLike,
160164
BaseEvent,

0 commit comments

Comments
 (0)