Skip to content

[Bug] vtkScalarBarActor tick alignment and color bar border issue after v31.2.0 #3346

@galuszkm

Description

@galuszkm

Bug description

In vtk.js releases later than v31.2.0, I have observed that the vtkScalarBarActor no longer aligns the ticks correctly with the color bar borders. Specifically:

  • The ticks are offset from the color bar borders.
  • The top and bottom segments of the color bar are visibly smaller than the middle segments.
  • This visual inconsistency was not present in v31.2.0.

I compared the vtkScalarBarActor code between v31.2.0 and later versions but did not notice any obvious code changes that would directly cause this issue.

Steps to reproduce

  1. Render a vtkScalarBarActor using vtkLookupTable with number of colors 9 in a version later than 31.2.0.
  2. Compare the tick alignment and segment sizing to the same setup in v31.2.0.

Detailed Behavior

Below is a visual comparison between v31.2.0 and versions after 31.2.0

  • Left: v31.2.0 (ticks and color bar segments properly aligned)
  • Right: >v31.2.0 (ticks misaligned, top/bottom segments smaller)
Image

Expected Behavior

  • Ticks are aligned with color bar borders.
  • All color segments with the same size.

Environment

  • vtk.js version: 31.2.0 and >31.2.0
  • Browsers: All
  • OS: All

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions