Skip to content

DunedinJS/d3-intro

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Introduction to D3

D3 is a JavaScript library for data visualisation.

Requirements

  • Node.js 6.9 or higher
  • A modern web browser (Chrome recommended)

Setup

  1. Clone this branch into a directory of your choice
  2. cd into the directory
  3. Run npm i to install project dependencies

Build with development server

This builds and serves the project with webpack-dev-server. It watches for source code changes and reloads automatically.

Run npm start

This will serve locally on http://0.0.0.0:8080

Linking the source directory for in-browser editing

In Chrome:

  1. Open the Sources tab, right click in the sources tree area and select 'Add folder to workspace' 'Add folder to workspace'
  2. Select the sources directory of this project from your filesystem
  3. You may be asked to confirm your permission to add the directory so allow it 'Allow folder add'

The sources directory should now be listed in the sources tree. You can select and edit the source files.

If you are running the development server any saved changes will be reflected.

'Directory added'

Build to static files

This builds the project to static files which can be served by any conventional web server. It does not provide the live editing features.

Run npm run build

This will build to the dist directory.