markitdown icon indicating copy to clipboard operation
markitdown copied to clipboard

pptx: missing chart data points render as the literal string "None"

Open ManoharPaturi opened this issue 2 months ago • 0 comments

what happens

pptx charts render missing data points as the literal string "None" inside the markdown table. a series like (1.0, None, 3.0) produces:

| Q2 | None |

instead of an empty cell, which reads like a value named None in every downstream consumer.

repro

from pptx import Presentation
from pptx.chart.data import CategoryChartData
from pptx.enum.chart import XL_CHART_TYPE
from io import BytesIO
from markitdown import MarkItDown, StreamInfo

prs = Presentation()
slide = prs.slides.add_slide(prs.slide_layouts[5])
cd = CategoryChartData()
cd.categories = ["Q1", "Q2", "Q3"]
cd.add_series("Sales", (1.0, None, 3.0))
slide.shapes.add_chart(XL_CHART_TYPE.COLUMN_CLUSTERED, 0, 0, 600, 400, cd)
buf = BytesIO(); prs.save(buf); buf.seek(0)
print(MarkItDown().convert_stream(buf, stream_info=StreamInfo(extension=".pptx")).markdown)

expected

missing points render as empty cells.

env: main 945314a

ManoharPaturi avatar Sep 18 '26 11:09 ManoharPaturi