You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The area mark has three constructors: [areaY](#areaY) for when the baseline and topline share *x* values, as in a time-series area chart where time goes right→ (or ←left); [areaX](#areaX) for when the baseline and topline share *y* values, as in a time-series area chart where time goes up↑ (or down↓); and lastly the rarely-used [area](#area) where the baseline and topline share neither *x* nor *y* values.
22
22
23
-
The area mark is often paired with a [line](./line.md) and [rule](./rule.md) mark to accentuate the topline and baseline.
23
+
The area mark is often paired with a [rule](./rule.md)to accentuate the baseline, and the [**line** option](#area-options)to accentuate the topline.
@@ -300,7 +296,7 @@ Points along the baseline and topline are connected in input order. Likewise, if
300
296
301
297
The area mark supports [curve options](../features/curves.md) to control interpolation between points. If any of the **x1**, **y1**, **x2**, or **y2** values are invalid (undefined, null, or NaN), the baseline and topline will be interrupted, resulting in a break that divides the area shape into multiple segments. (See [d3-shape’s *area*.defined](https://d3js.org/d3-shape/area#area_defined) for more.) If an area segment consists of only a single point, it may appear invisible unless rendered with rounded or square line caps. In addition, some curves such as *cardinal-open* only render a visible segment if it contains multiple points.
302
298
303
-
The **line** option <VersionBadgepr="2133" /> (boolean, defaults to false) indicates whether the mark should draw a line connecting the points with coordinates **x2** and **y2** (the “top of the area”). In that case, the **stroke**attribute defaults to *currentColor* and is applied to the line only, as well as the stroke opacity. The line uses the same **curve** as the area.
299
+
The **line** option <VersionBadgepr=”2133” /> (boolean, defaults to false) draws a line on the area along the topline (**x2**, **y2**). The **stroke** defaults to *currentColor*, the **strokeWidth**to 1.5, and both are only visible on the line (the area has no stroke); all other options apply to both.
0 commit comments