Skip to content

PPTX: a column plot's value tick labels seat about 1.0pt below their native gridline centring #1869

Description

@developer0hye

Summary

A framed PowerPoint column plot's value tick labels sit about 1.0pt below where
native PowerPoint centres them on their gridlines. The offset is uniform across
the whole axis, so it is a seat, not a scale.

Measured

tests/fixtures/pptx/bar-chart.pptx repackaged as an Arial column chart by
scripts/probes/issue-1674-column-plot-face.json, 18pt value axis on the deck's
own 480 x 320pt graphic frame. Reference: the native PowerPoint 16.113.1 export
of that variant package. scripts/compare_layout.py --audit --fine-shift 0.5,
positive dy meaning our label is lower:

label 9 8 7 6 5 4 3 2 1 0
dy (pt) +0.94 +0.98 +1.02 +1.06 +1.10 +0.90 +0.94 +0.98 +1.01 +1.05

The plot rectangle itself matches to 0.003pt after #1674, and every gridline is
in the native place, so the labels are displaced against their own gridlines.
The 0.16pt spread across the ten is the 150 DPI device grid the native export
rounds each baseline to.

Before #1674 this deviation was masked: our plot was 2.5pt shorter, so the same
labels ran from -1.44pt to +3.40pt against native and read as a scale error.
With the plot rectangle native, what is left is one flat offset.

Expected

The tick label's baseline is centred on its gridline by the face's own metrics
rather than by a box ratio. [CHART_LABEL_BOX_RATIO] centres the label in a
flat 1.25x box, which cannot put the baseline where a face-measured centring
would. The same probe specs that settle the band (#1674) re-measure this without
a new fixture.

Related: #1674

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions