[PPTX] Combination charts mislabel and drop data from later plots
Maintainer thường phản hồi trong vòng 1 ngày
@shoutoutuoadi325 đang làm issue này rồi.
Từ ngày 6/11/2026.
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 35/100
Hướng nghiên cứu
Start by locating the PPTX chart conversion code that reads categories from chart.plots[0] and series from the whole chart. Reproduce the issue with the script in the report, then trace how category labels and bounds are applied to each series. Done means all values retain their own category sequence, including March; an open pull request is already linked.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
What happened
MarkItDown mislabels values and drops points when converting a PPTX combination chart whose plots have different category sequences. A column plot with Orders for January and February and a line plot with Revenue for February, January, and March produce this table:
| Category | Orders | Revenue |
|---|---|---|
| January | 10.0 | 100.0 |
| February | 20.0 | 200.0 |
The Revenue values for January and February are swapped, and the March value (300) disappears.
Expected behavior
Orders should stay paired with January (10) and February (20). Revenue should stay paired with February (100), January (200), and March (300), in that order. Separate tables can preserve both category sequences.
Reproduction
Run the script below with the dependencies from pip install 'markitdown[pptx]', then run markitdown combo.pptx.
Script to generate the presentation
import io
from pathlib import Path
from zipfile import ZipFile
from pptx import Presentation
from pptx.chart.data import CategoryChartData
from pptx.enum.chart import XL_CHART_TYPE
from pptx.oxml import parse_xml
from pptx.util import Inches
from xlsxwriter import Workbook
def _build_combo_chart_presentation(line_categories: list[str]) -> io.BytesIO:
# python-pptx cannot create combo charts. Generate the chart and its data
# workbook with XlsxWriter, then insert them into the PowerPoint package.
workbook_stream = io.BytesIO()
with Workbook(workbook_stream) as workbook:
sheet = workbook.add_worksheet("Data")
sheet.write_column("A2", ["January", "February"])
sheet.write_column("B1", ["Orders", 10, 20])
sheet.write_column("C2", line_categories)
sheet.write_column(
"D1", ["Revenue", *(100 * i for i in range(1, len(line_categories) + 1))]
)
columns = workbook.add_chart({"type": "column"})
columns.add_series(
{
"name": "=Data!$B$1",
"categories": "=Data!$A$2:$A$3",
"values": "=Data!$B$2:$B$3",
}
)
line = workbook.add_chart({"type": "line"})
end_row = len(line_categories) + 1
line.add_series(
{
"name": "=Data!$D$1",
"categories": f"=Data!$C$2:$C${end_row}",
"values": f"=Data!$D$2:$D${end_row}",
"y2_axis": True,
}
)
columns.combine(line)
sheet.insert_chart("F1", columns)
presentation = Presentation()
slide = presentation.slides.add_slide(presentation.slide_layouts[6])
placeholder = CategoryChartData()
placeholder.categories = ["Placeholder"]
placeholder.add_series("Placeholder", [0])
chart = slide.shapes.add_chart(
XL_CHART_TYPE.COLUMN_CLUSTERED, 0, 0, Inches(6), Inches(4), placeholder
).chart
with ZipFile(workbook_stream) as archive:
combined = parse_xml(archive.read("xl/charts/chart1.xml"))
chart_xml = chart._element.chart
chart_xml.replace(chart_xml.plotArea, combined.chart.plotArea)
chart.part.chart_workbook.update_from_xlsx_blob(workbook_stream.getvalue())
stream = io.BytesIO()
presentation.save(stream)
stream.seek(0)
return stream
Path("combo.pptx").write_bytes(
_build_combo_chart_presentation(["February", "January", "March"]).getvalue()
)
Reproduced on main at 7482c092d9c0074a89803c9fdb63a969e7fe17fc (MarkItDown 0.1.9), Python 3.12.14, and python-pptx 1.0.2. The converter reads categories from chart.plots[0] but takes series from the entire chart. It uses the first plot's categories to label and bound every series.
- Ngôn ngữ chính
- Python
- Star
- 198k
- Fork
- 15k
- Merge trung bình
- 2 giờ 16 phút
- Pull request đã merge (30 ngày)
- 9
Chuẩn bị môi trường
Khởi chạy dev container của dự án ngay trên trình duyệt, bằng tài khoản GitHub của bạn.
- Có Dockerfile hoặc tệp Docker Compose
- Không có mẫu pull request
- Không có hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của microsoft/markitdown
-
IpynbConverter uses a comment inside a Markdown code fence as the notebook titleCó thể đã có người làm @Primaverah đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 77/100
microsoft/markitdown#2964 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
PPTX image alt text ending in a backslash breaks the Markdown imageCó thể đã có người làm @dongyikuan919 đã nhận 3 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
microsoft/markitdown#2943 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
PPTX chart labels with pipes or line breaks produce malformed Markdown tablesCó thể đã có người làm @dongyikuan919 đã nhận 5 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 92/100
microsoft/markitdown#2937 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
DOCX: math pre-processing re-parses every document.xml even without equations (32 s -> 17.5 s on a 12.5 MB document)Có thể đã có người làm @houyunsun đã nhận 26 ngày trước. Đang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 89/100
microsoft/markitdown#2834 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
URL fetch sends default python-requests User-Agent, Wikipedia returns 403Có thể đã có người làm @sushan5140 đã nhận 31 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
microsoft/markitdown#2820 ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của microsoft/markitdown
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
hugohe3/ppt-master#366 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 89/100
Maintainer thường phản hồi trong vòng 2 ngày
-
[开源推荐] 用 Claude 搭的 A 股投研与盘中作战系统Đang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 85/100
521xueweihan/HelloGitHub#4716 ·
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 84/100
pcqpcq/open-source-android-apps#619 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
contribution Windows 主机
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
Lee-xeo/Claude-Cage#1519 ·
Maintainer thường phản hồi trong vòng 1 ngày