Skip to content

Fixes #1419 - Adjusted X axis name label coordinate calculation when InLineNamePlacement is used - #1776

Closed
jlimauro wants to merge 1 commit into
Live-Charts:masterfrom
jlimauro:master
Closed

jlimauro wants to merge 1 commit into
Live-Charts:masterfrom
jlimauro:master

Conversation

@jlimauro

Copy link
Copy Markdown
Contributor

Adjusted X axis name label coordinate calculation when InLineNamePlacement option is used. This fixes a bug in which places axis names and labels a top each other when InLineNamePlacement option was used. This fixes for both Start and End axis positions.

These changes resolve issue: #1419

…lacement option is used. This fixes a bug in which places axis names and labels a top each other when InLineNamePlacement option was used.
@beto-rodriguez

beto-rodriguez commented Feb 17, 2025 •

Copy link
Copy Markdown
Collaborator

Hi and thanks for the fix!

I tried this long time ago, but the problem when I tested the proposed solution on #1419 it broke other cases (don't exactly remember the case), I know Unit tests pass, this means that we need stronger unit tests. I need more time to merge this fix to ensure nothing else brakes.

beto-rodriguez added a commit that referenced this pull request Apr 30, 2026
…multi

fix(axes): multi X-axis InLineNamePlacement overlap (#1419, supersedes #1776)
@beto-rodriguez

Copy link
Copy Markdown
Collaborator

Thanks for the PR.

I will close this, instead #2190 was merged, it includes your commit also.

pull Bot pushed a commit to zilo555/LiveCharts2 that referenced this pull request Apr 30, 2026
…arts#1419)

Cherry-picked from Live-Charts#1776: when InLineNamePlacement is enabled, the X axis
NameDesiredSize Y now offsets by the accumulated bs/ts of previous axes, and
bs/ts is incremented (instead of overwritten) so subsequent axes don't stack
on top of each other.

Cherry-picked unmodified to evaluate against the snapshot matrix added in the
previous commit; further corrections (if any) follow in a separate commit.
pull Bot pushed a commit to zilo555/LiveCharts2 that referenced this pull request Apr 30, 2026
Live-Charts#1419)

The previous commit (cherry-picked from Live-Charts#1776) made bs/ts accumulate per X
axis with InLineNamePlacement, but used the stacked-layout row height
(s.Height + ns.Height: name above labels). For inline placement the name and
labels share a single row of height h = max(s.Height, ns.Height), so the
accumulation should add h. Using the larger value left an empty gap below
(or above) the chart for the single-axis case and inflated the gap between
stacked axes in the multi-axis case.

Updated AxesTests_MultipleX{Start,End}_InLine snapshots to lock in the
fixed multi-axis rendering — each axis now gets its own row of name+labels
without overlap.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
pm-kuerten pushed a commit to pm-kuerten/LiveCharts2 that referenced this pull request Jul 6, 2026
…xis-inline-multi

fix(axes): multi X-axis InLineNamePlacement overlap (Live-Charts#1419, supersedes Live-Charts#1776)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants