Skip to content

ComboBox - Vertical ComboBox as Y-Axis Label: Rotation Impacts List Parent Width #954

@veillette

Description

@veillette

I'm attempting to use a ComboBox in place of an axis label. This would remove some redundancy on my graph:

Image

This works as expected for the horizontal axis. My challenge is implementing this for the vertical axis, which requires rotating the ComboBox by - pi / 2 radians

I've applied the rotation using the following:

const yComboBox = new ComboBox(this.yPropertyProperty, yItems, listParent, {
  rotation: -Math.PI / 2,
});
Image

The ComboBox itself rotates correctly. The list parent (which manages the dropdown menu) remains horizontal (which is what we want) , but its width appears to be incorrectly calculated based on the rotated ComboBox's width. This suggests the bounding box calculation for the list parent isn't accounting for the rotation correctly, leading to layout issues (because it was never intended to be used that way).

This appears to be an uncommon use case, but since the rotation is nearly functional, it seems like a small fix could enable vertical ComboBoxes.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions