Skip to content

Commit

Permalink
fix(line): Fix step line path rendering on Windows
Browse files Browse the repository at this point in the history
Remove 'shape-rendering:crispEdges' for step line to remove
rendering issue on Windows

Fix #3295
  • Loading branch information
netil committed Jul 19, 2023
1 parent 0f3ca10 commit b2633b2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
1 change: 0 additions & 1 deletion src/ChartInternal/shape/line.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,6 @@ export default {
.style("stroke", $$.color)
.merge(line)
.style("opacity", $$.initialOpacity.bind($$))
.style("shape-rendering", d => ($$.isStepType(d) ? "crispEdges" : ""))
.attr("transform", null);
},

Expand Down
4 changes: 2 additions & 2 deletions test/shape/line-spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,11 +65,11 @@ describe("SHAPE LINE", () => {
args.line.step.type = "step-after";
});

it("should have shape-rendering = crispedges when it's step chart", () => {
it("should 'shape-rendering' shouldn't be set 'crispedges' when it's step chart", () => {
chart.$.main.selectAll(`.${$LINE.line}`).each(function() {
const style = d3Select(this).style("shape-rendering").toLowerCase();

expect(style).to.be.equal("crispedges");
expect(style).to.be.equal("auto");
});
});

Expand Down

0 comments on commit b2633b2

Please sign in to comment.