Skip to content

Commit 8aecdd5

Browse files
committed
height: intrinsic for Safari
1 parent 69490ac commit 8aecdd5

48 files changed

Lines changed: 51 additions & 49 deletions

Some content is hidden

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

src/plot.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,9 @@ const defaultStyle = {
77
display: "block",
88
fontSize: "10px",
99
fontFamily: "sans-serif",
10-
background: "white"
10+
background: "white",
11+
height: "intrinsic",
12+
maxWidth: "100%"
1113
};
1214

1315
export function plot(options = {}) {
@@ -84,7 +86,7 @@ export function plot(options = {}) {
8486
.attr("fill", "currentColor")
8587
.attr("stroke-miterlimit", 1)
8688
.attr("text-anchor", "middle")
87-
.style("max-width", `${width}px`)
89+
.attr("width", width)
8890
.each(function() { Object.assign(this.style, defaultStyle, style); });
8991

9092
svg.append("style")

test/output/aaplCandlestick.svg

Lines changed: 1 addition & 1 deletion
Loading

test/output/aaplChangeVolume.svg

Lines changed: 1 addition & 1 deletion
Loading

test/output/aaplClose.svg

Lines changed: 1 addition & 1 deletion
Loading

test/output/aaplVolume.svg

Lines changed: 1 addition & 1 deletion
Loading

test/output/anscombeQuartet.svg

Lines changed: 1 addition & 1 deletion
Loading

test/output/ballotStatusRace.svg

Lines changed: 1 addition & 1 deletion
Loading

test/output/beckerBarley.svg

Lines changed: 1 addition & 1 deletion
Loading

test/output/carsParcoords.svg

Lines changed: 1 addition & 1 deletion
Loading

test/output/covidIhmeProjectedDeaths.svg

Lines changed: 1 addition & 1 deletion
Loading

0 commit comments

Comments
 (0)