Charts: add radar charts (chartType "radar")
メンテナーはふだん 1 日以内に返信
評価
調査の方向性
A linked open pull request (#623) is already working on this issue, so check its changes before taking it on. The issue names sdpm/sdpm/engine/builder/elements/chart.py, sdpm/sdpm/engine/converter/chart.py, sdpm/sdpm/engine/schema/lint.py, and the chart guides and tests. Done means radar charts build and round-trip with markers and data intact, lint accepts the type, and the listed lint and pytest commands pass.
索引モデルが issue の本文から書いたものです。
説明
What problem would this solve?
Native charts support chartType bar, line, pie and donut only. Radar (spider) charts are a common way to compare options across several criteria (vendor evaluation, skill maps, Well-Architected pillar scores), and python-pptx builds them natively (XL_CHART_TYPE.RADAR, RADAR_MARKERS). Today an agent has to approximate them with a bar chart, and a radar chart imported with pptx_to_json is read as a bar chart that only its _chartXml keeps (_chartRebuildable: false).
Proposed solution
Add chartType: "radar". It uses the same category data as line, and the existing markers flag:
{
"type": "chart", "chartType": "radar",
"x": 192, "y": 216, "width": 1000, "height": 700,
"categories": ["Cost", "Performance", "Security", "Reliability", "Operations"],
"series": [
{"name": "Option A", "values": [4, 3, 5, 4, 2], "color": "#FF9900"},
{"name": "Option B", "values": [2, 5, 3, 3, 4], "color": "#41B3FF"}
],
"markers": true,
"legend": true,
"valueAxis": {"min": 0, "max": 5, "majorUnit": 1}
}
markers: true(default, as forline) →XL_CHART_TYPE.RADAR_MARKERS,markers: false→XL_CHART_TYPE.RADAR. The filled variant (RADAR_FILLED) is out of scope and stays non-rebuildable.- Series
coloris the line (and marker) colour, as forline;style.lineWidth/style.markerSizeapply. valueAxis(min/max/majorUnit/gridlines) sets the radial scale.
Files to touch:
sdpm/sdpm/engine/builder/elements/chart.py(_add_chart): thetype_map; the series colour branch (elif chart_type == "line"— radar series are lines too); check that the "Axis & gridline styling (bar/line only)" block works on a radar chart's axes, or skip the parts that do not apply.sdpm/sdpm/engine/converter/chart.py(extract_chart_element): mapRADAR/RADAR_MARKERSintype_map(andmarkers: falsefor plainRADAR, likeLINE), so the chart reads back asradarand becomes rebuildable.sdpm/sdpm/engine/schema/lint.py: addradarto_CHART_TYPESand update the "Specify bar, line, pie, or donut" message.- Docs: the chart section of
sdpm/references/guides/slide-json-media.md(chartTypelist and guide list), and a newsdpm/references/guides/chart-radar.mdmodelled onchart-line.md(when to use it: few series, 3–8 criteria on the same scale). If you add the guide, also add it next tochart-bar/chart-line/chart-pieinsdpm/references/guides/slide-json-spec.mdandsdpm/references/workflows/composer.md. CHANGELOG.md: an entry under[Unreleased]→Added.
Done when
-
chartType: "radar"builds ac:radarChart(with and without markers), andpptx_to_jsonreads it back aschartType: "radar"withmarkers, categories, series names, values and colours intact. - An edited radar chart is rebuilt from its JSON: drop
"radar"from thekindlist ofTestChartsTheJsonCannotDescribe::test_edited_chart_keeps_its_typeintests/test_chart_roundtrip.py. - Lint accepts
radarand still rejects unknown types. -
make lintanduv run pytest tests/test_chart_roundtrip.py -vpass.
Tests to copy: TestChartTypes::test_line_markers and TestColors::test_line_series_color in tests/test_chart_roundtrip.py (they use _one_chart / _built_chart, no LibreOffice needed).
Which area?
Slide generation / engine (layouts, elements, charts)
🤖 Created by Kiro Crew
- 主要言語
- Python
- スター
- 136
- フォーク
- 13
- 平均マージ
- 7時間 36分
- マージ済み PR(30日)
- 175
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
aws-samples/sample-spec-driven-presentation-maker のほかの issue
-
Charts: setting `valueAxis` skips theme styling of axis labels and axis lines対応中かも @ShotaroKataoka が 1 日前に担当しました。 オープンbug
難易度 3/5 1〜2日 初心者へのやさしさ 67/100
aws-samples/sample-spec-driven-presentation-maker#630 ·
メンテナーはふだん 1 日以内に返信
-
enhancement
難易度 4/5 3〜5日 初心者へのやさしさ 50/100
aws-samples/sample-spec-driven-presentation-maker#627 ·
メンテナーはふだん 1 日以内に返信
-
enhancement good first issue
難易度 4/5 3〜5日 初心者へのやさしさ 68/100
aws-samples/sample-spec-driven-presentation-maker#622 ·
メンテナーはふだん 1 日以内に返信
-
enhancement good first issue
難易度 3/5 1〜2日 初心者へのやさしさ 77/100
aws-samples/sample-spec-driven-presentation-maker#620 ·
メンテナーはふだん 1 日以内に返信
-
Make the element JSON round trip match the docs (4 small fixes)対応中かも @Vedant-200 が 5 日前に担当しました。 オープンenhancement good first issue
難易度 3/5 1〜2日 初心者へのやさしさ 35/100
aws-samples/sample-spec-driven-presentation-maker#586 ·
メンテナーはふだん 1 日以内に返信
aws-samples/sample-spec-driven-presentation-maker の issue をすべて見る
似ている issue
-
難易度 1/5 1〜3時間 初心者へのやさしさ 76/100
samuelclay/NewsBlur#2214 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
メンテナーはふだん 1 日以内に返信
-
MODEL_NOT_FOUND gives no suggestion for a model listed only as model:profile対応中かも @ShaiShmuel が今日担当しました。 オープンenhancement rust
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
superlinked/sie#985 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
readthedocs/readthedocs-builder#73 ·
メンテナーはふだん 1 日以内に返信