Repository navigation
A Table chart is as tall as its rows, and a bar chart grows with its bars - #507
Open
namedgraph wants to merge 2 commits into
Open
namedgraph wants to merge 2 commits into
namedgraph wants to merge 2 commits into
Conversation
…bars Every chart was drawn 400px tall: by .chart-canvas in ldh.css and again by the height ldh:RenderChart handed ac:draw-chart, whatever the chart type. A Table of three rows stretched them to fill 400px and cut a long one off. A bar chart draws its categories down the side, and once they no longer fit Google Charts skips every other label. ldh:RenderChart passes no height for a Table, and for a bar chart max(400, 120 + 30 per row); the other charts keep 400. The canvas holds 400px as a min-height while it loads instead of a fixed height, so the drawing sets it, and a canvas holding a table has none. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…eight # Conflicts: # CHANGELOG.md
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The bug
Every chart was drawn 400px tall, twice over:
.chart-canvas { height: 400px }inldh.css, andheight = 400passed byldh:RenderCharttoac:draw-chartfor every chart type, Table included.The fix
ldh:RenderChart(client/block/chart.xsl) passes no height forac:Table,max(400, 120 + 30 × rows)forac:BarChart, and 400 for the other charts as before..chart-canvasholds 400px as amin-heightwhile it loads instead of a fixedheight, so the drawing sets the height; a canvas holding a Google table has no minimum, as the empty state already had none.Tests
New
specs/document/blocks/chart/size.spec.mjs(owner), each test seeding its own document:Not run locally: the dev stack's preflight fails before any spec (it publishes the fixture package registry to
packages.localhost:4443, which onlytests/http/config/dataspaces.trigdeclares). Left to CI.🤖 Generated with Claude Code