Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Allow x/y shorthands for ruleY/ruleX #93

Open
Labels
enhancementNew feature or request
@jamesscottbrown

Description

@jamesscottbrown

ObservablePlot has some shorthands not present in SveltePlot:

ForruleX:

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).

ForruleY:

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 theLollipop example:

This works:

<Plotx={{label:null,tickPadding:6,tickSize:0}}y={{percent:true}} >  <RuleXdata={alphabet}x="letter"y1="frequency"strokeWidth={2} />  <Dotdata={alphabet}x="letter"y="frequency"fill="currentColor"r={4} /></Plot>

But this has lines spanning the full height of the chart:

<Plotx={{label:null,tickPadding:6,tickSize:0}}y={{percent:true}} >  <RuleXdata={alphabet}x="letter"y="frequency"strokeWidth={2} />  <Dotdata={alphabet}x="letter"y="frequency"fill="currentColor"r={4} /></Plot>

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp