Description
ObservablePlot has some shorthands not present in SveltePlot:
If y is specified, it is shorthand for y2 with y1 equal to zero; this is the typical configuration for a vertical lollipop chart with rules aligned at y = 0. If y1 is not specified, the rule will start at the top of the plot (or facet). If y2 is not specified, the rule will end at the bottom of the plot (or facet).
If x is specified, it is shorthand for x2 with x1 equal to zero; this is the typical configuration for a horizontal lollipop chart with rules aligned at x = 0. If x1 is not specified, the rule will start at the left edge of the plot (or facet). If x2 is not specified, the rule will end at the right edge of the plot (or facet).
This was surfaced by #72, and affects the Lollipop example:
This works:
<Plot x={{ label: null, tickPadding: 6, tickSize: 0}} y={{ percent: true}} >
<RuleX data={alphabet} x="letter" y1="frequency" strokeWidth={2} />
<Dot data={alphabet} x="letter" y="frequency" fill="currentColor" r={4} />
</Plot>
But this has lines spanning the full height of the chart:
<Plot x={{ label: null, tickPadding: 6, tickSize: 0}} y={{ percent: true}} >
<RuleX data={alphabet} x="letter" y="frequency" strokeWidth={2} />
<Dot data={alphabet} x="letter" y="frequency" fill="currentColor" r={4} />
</Plot>