Skip to content

[Bug] pptx: axismin/axismax/axisnumfmt on an /axis[@role=value2] path change the primary value axis #503

Closed

Description

@daan-finster

Versions: 1.0.146 and 1.0.157 (latest), macOS arm64.

Repro

officecli create repro.pptx
officecli add repro.pptx / --type slide
officecli add repro.pptx '/slide[1]' --type chart --prop chartType=combo --prop categories=A,B,C,D \
  --prop series1.name=Revenue --prop series1.values=437,311,242,160 \
  --prop series2.name=Growth --prop series2.values=9.2,6.1,-3.4,4.8 \
  --prop combotypes=column,line --prop secondaryaxis=2
officecli set repro.pptx '/slide[1]/chart[1]/axis[@role=value2]' --prop axismin=-30 --prop axismax=12 --prop 'axisnumfmt=0.0"%"'
officecli get repro.pptx '/slide[1]/chart[1]/axis[@role=value]'
officecli get repro.pptx '/slide[1]/chart[1]/axis[@role=value2]'

Actual: the set reports success, but the bounds and format land on the primary value axis. The value2 axis the path addresses is unchanged.

Updated /slide[1]/chart[1]/axis[@role=value2]: axismin=-30, axismax=12, axisnumfmt=0.0"%"
/slide[1]/chart[1]/axis[@role=value] (axis) role=value visible=true min=-30 max=12 format=0.0"%" ...
/slide[1]/chart[1]/axis[@role=value2] (axis) role=value2 visible=true majorGridlines=false ...

The axis path's own names work as expected: --prop min=-30 --prop max=12 --prop 'format=0.0"%"' on the same path sets the value2 axis. axistitle on the same path also reaches the value2 axis.

Expected: on an /axis[@role=...] path, axismin, axismax and axisnumfmt (and its axisnumberformat alias) apply to the axis the path addresses, like min, max and format. If they aren't supported on an axis path, an UNSUPPORTED props warning instead of a silent change to another axis.

Notes

  • The chart help describes these props as shortcuts for /chart[N]/axis[@role=...] min, max and format, so it's natural to use them on an axis path. On a dual-axis chart, the result rescales the bars to the line's units and gives them the line's format, which breaks the chart.
  • Our workaround: on an axis path, we rename axismin, axismax and axisnumfmt to min, max and format before sending the command.

Activity

  1. argszero commented on Oct 14, 2026

    @argszero
    Contributor

    I'd like to work on this. I reproduced it on main (fb98e59) exactly as described — the set reports success on the role=value2 path while the bounds and format land on the primary value axis — and I have a fix with the arm matrix measured. PR coming shortly.

    Two things the repro confirmed beyond the report, for whoever reviews it:

    • axisnumberformat (the other declared alias of axisnumfmt) has the same defect, so both spellings need the branch.
    • The aliases also mis-target on the category path: --prop axismin=… --prop axismax=… --prop axisnumfmt=… on /axis[@role=category] writes the primary value axis, while the same path's own names min/max/format write the category axis.
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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions