Skip to content

Commit

Permalink
Merge pull request #640 from palantir/area-line-styling
Browse files Browse the repository at this point in the history
Restore default Line Plot stylings; project() default styles
  • Loading branch information
teamdandelion committed Jul 3, 2014
2 parents 178a493 + eca6f50 commit fcb8975
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 13 deletions.
12 changes: 5 additions & 7 deletions plottable.css
Original file line number Diff line number Diff line change
Expand Up @@ -70,17 +70,15 @@ svg.plottable {
font-size: 14pt;
}

.plottable .area-renderer path.area {
stroke: none;
fill-opacity: 0.5;
}

.plottable .area-renderer path.line {
.plottable .line-renderer path.line {
fill: none;
stroke-width: 2px;
vector-effect: non-scaling-stroke;
}

.plottable .area-renderer path.area {
stroke: none;
}

.plottable .legend .toggled-off circle {
fill: #d3d3d3;
}
Expand Down
11 changes: 7 additions & 4 deletions plottable.js
Original file line number Diff line number Diff line change
Expand Up @@ -6323,10 +6323,10 @@ var Plottable;
this.classed("line-renderer", true);
this.project("stroke", function () {
return "steelblue";
});
this.project("fill", function () {
return "none";
});
}); // default
this.project("stroke-width", function () {
return "2px";
}); // default
}
Line.prototype._setup = function () {
_super.prototype._setup.call(this);
Expand Down Expand Up @@ -6390,6 +6390,9 @@ var Plottable;
this.project("fill", function () {
return "steelblue";
}); // default
this.project("fill-opacity", function () {
return 0.5;
}); // default
this.project("stroke", function () {
return "none";
}); // default
Expand Down
1 change: 1 addition & 0 deletions src/components/plots/areaPlot.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ export module Plot {
this.classed("area-renderer", true);
this.project("y0", 0, yScale); // default
this.project("fill", () => "steelblue"); // default
this.project("fill-opacity", () => 0.5); // default
this.project("stroke", () => "none"); // default
this._animators["area-reset"] = new Animator.Null();
this._animators["area"] = new Animator.Default()
Expand Down
4 changes: 2 additions & 2 deletions src/components/plots/linePlot.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ export module Plot {
constructor(dataset: any, xScale: Abstract.Scale, yScale: Abstract.Scale) {
super(dataset, xScale, yScale);
this.classed("line-renderer", true);
this.project("stroke", () => "steelblue");
this.project("fill", () => "none");
this.project("stroke", () => "steelblue"); // default
this.project("stroke-width", () => "2px"); // default
}

public _setup() {
Expand Down

0 comments on commit fcb8975

Please sign in to comment.