Repository navigation
Description
Problem
Converting a PowerPoint chart with a missing data point can silently attach a later value to the wrong category. This makes Markdown extracted from course slides unreliable as knowledge-base input.
Reproduction
On AnyDoc 0.2.4 at current main e7178e0, generate a valid slide with PptxGenJS using the following script:
const PptxGenJS = require("pptxgenjs");
const deck = new PptxGenJS();
const slide = deck.addSlide();
const actual = [12];
actual[2] = 27;
const labels = ["Week 1", "Week 2", "Week 3"];
slide.addChart(deck.ChartType.bar, [
{ name: "Actual", labels, values: actual },
{ name: "Target", labels, values: [10, 20, 30] },
], { x: 0.5, y: 0.5, w: 8, h: 4 });
deck.writeFile({ fileName: "sparse.pptx" });Convert sparse.pptx using AnyDoc. The actual series in ppt/charts/chart1.xml has c:pt idx="0" with value 12 and c:pt idx="2" with value 27. There is no point at index 1.
| Category | Actual result | Expected result |
|---|---|---|
| Week 1 | 12 | 12 |
| Week 2 | 27 | empty |
| Week 3 | empty | 27 |
The fully populated Target series (10, 20, 30) remains correct.
Diagnosis
chart_blocks collects numeric cache values into a dense vector and looks them up by category row position. Looking up the value by its c:pt idx preserves gaps. I reproduced the shift on the actual slide and with a failing regression, then verified the local fix against the same input. I plan to submit the focused patch.
Downstream impact verified
Tencent/WeKnora main at e3fb2335bf3f8cadd32142380c60b2677a27bf99 pins AnyDoc v0.2.4. The tagged AnyDoc converter reproduced the same shifted rows. I passed its actual Markdown output and the patched output into WeKnora's HTML-table normalization and both single-level and parent-child chunking. The v0.2.4 output preserved the wrong Week 2 value in the text returned by EmbeddingContent, while the patched output preserved the correct empty Week 2 and Week 3 value 27. This was a local converter-to-chunker probe. It did not run WeKnora's native CGo binding or a live embedding/index backend.
Missing category labels
A second schema-validated PptxGenJS sample omits category index 1 while retaining the numeric points 0, 1 and 2. It uses multiLvlStrCache with one level, despite having a flat axis. The previous local patch still displayed Week 3 as 20 and dropped 27. With category and numeric indices aligned, the same file produces Week 1 = 12, an unlabeled row = 20, and Week 3 = 27. The numeric-gap sample still keeps Week 2 empty and Week 3 = 27. The patch retains upper-level labels in the flattened Markdown view without attaching numeric values to those labels.
Activity
[-]PPTX chart values shift to the wrong categories when the numeric cache has gaps[/-][+]PPTX chart values shift when the category or numeric cache has gaps[/+]Yzzz88 commentedon Nov 7, 2026
I reproduced the downstream impact with two synthetic PPTX files and independently built converters. The control was AnyDoc v0.2.4 (
42bf1c5), the version pinned by WeKnora. The patched converter was built from this issue's local fix one7178e0.At WeKnora main
e3fb2335, I ran the actual normalization and both chunking modes, then inspected the text intended for embedding. Both modes preserved these outcomes:The actual
read_documenttool and model-result renderer showed the same difference for the queryWeek 3using an in-memory chunk repository. This exercise did not use a deployed WeKnora instance, a vector database, or a model call.