This repository has been archived by the owner on Jul 16, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #8 from tomwanzek/update-readme-pre-release
Content/Layout. angular-cli beta.15. Minor Fixes.
- Loading branch information
Showing
11 changed files
with
123 additions
and
57 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,45 +1,69 @@ | ||
# D3 Angular 2 Demo | ||
# Reusable Visual Power? | ||
|
||
[![Build Status](https://travis-ci.org/tomwanzek/d3-ng2-demo.svg?branch=master)](https://travis-ci.org/tomwanzek/d3-ng2-demo) | ||
|
||
## Purpose | ||
## Fuse D3 and Angular 2 in TypeScript (A Demo) | ||
|
||
This project repository contains an **Angular 2** web application which demonstrates the integration with **D3 version 4** in **TypeScript**. | ||
|
||
The running web app can be seen at: [d3-ng2-demo Github Page](https://tomwanzek.github.io/d3-ng2-demo/). | ||
Ever wondered, how to build modern web apps with reusable, interactive data visualization components? | ||
|
||
It illustrates the use of a _D3 Service_ as a provider for the rendering of **D3** data visualizations implemented as Angular 2 components. | ||
The latest incarnation of **[D3](https://d3js.org/)** is getting you excited about new destinations. **[Angular 2](https://angular.io/)** is finally on the tarmac. [**TypeScript**](https://github.com/midrosoft/typescript) has become the fuel that lets you develop complex solutions at scale. | ||
|
||
This project was generated with [angular-cli](https://github.com/angular/angular-cli) version 1.0.0-beta.14. | ||
Integrating all three, however, seems as daunting as taking off in the perfect storm. | ||
|
||
This Angular 2 demo app is intended to get you started. Rather than trying to be exhaustive or writing a lengthy blog post, a select few well-known D3 demo scripts have been adapted to highlight key considerations: | ||
|
||
_This Readme is undergoing an update process_ | ||
* use an Angular 2 Service to inject the power of D3 version 4 into a project, | ||
|
||
* explore how D3 visualizations can be implemented as Angular 2 components in TypeScript 2, | ||
|
||
## Development server | ||
* see how a visualization component can change in response to input data changes, | ||
|
||
* find ways to unit test your D3 components with Karma/Jasmine, and | ||
|
||
* check out an example end-to-end test using Protractor. | ||
|
||
_The running web app can be seen at:_ **[d3-ng2-demo Github Page](https://tomwanzek.github.io/d3-ng2-demo/)**. | ||
|
||
|
||
![Screenshot Drag-Zoom-2](./screenshots/d3-ng2-demo-screenshot-2.PNG) | ||
|
||
|
||
## Explore this Project Locally | ||
|
||
This project was generated with **[angular-cli](https://github.com/angular/angular-cli) version 1.0.0-beta.15**. | ||
|
||
### Installation | ||
|
||
In order to explore the project locally: | ||
|
||
1. clone this git repository using `git clone https://github.com/tomwanzek/d3-ng2-demo.git`, | ||
2. change into the project directory `cd d3-ng2-demo`, and | ||
3. run `npm install`. | ||
|
||
Now you are ready to explore the source code and use the features provided by **angular-cli** for your convenience. | ||
A brief overview of the command line support provided by angular-cli is sketched out in the following subsections. | ||
|
||
### Development Server | ||
Run `ng serve` for a dev server. Navigate to `http://localhost:4200/`. The app will automatically reload if you change any of the source files. | ||
|
||
## Code scaffolding | ||
### Code scaffolding | ||
|
||
Run `ng generate component component-name` to generate a new component. You can also use `ng generate directive/pipe/service/class`. | ||
|
||
## Build | ||
### Build | ||
|
||
Run `ng build` to build the project. The build artifacts will be stored in the `dist/` directory. Use the `-prod` flag for a production build. | ||
|
||
## Running unit tests | ||
### Running Unit Tests | ||
|
||
Run `ng test` to execute the unit tests via [Karma](https://karma-runner.github.io). | ||
|
||
## Running end-to-end tests | ||
### Running End-to-End Tests | ||
|
||
Run `ng e2e` to execute the end-to-end tests via [Protractor](http://www.protractortest.org/). | ||
Before running the tests make sure you are serving the app via `ng serve`. | ||
|
||
## Deploying to Github Pages | ||
|
||
Run `ng github-pages:deploy` to deploy to Github Pages. | ||
|
||
## Further help | ||
### Further Help | ||
|
||
To get more help on the `angular-cli` use `ng --help` or go check out the [Angular-CLI README](https://github.com/angular/angular-cli/blob/master/README.md). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
{ | ||
"project": { | ||
"version": "1.0.0-beta.14", | ||
"version": "1.0.0-beta.15", | ||
"name": "d3-ng2-demo" | ||
}, | ||
"apps": [ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,27 @@ | ||
<!doctype html> | ||
<html> | ||
|
||
<head> | ||
<meta charset="utf-8"> | ||
<title>D3 Angular 2 Demo</title> | ||
<title>Reusable Visual Power</title> | ||
<base href="/"> | ||
|
||
<meta name="viewport" content="width=device-width, initial-scale=1"> | ||
<link rel="icon" type="image/x-icon" href="favicon.ico"> | ||
|
||
</head> | ||
|
||
<body> | ||
<app-root>Loading...</app-root> | ||
<app-root> | ||
<div class="containter"> | ||
<div class="row"> | ||
<div class="col-lg-12"> | ||
<div class="alert alert-info text-center"> | ||
<span class="glyphicon glyphicon-refresh"></span><em>Loading...</em> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
</app-root> | ||
</body> | ||
|
||
</html> |