Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork21
Closed
Description
This example gives an error, becausey1 is not explicitly set for the Area mark:
<Plotheight={300}marginLeft={60}y={{axis:null }}x={{nice:true }}fy={{domain: ['FEMALE','MALE'] }}color={{legend:true }}facet={{data:penguins,y:'sex' }}> <AreaY {...binX( {data:penguins,x:'culmen_length_mm',fill:'species',fillOpacity:'.',thresholds:'',curve:'natural', }, {y2:'count' } )} /></Plot>
Whereas it works ify1: 0 is added:
<Plotheight={300}marginLeft={60}y={{axis:null }}x={{nice:true }}fy={{domain: ['FEMALE','MALE'] }}color={{legend:true }}facet={{data:penguins,y:'sex' }}> <AreaY {...binX( {data:penguins,x:'culmen_length_mm',fill:'species',fillOpacity:'.',thresholds:'',curve:'natural',y1: 0 }, {y2:'count' } )} /></Plot>
It also works if I specifyy rather thany1:
<Plotheight={300}marginLeft={60}y={{axis:null }}x={{nice:true }}fy={{domain: ['FEMALE','MALE'] }}color={{legend:true }}facet={{data:penguins,y:'sex' }}> <AreaY {...binX( {data:penguins,x:'culmen_length_mm',fill:'species',fillOpacity:'.',thresholds:'',curve:'natural', }, {y:'count' } )} /></Plot>
In Observable Plot, setting justy2 works (as inthis example).
(this is one of the issues surfaced by#72)