Skip to content

Commit

Permalink
Bumping to v0.10.3
Browse files Browse the repository at this point in the history
  • Loading branch information
Tim-Intellipharm committed Aug 26, 2015
1 parent 5c65188 commit b1b480c
Show file tree
Hide file tree
Showing 31 changed files with 224 additions and 82 deletions.
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "dc-addons",
"description": "These are additional charts that extend dc.js",
"version": "0.10.2",
"version": "0.10.3",
"homepage": "https://github.com/intellipharm/dc-addons",
"repository": {
"type": "git",
Expand Down
4 changes: 2 additions & 2 deletions dist/angular/angular-dc.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*!
* dc-addons v0.10.2
* dc-addons v0.10.3
*
* 2015-08-20 16:06:36
* 2015-08-26 14:19:42
*
*/
(function () {
Expand Down
4 changes: 2 additions & 2 deletions dist/angular/angular-dc.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions dist/bubble-cloud/dc-bubble-cloud.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*!
* dc-addons v0.10.2
* dc-addons v0.10.3
*
* 2015-08-20 16:06:36
* 2015-08-26 14:19:42
*
*/
// Code copied and changed from https://github.com/vlandham/gates_bubbles
Expand Down
4 changes: 2 additions & 2 deletions dist/bubble-cloud/dc-bubble-cloud.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions dist/crossfilter-server/crossfilter-server.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*!
* dc-addons v0.10.2
* dc-addons v0.10.3
*
* 2015-08-20 16:06:36
* 2015-08-26 14:19:42
*
*/
(function () {
Expand Down
4 changes: 2 additions & 2 deletions dist/crossfilter-server/crossfilter-server.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

88 changes: 80 additions & 8 deletions dist/dc-addons.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*!
* dc-addons v0.10.2
* dc-addons v0.10.3
*
* 2015-08-20 16:06:36
* 2015-08-26 14:19:42
*
*/
dc.utils.getAllFilters = function () {
Expand Down Expand Up @@ -1354,6 +1354,33 @@ dc.utils.getAllFilters = function () {
(function () {
'use strict';

/**
## Paired Row Chart
Includes: [Cap Mixin](#cap-mixin), [Margin Mixin](#margin-mixin), [Color Mixin](#color-mixin), [Base Mixin](#base-mixin)
Concrete paired row chart implementation.
#### dc.pairedRowChart(parent[, chartGroup])
Create a paired row chart instance and attach it to the given parent element.
Parameters:
* parent : string | node | selection - any valid
[d3 single selector](https://github.com/mbostock/d3/wiki/Selections#selecting-elements) specifying
a dom block element such as a div; or a dom element or d3 selection.
* chartGroup : string (optional) - name of the chart group this chart instance should be placed in.
Interaction with a chart will only trigger events and redraws within the chart's group.
Returns:
A newly created paired row chart instance
```js
// create a paired row chart under #chart-container1 element using the default global chart group
var chart1 = dc.pairedRowChart('#chart-container1');
// create a paired row chart under #chart-container2 element using chart group A
var chart2 = dc.pairedRowChart('#chart-container2', 'chartGroupA');
```
**/
dc.pairedRowChart = function (parent, chartGroup) {
var _chart = dc.capMixin(dc.marginMixin(dc.colorMixin(dc.baseMixin({}))));

Expand Down Expand Up @@ -1462,9 +1489,9 @@ dc.utils.getAllFilters = function () {
});
};

// margins
// the margins between the charts need to be set to 0 so that they sit together
// width and margins

// the margins between the charts need to be set to 0 so that they sit together
var _margins = _chart.margins(); // get the default margins

_chart.margins = function (_) {
Expand Down Expand Up @@ -1494,15 +1521,52 @@ dc.utils.getAllFilters = function () {

_chart.margins(_margins); // set the new margins

// the width needs to be halved
var _width = 0; // get the default width

_chart.width = function (_) {
if (!arguments.length) {
return _width;
}
_width = _;

// set left chart width
_leftChart.width(dc.utils.isNumber(_) ? _ / 2 : _);

// set right chart width
_rightChart.width(dc.utils.isNumber(_) ? _ / 2 : _);

return _chart;
};

// the minWidth needs to be halved
var _minWidth = _chart.minWidth(); // get the default minWidth

_chart.minWidth = function (_) {
if (!arguments.length) {
return _minWidth;
}
_minWidth = _;

// set left chart minWidth
_leftChart.minWidth(dc.utils.isNumber(_) ? _ / 2 : _);

// set right chart minWidth
_rightChart.minWidth(dc.utils.isNumber(_) ? _ / 2 : _);

return _chart;
};

_chart.minWidth(_minWidth); // set the new minWidth

// svg
// return an array of both the sub chart svgs

_chart.svg = function () {
return d3.selectAll([_leftChart.svg()[0][0], _rightChart.svg()[0][0]]);
};

// data
// we need to make sure that the extent is the same for both charts
// data - we need to make sure that the extent is the same for both charts

// this way we need a new function that is overridable
if (_leftChart.calculateAxisScaleData) {
Expand Down Expand Up @@ -1530,11 +1594,20 @@ dc.utils.getAllFilters = function () {
};
}

// get the charts - mainly used for testing
_chart.leftChart = function () {
return _leftChart;
};

_chart.rightChart = function () {
return _rightChart;
};

// functions that we just want to pass on to both sub charts

var _getterSetterPassOn = [
// display
'height', 'width', 'minHeight', 'minWidth', 'renderTitleLabel', 'fixedBarHeight', 'gap', 'othersLabel',
'height', 'minHeight', 'renderTitleLabel', 'fixedBarHeight', 'gap', 'othersLabel',
'transitionDuration', 'label', 'renderLabel', 'title', 'renderTitle', 'chartGroup',
//colors
'colors', 'ordinalColors', 'linearColors', 'colorAccessor', 'colorDomain', 'getColor', 'colorCalculator',
Expand Down Expand Up @@ -1579,7 +1652,6 @@ dc.utils.getAllFilters = function () {

return _chart.anchor(parent, chartGroup);
};

})();

(function () {
Expand Down
6 changes: 3 additions & 3 deletions dist/dc-addons.min.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions dist/elastic-search/elastic-search.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*!
* dc-addons v0.10.2
* dc-addons v0.10.3
*
* 2015-08-20 16:06:36
* 2015-08-26 14:19:42
*
*/
(function () {
Expand Down
4 changes: 2 additions & 2 deletions dist/elastic-search/elastic-search.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions dist/google-map/dc-google.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*!
* dc-addons v0.10.2
* dc-addons v0.10.3
*
* 2015-08-20 16:06:36
* 2015-08-26 14:19:42
*
*/
(function () {
Expand Down
4 changes: 2 additions & 2 deletions dist/google-map/dc-google.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions dist/leaflet-map/dc-leaflet.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*!
* dc-addons v0.10.2
* dc-addons v0.10.3
*
* 2015-08-20 16:06:36
* 2015-08-26 14:19:42
*
*/
(function () {
Expand Down
Loading

0 comments on commit b1b480c

Please sign in to comment.