Mermaid pie chart legend text truncated in whiteboard rendering
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 17.3k
- Forks
- 1.4k
- Avg merge
- 2d 4h
- Merged PRs (30d)
- 105
Description
Description
When a mermaid pie chart is inserted into a Feishu docx document (via lark-cli docs +create or docs +update), the chart is rendered as a whiteboard (block_type 43). The legend area on the right side of the pie chart has a fixed width, causing legend labels to be truncated and wrap awkwardly.
Steps to Reproduce
- Create a Feishu doc with a mermaid pie chart:
lark-cli docs +create --api-version v1 --as bot \
--wiki-node "<node>" \
--title "Test Pie Chart" \
--markdown @test.md
Where test.md contains:
```mermaid
pie title Category Distribution (49 valid tickets)
"Troubleshooting (25)" : 25
"咨询 (9)" : 9
"Account&Org (5)" : 5
"Verification (5)" : 5
"Duplicate (3)" : 3
"Billing (2)" : 2
```
- View the generated whiteboard in Feishu web UI.
Expected Behavior
Legend labels should be fully visible without truncation. The legend area width should adapt to the longest label, or the whiteboard should support configurable dimensions.
Actual Behavior
Legend labels are truncated and wrap to the next line. For example:
Troubleshootingwraps so(25)appears on a separate lineAccount&Orgwraps so(5)is cut off- Mixed Chinese/English labels are particularly affected
Screenshot:
The whiteboard block (type 43) has only align and token fields — no size or layout configuration is exposed.
Environment
- lark-cli version: 1.0.46
- Platform: macOS (darwin)
- Feishu doc type: docx (wiki page)
Suggestion
- Auto-size the whiteboard/legend area based on label length
- Or expose a
width/heightattribute on the board block so users can control rendering dimensions - Or allow mermaid pie chart
%%{init: {'theme': ...}}%%directives to influence legend layout
🤖 Generated with Claude Code
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the documented lark-cli docs +create and docs +update reproduction using the supplied Mermaid pie chart, then trace how it becomes a Feishu whiteboard block of type 43. Check whether the CLI can control the legend or block dimensions; done means legend labels are fully visible or the limitation and supported control are clearly established.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 38/100