Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork21
Open
Description
The Observable Plot example ofData-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:
<PlotmarginRight={0} > <RuleYdata={[0]} /> <Linedata={aapl}x="Date"y="Close" /> <GridYx={y=>aapl.find(d=>d.Close>=y)?.Date}insetLeft={-6} /> <AxisYx={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)

