Skip to content

Commit e54be2b

Browse files
Merge branch 'hotfix/2.0'
2 parents 5d1aa68 + 4a1caf8 commit e54be2b

Some content is hidden

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

86 files changed

+9332
-3636
lines changed

.jscsrc

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,5 @@
2626
"requireReturnTypes": true,
2727
"checkTypes": "capitalizedNativeCase",
2828
"checkRedundantAccess": true
29-
},
30-
"esnext": true
29+
}
3130
}

.jshintrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"freeze": true,
88
"immed": true,
99
"indent": 4,
10-
"latedef": true,
10+
"latedef": false,
1111
"newcap": true,
1212
"noarg": true,
1313
"nonbsp": true,

.travis.yml

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

AUTHORS

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,3 +85,8 @@ Fil <fil@rezo.net>
8585
Mauricio Bustos <m@bustos.org>
8686
Anders Dalvander <github@dalvander.com>
8787
Alexander Stillesjö <a.stillesjo@gmail.com>
88+
Steffen Dienst <steffen.dienst@gmail.com>
89+
Ganesh Iyer <lastlegion@gmail.com>
90+
Daniel Gall <Daniel.Gall@noaa.gov>
91+
Renoth
92+
alexnb <abtmp-github@yahoo.com>

CONTRIBUTING.md

Lines changed: 10 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,17 @@
22

33
## Issue Submission Guidelines
44

5-
* Because of the volume of requests, we do not use the issue tracker for support questions. If you are trying to get a particular effect or you have a problem with your code, please ask your question on stackoverflow.com or the [user group](https://groups.google.com/forum/?fromgroups#!forum/dc-js-user-group)
6-
* It will be far, far easier for others to understand your problem or bug if you demonstrate it with a short example on http://jsfiddle.net/ or on http://bl.ocks.org/ (http://blockbuilder.org/ is a great way to edit bl.ocks!). Here are some examples you can fork to get started:
7-
* [example jsFiddle](http://jsfiddle.net/gordonwoodhull/os27xcg2/) with some data and a chart.
8-
* [blank jsFiddle](http://jsfiddle.net/gordonwoodhull/u57bfje8/) using the latest dc.js from github.io
5+
If you are trying to get a particular effect or you have a problem with your code, please ask your question [on stackoverflow.com](http://stackoverflow.com/questions/tagged/dc.js) or the [user group](https://groups.google.com/forum/?fromgroups#!forum/dc-js-user-group). We use the issue tracker for bug reports and feature requests only.
6+
7+
Get help faster with a working example! Use [jsfiddle.net](http://jsfiddle.net) or [bl.ocks.org](http://bl.ocks.org) - [blockbuilder.org](http://blockbuilder.org/) is a great way to edit bl.ocks.
8+
9+
Here are some examples you can fork to get started:
10+
* [example jsFiddle](https://jsfiddle.net/gordonwoodhull/1hbjwxzy/) with some data and a chart.
11+
* [blank jsFiddle](https://jsfiddle.net/gordonwoodhull/kk4j0bzn/) using the latest dc.js from github.io
912
* the same example [as a bl.ock](http://bl.ocks.org/gordonwoodhull/ecce8e32d64c662cffd5); [on blockbuilder.org](http://blockbuilder.org/gordonwoodhull/ecce8e32d64c662cffd5)
1013
* a blank template bl.ock [on blockbuilder.org](http://blockbuilder.org/gordonwoodhull/9ab997c9a8d7d3380364)
11-
* For bugs and feature requests submit a [github issue](http://github.com/dc-js/dc.js/issues)
14+
15+
For bug reports and feature requests submit a [github issue](http://github.com/dc-js/dc.js/issues)
1216
* Please include the version of DC you are using
1317
* If you can, please try the latest version of DC on the [master](https://raw.github.com/dc-js/dc.js/master/dc.js) branch to see if your issue has already been addressed or is otherwise affected by recent changes.
1418

@@ -34,17 +38,7 @@
3438
* Please try to follow the existing code formatting
3539
* We use jshint and jscs to verify most of our coding conventions
3640

37-
It helps keep on top of the conventions if you create a git pre-commit hook `.git/hooks/pre-commit`:
38-
```
39-
#!/usr/bin/env sh
40-
41-
grunt jshint
42-
grunt jscs
43-
```
44-
45-
(You also need to make it executable with `chmod u+x .git/hooks/pre-commit`)
46-
47-
Or you can just run the commands manually before committing.
41+
The default grunt task will install a git pre-commit hook `.git/hooks/pre-commit` to help verify the coding conventions. Or run `grunt lint` to check them manually.
4842

4943
#### Testing Notes
5044

Changelog.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,22 @@
11
# 2.0 Series
2+
## 2.0.0
3+
* xAxisPaddingUnit also applied to stacked charts, by Alexander Stillesjö ([#1234](https://github.com/dc-js/dc.js/pull/1234)
4+
* Limit zoom bounds - panning past the end should not cause brush to turn inside out. Thanks to Indri Muska for initial implementation and test ([#1026](https://github.com/dc-js/dc.js/pull/1026))
5+
* Legend was wrapping one item too late, by alexnb ([#1229](https://github.com/dc-js/dc.js/pull/1229))
6+
* Limit the number of legend items with `maxItems`, by Renoth ([#1114](https://github.com/dc-js/dc.js/pull/1114))
7+
* [Example of switching time intervals](http://dc-js.github.io/dc.js/examples/switching-time-intervals.html), for doing simple aggregation of simple time series data
8+
* Scatter plot titles, by Daniel Gall ([#1200](https://github.com/dc-js/dc.js/pull/1200))
9+
* `scatterPlot` and `RangedTwoDimensionalFilter` no longer require that the dimension key have exactly two elements, to support the common trick of putting the color in the third element.
10+
* [Scatter plot matrix brushing example](http://dc-js.github.io/dc.js/examples/splom.html)
11+
* `emptyOpacity` is exposed, and `emptySize` is a radius like the other sizes (squared for symbol size), by Ganesh Iyer ([#1058](https://github.com/dc-js/dc.js/pull/1058))
12+
* Bubble chart and heatmap correctly re-select (not selectAll) the sub-components in order to correctly apply new data when redrawn. This affects uses of dc.js where the data is replaced instead of being modified in place. (For example, the case where crossfilter is not used.) By Steffen Dienst and Matt Traynham. ([#1032](https://github.com/dc-js/dc.js/pull/1032), [#1237](https://github.com/dc-js/dc.js/pull/1237))
13+
* Further changed other unnecessary uses of `selectAll` to `select` - when appending or inserting a single element, one should almost always match that with `select` for updates. ([#1239](https://github.com/dc-js/dc.js/issues/1239))
14+
* Heatmap column/row filtering is a lot faster ([#649](https://github.com/dc-js/dc.js/issues/649))
15+
* `colorMixin.colorCalculator` properly documented and deprecated ([#1225](https://github.com/dc-js/dc.js/issues/1225))
16+
* Development dependencies upgraded, by Matt Traynham ([#1233](https://github.com/dc-js/dc.js/pull/1233))
17+
* Add a class diagram to the [HTML documentation](http://dc-js.github.io/dc.js/docs/html/).
18+
* Many documentation fixes. ([#612](https://github.com/dc-js/dc.js/issues/612), [#636](https://github.com/dc-js/dc.js/issues/636), [#1110](https://github.com/dc-js/dc.js/issues/1110), [#1224](https://github.com/dc-js/dc.js/issues/1224), [#1226](https://github.com/dc-js/dc.js/issues/1226), [#1228](https://github.com/dc-js/dc.js/issues/1228), [#1231](https://github.com/dc-js/dc.js/issues/1231), [#1235](https://github.com/dc-js/dc.js/issues/1235))
19+
220
## 2.0.0 beta 33
321
* Use Sass 3 (SCSS) for generating CSS, by Matt Traynham ([#1049](https://github.com/dc-js/dc.js/pull/1049))
422
* Don't try to interpolate user data in label paths, by Alexander Stillesjö ([#1151](https://github.com/dc-js/dc.js/pull/1151))

Gruntfile.js

Lines changed: 38 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,25 @@ module.exports = function (grunt) {
2020
conf: config,
2121

2222
concat: {
23-
options: {
24-
process: true,
25-
sourceMap: true,
26-
banner: '<%= conf.banner %>'
27-
},
2823
js: {
2924
src: '<%= conf.jsFiles %>',
30-
dest: '<%= conf.pkg.name %>.js'
25+
dest: '<%= conf.pkg.name %>.js',
26+
options: {
27+
process: true,
28+
sourceMap: true,
29+
banner: '<%= conf.banner %>'
30+
}
31+
},
32+
welcome: {
33+
src: ['docs/welcome.base.md', 'web/img/class-hierarchy.svg'],
34+
dest: 'welcome.md',
35+
options: {
36+
process: function (src, filepath) {
37+
return /svg/.test(filepath) ?
38+
src.split('\n').slice(5).join('\n') :
39+
src;
40+
}
41+
}
3142
}
3243
},
3344
sass: {
@@ -242,13 +253,14 @@ module.exports = function (grunt) {
242253
},
243254
docco: {
244255
options: {
245-
dst: '<%= conf.web %>/docs',
246-
basepath: '<%= conf.web %>'
256+
dst: '<%= conf.web %>/docs'
247257
},
248258
howto: {
249259
files: [
250260
{
251-
src: ['<%= conf.web %>/stock.js']
261+
expand: true,
262+
cwd: '<%= conf.web %>',
263+
src: ['stock.js']
252264
}
253265
]
254266
}
@@ -322,6 +334,20 @@ module.exports = function (grunt) {
322334
files: [
323335
{dest: '<%= conf.web %>/resizing/index.html', src: ['<%= conf.web %>/resizing/*.html']}
324336
]
337+
},
338+
'zoom-listing': {
339+
options: {
340+
format: formatFileList,
341+
absolute: true,
342+
title: 'Index of dc.js zoom tests',
343+
heading: 'Interactive test for dc.js chart zoom',
344+
description: 'It\'s hard to conceive of a way to test zoom except by trying it. ' +
345+
'So this is a substitute for automated tests in this area',
346+
sourceLink: 'https://github.com/dc-js/dc.js/tree/master/<%= conf.web %>/zoom'
347+
},
348+
files: [
349+
{dest: '<%= conf.web %>/zoom/index.html', src: ['<%= conf.web %>/zoom/*.html']}
350+
]
325351
}
326352
},
327353

@@ -358,6 +384,9 @@ module.exports = function (grunt) {
358384
hooks: {
359385
command: 'cp -n scripts/pre-commit.sh .git/hooks/pre-commit' +
360386
' || echo \'Cowardly refusing to overwrite your existing git pre-commit hook.\''
387+
},
388+
hierarchy: {
389+
command: 'dot -Tsvg -o web/img/class-hierarchy.svg class-hierarchy.dot'
361390
}
362391
},
363392
browserify: {

README.md

Lines changed: 28 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,39 @@
77
dc.js
88
=====
99

10-
Dimensional charting built to work natively with crossfilter rendered using d3.js. Check out the
11-
[example page](http://dc-js.github.com/dc.js/) with a quick five minutes how to guide. For a
12-
detailed [API reference](https://github.com/dc-js/dc.js/blob/master/web/docs/api-1.6.0.md) and
13-
more please visit the [Wiki](https://github.com/dc-js/dc.js/wiki).
10+
Dimensional charting built to work natively with [crossfilter](http://crossfilter.github.io/crossfilter/)
11+
rendered using [d3.js](https://d3js.org/). In dc.js, each chart displays an aggregation of some
12+
attributes through the position, size, and color of its elements, and also presents a dimension
13+
which can be filtered. When the filter or brush changes, all other charts are updated dynamically,
14+
using animated transitions.
1415

16+
Check out the [example page](http://dc-js.github.com/dc.js/)
17+
and its [annotated source](http://dc-js.github.io/dc.js/docs/stock.html) for a quick five minute
18+
how-to guide. The detailed [API reference is here](http://dc-js.github.io/dc.js/docs/html/)
19+
([markdown version](https://github.com/dc-js/dc.js/blob/develop/web/docs/api-latest.md)). For
20+
more examples and hints please visit the [Wiki](https://github.com/dc-js/dc.js/wiki).
21+
22+
23+
Support
24+
--------------------
25+
* [Example Site](http://dc-js.github.com/dc.js/)
26+
* [Changelog](https://github.com/dc-js/dc.js/blob/develop/Changelog.md)
27+
* [Frequently Asked Questions](https://github.com/dc-js/dc.js/wiki/FAQ) and [Wiki](https://github.com/dc-js/dc.js/wiki)
28+
* [v2.0 API Reference](http://dc-js.github.io/dc.js/docs/html/) <sup>([markdown](https://github.com/dc-js/dc.js/blob/master/web/docs/api-latest.md))</sup> <sup>([next - v2.1](https://github.com/dc-js/dc.js/blob/develop/web/docs/api-latest.md))</sup> <sup>([last - v1.7](https://github.com/dc-js/dc.js/blob/master/web/docs/api-1.7.0.md))</sup>
29+
* [dc.js on StackOverflow](http://stackoverflow.com/questions/tagged/dc.js) - ask questions and get help
30+
* [User Group](https://groups.google.com/forum/?fromgroups#!forum/dc-js-user-group) ("mailing list") - discussion and longer topics
31+
* [GitHub Issues](https://github.com/dc-js/dc.js/issues) - bug reports and feature requests
32+
33+
*Please direct questions and support requests to Stack Overflow or the user group. When posting to Stack Overflow, use the* `[dc.js]` *and/or* `[crossfilter]` *tags - other tags are likely to draw unwanted attention.*
34+
35+
Get help faster with a working example! Fork these to get started:<br>
36+
[example jsFiddle](https://jsfiddle.net/gordonwoodhull/1hbjwxzy/) - [blank jsFiddle](https://jsfiddle.net/gordonwoodhull/kk4j0bzn/) - [example bl.ock](http://blockbuilder.org/gordonwoodhull/ecce8e32d64c662cffd5) - [blank bl.ock](http://blockbuilder.org/gordonwoodhull/9ab997c9a8d7d3380364)
1537

1638
CDN location
1739
--------------------
1840
```
19-
http://cdnjs.cloudflare.com/ajax/libs/dc/1.7.5/dc.min.js
20-
http://cdnjs.cloudflare.com/ajax/libs/dc/1.7.5/dc.min.css
41+
http://cdnjs.cloudflare.com/ajax/libs/dc/2.0.0/dc.min.js
42+
http://cdnjs.cloudflare.com/ajax/libs/dc/2.0.0/dc.min.css
2143
```
2244
Please do not use github.io as a CDN unless you need the bleeding-edge features.
2345

class-hierarchy.dot

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
digraph dcHierarchy {
2+
graph [rankdir=LR, ranksep=0.5]
3+
node [fontname="sans-serif", fontsize=10, margin="0.05,0.05", href="dc.\N.html"]
4+
node [style=filled, fillcolor=lightgreen]
5+
{ node [style=filled, fillcolor=lightblue] baseMixin colorMixin marginMixin bubbleMixin coordinateGridMixin stackMixin capMixin }
6+
baseMixin [href="dc.baseMixin.html"]
7+
colorMixin -> coordinateGridMixin
8+
marginMixin -> coordinateGridMixin
9+
coordinateGridMixin -> stackMixin
10+
stackMixin -> barChart
11+
coordinateGridMixin -> boxPlot
12+
coordinateGridMixin -> bubbleChart
13+
bubbleMixin -> bubbleChart
14+
baseMixin -> bubbleMixin
15+
bubbleMixin -> bubbleOverlay
16+
coordinateGridMixin -> compositeChart
17+
baseMixin -> dataCount
18+
baseMixin -> dataGrid
19+
baseMixin -> dataTable
20+
baseMixin -> colorMixin
21+
colorMixin -> geoChoroplethChart
22+
baseMixin -> marginMixin
23+
marginMixin -> heatMap
24+
colorMixin -> heatMap
25+
stackMixin -> lineChart
26+
baseMixin -> numberDisplay
27+
colorMixin -> pieChart
28+
baseMixin -> capMixin
29+
capMixin -> pieChart
30+
capMixin -> rowChart
31+
marginMixin -> rowChart
32+
colorMixin -> rowChart
33+
coordinateGridMixin -> scatterPlot
34+
}

component.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "dc.js",
33
"repository": "dc-js/dc.js",
44
"description": "Multi-Dimensional charting built to work natively with crossfilter rendered with d3.js",
5-
"version": "2.0.0-beta.32",
5+
"version": "2.0.0",
66
"keywords": [
77
"visualization",
88
"svg",

0 commit comments

Comments
 (0)