Skip to content

Commit 796c04d

Browse files
kum-deepakgordonwoodhull
authored andcommitted
Compatibility with d3v4
Squashed from dc-js#1363 pie-charts all test cases passing with d3v4 Better alignment to build infrastructure .selectAll('anything')[0] -> .selectAll('anything').nodes() interpolate and tension semantics have changed. Updated for semantics of D3v4 .enter() Fixed test cases Discovered that more D3 functions that are used. Updated for semantics of D3v4 .enter() Updated for semantics of D3v4 .enter() and fixed test cases. All test cases for number display and row chart passing Tests passing Axis, Scales - temp Added d3-compat to examples Brushing - initial work Many examples working :) Zoom and focus working Home page charts works (issue with brushes) Fixing some of the specs X Axis brushing Brushing for Scatter Plot Brush extents and background color Brush extent specs Brushing works :) Current status Bar width corrected Area is working geoChoroplethChart Functional completeness dispatch directly implemented, compatibility code discarded. base-mixin test cases passing All specs passing All specs passing Merged D3v3-compat Minor cleanup Merge d3 compat Cleanup brush related code Updated test case Travis Inline docs - d3 documentation links and minor changes Language correction Upgrade guide draft Update copyright notice Cleanup
1 parent ddbc7eb commit 796c04d

File tree

113 files changed

+2013
-1220
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

113 files changed

+2013
-1220
lines changed

.travis.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
sudo: false
22
language: node_js
33
node_js:
4-
- '6'
4+
- '8'
55
script:
66
- 'if [ "${TRAVIS_PULL_REQUEST}" = "false" ]; then grunt ci; else grunt ci-pull; fi'
77
env:

D3v4 Upgrade Notes.md

+35
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
##Non working examples
2+
3+
- http://localhost:8888/web/examples/filter-stacks.html
4+
(fading is peculiar)
5+
- http://localhost:8888/web/zoom/restrict-panning.html
6+
Need to increase height of range chart - currently height of
7+
brushable area is zero. New implementation needs it be more than zero.
8+
- http://localhost:8888/web/
9+
Range brushing inconsistent with previous version
10+
If the range chart is brushed first it works correctly
11+
If the Focus chart is zoomed first, brushing range chart fails.
12+
13+
14+
##Issues to be fixed
15+
16+
- Peculiar fading in filter-stacks.html (Medium)
17+
18+
19+
##Before release
20+
21+
- All High priority issues
22+
- Possibly Medium priority issues
23+
- Prepare upgrade guide (Initial version ready)
24+
25+
26+
### Next set of pull requests
27+
28+
- Cleanup of zoom behavior. Testing of restrict panning etc.
29+
- dc.event.trigger
30+
- exit/enter/update sequence
31+
- Additional test cases for dc.util.add and dc.util.subtract
32+
- One for each new chart type - original PRs from community
33+
- Consider removing transitions for zooming and brushing
34+
- d3 stack to D3v4
35+
- Changing .tension call in lineChart

Gruntfile.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -289,7 +289,7 @@ module.exports = function (grunt) {
289289
'<%= conf.pkg.name %>.js.map',
290290
'<%= conf.pkg.name %>.min.js',
291291
'<%= conf.pkg.name %>.min.js.map',
292-
'node_modules/d3/d3.js',
292+
'node_modules/d3/build/d3.js',
293293
'node_modules/crossfilter2/crossfilter.js',
294294
'node_modules/queue-async/build/queue.js',
295295
'node_modules/grunt-saucelabs/examples/jasmine/lib/jasmine-jsreporter/jasmine-jsreporter.js',
@@ -452,6 +452,7 @@ module.exports = function (grunt) {
452452

453453
module.exports.jsFiles = [
454454
'src/banner.js', // NOTE: keep this first
455+
'src/d3v3-compat.js',
455456
'src/core.js',
456457
'src/errors.js',
457458
'src/utils.js',

docs/dc-v3-upgrade-guide.md

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# dc v3 Upgrade Guide
2+
3+
The dc has undergone significant internal changes while moving to v3.
4+
Effort has been made to keep the API as close as possible.
5+
6+
d3 team has released version 4 which is not backward compatible with
7+
their version 3. dc relies very heavily on d3. It is quite likely that
8+
your code uses bits of d3.
9+
10+
Outline of the upgrade process:
11+
12+
- First of all update all d3 functions calls in your code. Most of these
13+
would start with d3. Check https://github.com/d3/d3/blob/master/CHANGES.md
14+
for new function name corresponding to old functions.
15+
- dc.lineChart .interpolate earlier took string parameter, these will get
16+
replaced by specialized curve functions. For example 'step-before'
17+
changes to `d3.curveStepBefore` and 'cardinal' to `d3.curveCardinal`.
18+
See https://github.com/d3/d3/blob/master/CHANGES.md#shapes-d3-shape
19+
for equivalent function calls.
20+
- For dc.geoChoroplethChart earlier `d3.geoAlbersUsa()` was the default
21+
for .projection. If you are plotting US states please call
22+
`.projection(d3.geoAlbersUsa())` explicitly on your chart.

jsdoc.conf.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
"outputSourcePath": true,
1313
"systemName": "dc.js",
1414
"footer": "",
15-
"copyright": "dc.js Copyright © 2012-2016 Copyright 2012-2016 Nick Zhu & the dc.js Developers",
15+
"copyright": "dc.js Copyright © 2012-2018 Nick Zhu & the dc.js Developers",
1616
"navType": "vertical",
1717
"theme": "cosmo",
1818
"linenums": true,

0 commit comments

Comments
 (0)