Open
Description
The ObservablePlot Overlapping histogram example is:
Plot.plot({
round: true,
color: {legend: true},
marks: [
Plot.rectY(olympians, Plot.binX({y1: "count"}, {x: "weight", fill: "sex", mixBlendMode: "multiply"})),
Plot.ruleY([0])
]
})
The rendered chart is unaffected by changing {y1: "count"}
to {y2: "count"}
(but changing it to {y: "count"}
causes rectY
to apply an implicit stackY
transform).
The SveltePlot equivalent is:
<Plot y={{ grid: true }} color={{ legend: true }}>
<RectY
{...binX(
{ data: olympians, x: 'weight', fill: 'sex' },
{
y: 'count'
}
)} />
<RuleY data={[0]} />
</Plot>
which renders like:
Changing to y1: 'count'
makes it match the apeparance of the ObservablePlot plot:
I wanted to flag this discrepancy, but my first thought is that what SveltePlot does might be more reasonable.
(this is one of the issues surfaced by #72)
Metadata
Metadata
Assignees
Labels
No labels