-
Notifications
You must be signed in to change notification settings - Fork 191
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Related #1511, the rect mark isn’t aware of the interval scale option, so this produces an empty chart:
Plot.plot({
x: { interval: 1, tickFormat: "d" },
y: { interval: 5 },
color: { type: "log" },
marks: [
Plot.rect(causes, {
x: "year",
y: "age",
fill: "mx",
tip: true
})
]
})
You need to pass the interval option to the rect mark explicitly to get the desired result:
Plot.plot({
x: { tickFormat: "d" },
color: { type: "log" },
marks: [
Plot.rect(causes, {
x: { value: "year", interval: 1 },
y: { value: "age", interval: 5 },
fill: "mx",
tip: true
})
]
})
But, since the plot options are passed to the rect mark during initialization, it should be possible to do this automatically. 🤔
I think this affects maybeIntervalK and maybeIntervalMidK: rather than exclusively creating channel transforms based on the passed-in interval option, we need a mark transform to compute the interval’d channels so that we can look at the plot options.
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request