the map transform should respect *z* series specified as {value: z}#2272
the map transform should respect *z* series specified as {value: z}#2272
Conversation
|
The discrepancy comes from the fact that the specification The fix I pushed above fixes the situation for the map transform, but the same problem might appear in other places, and it might be better to fix it at the level of valueof. The patch in that case would be: --- a/src/options.js
+++ b/src/options.js
@@ -32,6 +32,7 @@ function isBigIntType(type) {
export const reindex = Symbol("reindex");
export function valueof(data, value, type) {
+ if (isObject(value) && value.value !== undefined) ({value} = value);
const valueType = typeof value;Both patches pass all tests, but it only means we don't have a test for other places where z might be computed separately from channels (probably in the stack transform at least … this needs a bit more work to make sure we get the whole picture and add the necessary tests). In fact, I'm wondering why we compute z separately as a valueof, and not take it from the mark's channels. |
Currently when z is specified as
stroke: {value: "series"}, it is ignored by the window (map) transform and we get the incorrect chart.