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
Copy file name to clipboardExpand all lines: docs/marks/difference.md
+11-15Lines changed: 11 additions & 15 deletions
Original file line number
Diff line number
Diff line change
@@ -122,28 +122,24 @@ In addition to the [standard mark options](../features/marks.md#mark-options), t
122
122
***x1** - the horizontal position of the comparison; bound to the *x* scale
123
123
***y1** - the vertical position of the comparison; bound to the *y* scale
124
124
125
-
If **x1** is not specified, it defaults to **x2**. If **y1** is not specified, it defaults to **y2**— TODO that’s not right, because **y1**defaults to zero for differenceY. These defaults facilitate sharing *x* or *y* coordinates between the metric and its comparison.
125
+
If **x1** is not specified, it defaults to **x2**. If **y1** is not specified, it defaults to 0 if **x1**and **x2** are equal, and to **y2**otherwise. These defaults facilitate sharing *x* or *y* coordinates between the metric and its comparison.
126
126
127
-
TODO
127
+
The standard option for **fill** is ignored and replaced with two channels:
128
+
***positiveFill** - the color for when the metric is greater, defaults to <spanstyle="border-bottom:solid#01ab633px;">green</span>
129
+
***negativeFill** - the color for when the comparison is greater, defaults to <spanstyle="border-bottom:solid#4269d03px;">blue</span>
128
130
129
-
***fill**
130
-
***positiveFill**
131
-
***negativeFill**
132
-
***fillOpacity**
133
-
***positiveFillOpacity**
134
-
***negativeFillOpacity**
135
-
***stroke**
136
-
***strokeOpacity**
131
+
***fillOpacity** - the areas’ opacity, defaults to 1
132
+
***positiveFillOpacity** - the positive area’s opacity, defaults to *opacity*
133
+
***negativeFillOpacity** - the negative area’s opacity, defaults to *opacity*
134
+
***stroke** - the metric line’s stroke color, defaults to currentColor
135
+
***strokeOpacity** - the metric line’s opacity, defaults to 1
137
136
138
-
TODO
139
-
140
-
***z**
141
-
***clip**
137
+
These options are passed to the underlying area and line marks; in particular, when they are defined as a channel, the underlying marks are broken into contiguous overlapping segments when the values change. When any of these channels are used, setting an explicit **z** channel (possibly to null) is strongly recommended.
Returns a new difference with the given *data* and *options*. The mark is a composite mark consisting of a positive area, a negative area, and a line for the metric. The positive area extends from the bottom of the frame to the metric; it is clipped by an area extending from the comparison to the top of the frame. The negative area conversely extends from the top of the frame to the metric; it is clipped by an area extending from the comparison to the bottom of the frame.
0 commit comments