AI turns documents or topics into real, native PowerPoint decks—with native shapes, transitions and animations, data-backed charts and tables on demand, audio narration from speaker notes, and support for your own .pptx templates. · by Hugo He
fix(native_objects): preserve native chart overlays and axis labels
hugohe3483f13ee1a8a
diff --git a/skills/ppt-master/references/executor-base.md b/skills/ppt-master/references/executor-base.mdindex 58ab3c29..be51027d 100644--- a/skills/ppt-master/references/executor-base.md+++ b/skills/ppt-master/references/executor-base.md@@ -229,8 +229,11 @@ grep "chart-plot-area" <project_path>/svg_output/<current_page>.svg- Transcribe, don't restyle: `categories` / `series[].values` are the numbers just plotted; `style.colors` carries the series HEX values already used on the page (from `spec_lock.colors`).- Data-point color: when a single column/bar series uses data-point colors in the fallback, copy those fills into `series[].point_colors` in category order.- Data labels: when visible point values are part of the fallback chart, write `data_labels` instead of companion text; use `data_labels.points` for selected labels, and use `number_format`, `font_size`, `font_family`, and per-point `colors` / `color` when the fallback labels carry suffixes or color-coded text.+- Line markers: when the fallback line chart draws visible point nodes, set `line_style: "lineMarker"`; leave the default `line` only for line charts without nodes.- Area-under-line: when a combo plot is drawn as a filled area under a line, keep `type: "line"`, add `area_fill: true`, and copy the area transparency into `series[].fill_opacity`; copy visible line `stroke-width` into `series[].line_width` for line/area series.- Native chrome: write axis titles or `show_legend: true` only when the fallback visibly renders them inside the native chart's replacement scope. Write `name` (page-semantic, e.g. `p03-revenue-chart`) and explicit `x`/`y`/`width`/`height` read from the drawn plot area; omission is the fallback — the exporter then infers the frame from the drawn fallback geometry.+- Value-axis labels: when the fallback keeps category labels but intentionally omits numeric value-axis tick labels, set `show_value_axis_labels: false`.+- Freeform chart text: transcribe center labels, source notes, and other in-chart annotations as companion `caption` / `note` / `notes` entries with explicit slide-coordinate bounds; do not rely on fallback `<text>` children to survive native export.- Native chart typography mirrors the SVG fallback. Copy the fallback's shared chart font into `style.font_family` and visible chart text sizes into the matching metadata fields (`title_font_size`, `subtitle_font_size`, `axis_font_size`, `note_font_size`, etc.); when a visible chart title, subtitle, or axis title needs its own size/color/font, write that field as an object with `text`, `font_size`, `font_family`, and `color`. Use `axis_title_font_size`, `legend_font_size`, or companion per-entry `font_size` only when the fallback visibly uses a separate size. If a fallback role has no explicit size, use the compact three-tier chart defaults from [shared-standards.md](shared-standards.md).- Native table typography mirrors the SVG fallback. Write `style.font_family` and `style.font_size` from the visible table text; use `header_font_size` or per-cell `font_size` only when the fallback visibly does so. If the fallback has no explicit table font, fall back to the deck body family and locked body size from `spec_lock.md typography`.- The marker group's transform stays translate/scale only (no rotate / matrix / skew).diff --git a/skills/ppt-master/references/shared-standards.md b/skills/ppt-master/references/shared-standards.mdindex 7699f469..b8a90040 100644--- a/skills/ppt-master/references/shared-standards.md+++ b/skills/ppt-master/references/shared-standards.md@@ -820,16 +820,20 @@ validated. Axis titles are optional and explicit: use `axis_titles` with`category`, `value`, `x`, `y`, or `secondary_value` keys, or the root aliases`category_axis_title`, `value_axis_title`, `x_axis_title`, `y_axis_title`, and`secondary_value_axis_title`; do not add semantic axis titles that are not-visible in the fallback. Native legends are metadata-controlled: use+visible in the fallback. Set `show_value_axis_labels: false` when the fallback+keeps category labels but omits numeric value-axis tick labels, such as a radar+chart without radial coordinates. Native legends are metadata-controlled: use`show_legend: true` and `legend_position` only when the fallback's legend ismeant to be replaced by PowerPoint's native legend.Companion text such as `caption`, `source`, `note`, `notes`, `footnote`, and`footnotes` is exported as editable PPT text boxes next to the native chart. Acompanion entry may be a string or an object with `text`, `x`, `y`, `width`,`height`, `font_size`, `color`, `align`, and `bold`; explicit bounds are-recommended so the native export matches the SVG fallback placement.-Use companion text for chart captions, source notes, and freeform annotations;-use `data_labels` for values that belong to chart points.+recommended so the native export matches the SVG fallback placement. Explicit+companion bounds are slide coordinates, not local coordinates inside a+transformed marker group. Use companion text for chart captions, source notes,+center labels, and freeform annotations; use `data_labels` for values that+belong to chart points.**Chart color styling**: For classic native charts, `style.colors` sets seriescolors. The exporter also writes explicit chart-area fill, plot-area fill,diff --git a/skills/ppt-master/scripts/svg_to_pptx/native_objects/chart_data.py b/skills/ppt-master/scripts/svg_to_pptx/native_objects/chart_data.pyindex 0653ddc0..284be141 100644--- a/skills/ppt-master/scripts/svg_to_pptx/native_objects/chart_data.py+++ b/skills/ppt-master/scripts/svg_to_pptx/native_objects/chart_data.py@@ -363,6 +363,7 @@ def _category_chart_data(alias_style: str | None,) -> dict[str, Any]:categories = [str(item) for item in _chart_list(payload.get("categories", []), "categories")]+ style = payload.get("style") if isinstance(payload.get("style"), dict) else {}series = _category_series(payload, categories)if chart_type in {"doughnut", "of_pie", "pie"}:@@ -408,6 +409,15 @@ def _category_chart_data("line_style": line_style,"radar_marker_style": radar_marker_style,"radar_style": radar_style,+ "show_value_axis_labels": _chart_bool(+ _first_present(+ payload.get("show_value_axis_labels"),+ payload.get("showValueAxisLabels"),+ style.get("show_value_axis_labels"),+ style.get("showValueAxisLabels"),+ ),+ True,+ ),"data_labels": _data_labels_config(payload),"series": series,}diff --git a/skills/ppt-master/scripts/svg_to_pptx/native_objects/chart_style.py b/skills/ppt-master/scripts/svg_to_pptx/native_objects/chart_style.pyindex f51aaf85..0a49df07 100644--- a/skills/ppt-master/scripts/svg_to_pptx/native_objects/chart_style.py+++ b/skills/ppt-master/scripts/svg_to_pptx/native_objects/chart_style.py@@ -6,7 +6,7 @@ from typing import Anyfrom xml.etree import ElementTree as ETfrom ..drawingml.context import ConvertContext-from ..drawingml.utils import ctx_h, ctx_w, ctx_x, ctx_y, detect_text_lang, px_to_emu, _xml_escape+from ..drawingml.utils import detect_text_lang, px_to_emu, _xml_escapefrom .chart_data import _DEFAULT_CHART_COLORSfrom .marker_common import (_bool_attr,@@ -466,10 +466,10 @@ def _chart_companion_text_xml(bold = bool(item.get("bold", role == "title"))has_box = all(_maybe_number(item.get(key)) is not None for key in ("x", "y", "width", "height"))if has_box:- off_x = px_to_emu(ctx_x(_number(item["x"], "companion text x"), ctx))- off_y = px_to_emu(ctx_y(_number(item["y"], "companion text y"), ctx))- ext_cx = px_to_emu(ctx_w(_number(item["width"], "companion text width"), ctx))- ext_cy = px_to_emu(ctx_h(_number(item["height"], "companion text height"), ctx))+ off_x = px_to_emu(_number(item["x"], "companion text x"))+ off_y = px_to_emu(_number(item["y"], "companion text y"))+ ext_cx = px_to_emu(_number(item["width"], "companion text width"))+ ext_cy = px_to_emu(_number(item["height"], "companion text height"))elif role == "title":off_x = chart_off_xoff_y = chart_off_ydiff --git a/skills/ppt-master/scripts/svg_to_pptx/native_objects/chart_xml.py b/skills/ppt-master/scripts/svg_to_pptx/native_objects/chart_xml.pyindex 22864b33..f560e1b3 100644--- a/skills/ppt-master/scripts/svg_to_pptx/native_objects/chart_xml.py+++ b/skills/ppt-master/scripts/svg_to_pptx/native_objects/chart_xml.py@@ -861,6 +861,7 @@ def _chart_plot_xml(chart_style=chart_style,chart_type=chart_type,grouping=grouping,+ show_value_axis_labels=chart_data.get("show_value_axis_labels", True),)overlap_xml = ('<c:overlap val="100"/>'@@ -895,6 +896,7 @@ def _chart_plot_xml(chart_style=chart_style,chart_type=chart_type,grouping=grouping,+ show_value_axis_labels=chart_data.get("show_value_axis_labels", True),)line_tail_xml = '<c:marker val="1"/><c:smooth val="0"/>' if chart_type == "line" else ""return (@@ -931,6 +933,7 @@ def _chart_plot_xml(axis_titles=axis_titles,chart_style=chart_style,chart_type=chart_type,+ show_value_axis_labels=chart_data.get("show_value_axis_labels", True),)return (f'<c:radarChart><c:radarStyle val="{radar_style}"/>'@@ -953,6 +956,7 @@ def _axis_xml(chart_style: dict[str, str | None],chart_type: str,grouping: str | None = None,+ show_value_axis_labels: bool = True,) -> str:cat_pos = "l" if chart_type == "bar" else "b"val_pos = "b" if chart_type == "bar" else "l"@@ -961,6 +965,7 @@ def _axis_xml(if grouping == "percentStacked"else "")+ val_tick_label_pos = "nextTo" if show_value_axis_labels else "none"axis_sp_pr = _chart_line_sp_pr_xml(chart_style.get("axis_color"))axis_tx_pr = _chart_tx_pr_xml(axis_font_size,@@ -993,7 +998,7 @@ def _axis_xml(f'<c:delete val="0"/><c:axPos val="{val_pos}"/>{_major_gridlines_xml(chart_style.get("grid_color"))}'f"{val_title_xml}{val_num_fmt}"'<c:majorTickMark val="out"/><c:minorTickMark val="none"/>'- '<c:tickLblPos val="nextTo"/>'+ f'<c:tickLblPos val="{val_tick_label_pos}"/>'f"{axis_sp_pr}{axis_tx_pr}"f'<c:crossAx val="{cat_ax_id}"/><c:crosses val="autoZero"/>'"</c:valAx>"