Skip to content

smarter autoheight for ordinal scales? #1239

@Fil

Description

@Fil

autoHeight with the default round:true option sometimes leaves too much white space. In the chart below it returns a value of 580, when ideally it should be 556px.

Plot.plot({
  x: {
    percent: true,
    label: "Frequency (%) →"
  },
  height: 556,
  y: {
    label: null
  },
  marks: [
    Plot.gridX({interval: 1}),
    Plot.axisX({anchor: "top"}),
    Plot.axisX({anchor: "bottom", label: null}),
    Plot.barX(alphabet, {x: "frequency", y: "letter", fill: "steelblue"}),
    Plot.ruleX([0])
  ]
})

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