microsoft / microsoft/markitdown

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

Open
#2,526 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
186k
Forks
13.7k
Avg merge
1d 4h
Merged PRs (30d)
49

Description

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

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the example through MarkItDown().convert_stream with the .pptx StreamInfo, then search the PPTX chart conversion path for where missing points become table text. Add a regression test for the (1.0, None, 3.0) series and verify that the middle cell is empty rather than "None".

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Active
Clarity
Clearly specified
Newbie friendliness
72/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.