-
-
Notifications
You must be signed in to change notification settings - Fork 13
Open
Labels
enhancementNew feature or requestNew feature or request
Description
The Observable Plot example of Data-based axis does not work in SveltePlot:
Plot.plot({
marginRight: 0,
marks: [
Plot.ruleY([0]),
Plot.line(aapl, {x: "Date", y: "Close"}),
Plot.gridY({x: (y) => aapl.find((d) => d.Close >= y)?.Date, insetLeft: -6}),
Plot.axisY({x: (y) => aapl.find((d) => d.Close >= y)?.Date, insetLeft: -6, textStroke: "var(--vp-c-bg)"})
]
})
The direct translation to SveltePlot:
<Plot marginRight={0} >
<RuleY data={[0]} />
<Line data={aapl} x="Date" y="Close" />
<GridY
x={y => aapl.find(d => d.Close >= y)?.Date}
insetLeft={-6}
/>
<AxisY
x={y => aapl.find(d => d.Close >= y)?.Date}
insetLeft={-6}
textStroke="var(--vp-c-bg)"
/>
</Plot>
(This is one of the issues surfaced by #72)
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request