Skip to content

Commit

Permalink
Fix the automatic shape ids to clean syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
johnkiernander committed Jan 2, 2015
1 parent 2028312 commit c1a884e
Show file tree
Hide file tree
Showing 12 changed files with 28 additions and 28 deletions.
16 changes: 8 additions & 8 deletions dist/dimple.latest.js
Original file line number Diff line number Diff line change
Expand Up @@ -3403,7 +3403,7 @@
theseShapes
.enter()
.append("path")
.attr("id", function (d) { return d.key; })
.attr("id", function (d) { return dimple._createClass([d.key]); })
.attr("class", function (d) { return className + " dimple-line " + d.keyString + " " + chart.customClassList.areaSeries + " " + d.css; })
.attr("d", function (d) { return d.entry; })
.call(function () {
Expand Down Expand Up @@ -3497,7 +3497,7 @@
theseShapes
.enter()
.append("rect")
.attr("id", function (d) { return d.key; })
.attr("id", function (d) { return dimple._createClass([d.key]); })
.attr("class", function (d) {
var c = [];
c = c.concat(d.aggField);
Expand Down Expand Up @@ -3618,7 +3618,7 @@
theseShapes
.enter()
.append("circle")
.attr("id", function (d) { return d.key; })
.attr("id", function (d) { return dimple._createClass([d.key]); })
.attr("class", function (d) {
var c = [];
c = c.concat(d.aggField);
Expand Down Expand Up @@ -3846,7 +3846,7 @@
theseShapes
.enter()
.append("path")
.attr("id", function (d) { return d.key; })
.attr("id", function (d) { return dimple._createClass([d.key]); })
.attr("class", function (d) {
return className + " dimple-line " + d.keyString + " " + chart.customClassList.lineSeries + " " + d.css;
})
Expand Down Expand Up @@ -3997,7 +3997,7 @@
theseShapes
.enter()
.append("path")
.attr("id", function (d) { return d.key; })
.attr("id", function (d) { return dimple._createClass([d.key]); })
.attr("class", function (d) {
var c = [];
c = c.concat(d.aggField);
Expand Down Expand Up @@ -4070,7 +4070,7 @@
if (grad.node() === null) {
transition = false;
grad = chart._group.append("linearGradient")
.attr("id", id)
.attr("id", dimple._createClass([id]))
.attr("gradientUnits", "userSpaceOnUse")
.attr("x1", (categoryAxis.position === "x" ? categoryAxis._scale(cats[0]) + ((chart._widthPixels() / cats.length) / 2) : 0))
.attr("y1", (categoryAxis.position === "y" ? categoryAxis._scale(cats[0]) - ((chart._heightPixels() / cats.length) / 2) : 0))
Expand Down Expand Up @@ -4191,7 +4191,7 @@
shapes = markerBacks.enter().append("circle");
}
shapes
.attr("id", function (d) { return d.key + "MarkerBack"; })
.attr("id", function (d) { return dimple._createClass([d.key + " Marker Back"]); })
.attr("class", function (d) {
var fields = [];
if (series.x._hasCategories()) {
Expand Down Expand Up @@ -4261,7 +4261,7 @@
}
shapes
.attr("id", function (d) {
return d.key + "Marker";
return dimple._createClass([d.key + " Marker"]);
})
.attr("class", function (d) {
var fields = [],
Expand Down
4 changes: 2 additions & 2 deletions dist/dimple.latest.min.js

Large diffs are not rendered by default.

16 changes: 8 additions & 8 deletions dist/dimple.v2.1.3.js
Original file line number Diff line number Diff line change
Expand Up @@ -3403,7 +3403,7 @@
theseShapes
.enter()
.append("path")
.attr("id", function (d) { return d.key; })
.attr("id", function (d) { return dimple._createClass([d.key]); })
.attr("class", function (d) { return className + " dimple-line " + d.keyString + " " + chart.customClassList.areaSeries + " " + d.css; })
.attr("d", function (d) { return d.entry; })
.call(function () {
Expand Down Expand Up @@ -3497,7 +3497,7 @@
theseShapes
.enter()
.append("rect")
.attr("id", function (d) { return d.key; })
.attr("id", function (d) { return dimple._createClass([d.key]); })
.attr("class", function (d) {
var c = [];
c = c.concat(d.aggField);
Expand Down Expand Up @@ -3618,7 +3618,7 @@
theseShapes
.enter()
.append("circle")
.attr("id", function (d) { return d.key; })
.attr("id", function (d) { return dimple._createClass([d.key]); })
.attr("class", function (d) {
var c = [];
c = c.concat(d.aggField);
Expand Down Expand Up @@ -3846,7 +3846,7 @@
theseShapes
.enter()
.append("path")
.attr("id", function (d) { return d.key; })
.attr("id", function (d) { return dimple._createClass([d.key]); })
.attr("class", function (d) {
return className + " dimple-line " + d.keyString + " " + chart.customClassList.lineSeries + " " + d.css;
})
Expand Down Expand Up @@ -3997,7 +3997,7 @@
theseShapes
.enter()
.append("path")
.attr("id", function (d) { return d.key; })
.attr("id", function (d) { return dimple._createClass([d.key]); })
.attr("class", function (d) {
var c = [];
c = c.concat(d.aggField);
Expand Down Expand Up @@ -4070,7 +4070,7 @@
if (grad.node() === null) {
transition = false;
grad = chart._group.append("linearGradient")
.attr("id", id)
.attr("id", dimple._createClass([id]))
.attr("gradientUnits", "userSpaceOnUse")
.attr("x1", (categoryAxis.position === "x" ? categoryAxis._scale(cats[0]) + ((chart._widthPixels() / cats.length) / 2) : 0))
.attr("y1", (categoryAxis.position === "y" ? categoryAxis._scale(cats[0]) - ((chart._heightPixels() / cats.length) / 2) : 0))
Expand Down Expand Up @@ -4191,7 +4191,7 @@
shapes = markerBacks.enter().append("circle");
}
shapes
.attr("id", function (d) { return d.key + "MarkerBack"; })
.attr("id", function (d) { return dimple._createClass([d.key + " Marker Back"]); })
.attr("class", function (d) {
var fields = [];
if (series.x._hasCategories()) {
Expand Down Expand Up @@ -4261,7 +4261,7 @@
}
shapes
.attr("id", function (d) {
return d.key + "Marker";
return dimple._createClass([d.key + " Marker"]);
})
.attr("class", function (d) {
var fields = [],
Expand Down
4 changes: 2 additions & 2 deletions dist/dimple.v2.1.3.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/methods/_addGradient.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
if (grad.node() === null) {
transition = false;
grad = chart._group.append("linearGradient")
.attr("id", id)
.attr("id", dimple._createClass([id]))
.attr("gradientUnits", "userSpaceOnUse")
.attr("x1", (categoryAxis.position === "x" ? categoryAxis._scale(cats[0]) + ((chart._widthPixels() / cats.length) / 2) : 0))
.attr("y1", (categoryAxis.position === "y" ? categoryAxis._scale(cats[0]) - ((chart._heightPixels() / cats.length) / 2) : 0))
Expand Down
2 changes: 1 addition & 1 deletion src/methods/_drawMarkerBacks.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
shapes = markerBacks.enter().append("circle");
}
shapes
.attr("id", function (d) { return d.key + "MarkerBack"; })
.attr("id", function (d) { return dimple._createClass([d.key + " Marker Back"]); })
.attr("class", function (d) {
var fields = [];
if (series.x._hasCategories()) {
Expand Down
2 changes: 1 addition & 1 deletion src/methods/_drawMarkers.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
}
shapes
.attr("id", function (d) {
return d.key + "Marker";
return dimple._createClass([d.key + " Marker"]);
})
.attr("class", function (d) {
var fields = [],
Expand Down
2 changes: 1 addition & 1 deletion src/objects/plot/area.js
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,7 @@
theseShapes
.enter()
.append("path")
.attr("id", function (d) { return d.key; })
.attr("id", function (d) { return dimple._createClass([d.key]); })
.attr("class", function (d) { return className + " dimple-line " + d.keyString + " " + chart.customClassList.areaSeries + " " + d.css; })
.attr("d", function (d) { return d.entry; })
.call(function () {
Expand Down
2 changes: 1 addition & 1 deletion src/objects/plot/bar.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
theseShapes
.enter()
.append("rect")
.attr("id", function (d) { return d.key; })
.attr("id", function (d) { return dimple._createClass([d.key]); })
.attr("class", function (d) {
var c = [];
c = c.concat(d.aggField);
Expand Down
2 changes: 1 addition & 1 deletion src/objects/plot/bubble.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
theseShapes
.enter()
.append("circle")
.attr("id", function (d) { return d.key; })
.attr("id", function (d) { return dimple._createClass([d.key]); })
.attr("class", function (d) {
var c = [];
c = c.concat(d.aggField);
Expand Down
2 changes: 1 addition & 1 deletion src/objects/plot/line.js
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@
theseShapes
.enter()
.append("path")
.attr("id", function (d) { return d.key; })
.attr("id", function (d) { return dimple._createClass([d.key]); })
.attr("class", function (d) {
return className + " dimple-line " + d.keyString + " " + chart.customClassList.lineSeries + " " + d.css;
})
Expand Down
2 changes: 1 addition & 1 deletion src/objects/plot/pie.js
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@
theseShapes
.enter()
.append("path")
.attr("id", function (d) { return d.key; })
.attr("id", function (d) { return dimple._createClass([d.key]); })
.attr("class", function (d) {
var c = [];
c = c.concat(d.aggField);
Expand Down

0 comments on commit c1a884e

Please sign in to comment.