Charts: add area charts (chartType "area")
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
調査の方向性
Read the chart builder in sdpm/sdpm/engine/builder/elements/chart.py and converter in sdpm/sdpm/engine/converter/chart.py, then check the lint rules and the chart round-trip tests. Use the bar-variant and bar-series-color tests as models; update the guides and changelog listed in the issue. Done when area charts build and round-trip with stacked state and series data, lint validates area, and the specified checks pass.
索引モデルが issue の本文から書いたものです。
説明
What problem would this solve?
Native charts support chartType bar, line, pie and donut only. Area charts are common in business decks (volume over time, stacked share of a total), and python-pptx builds them natively (XL_CHART_TYPE.AREA, AREA_STACKED). Today an agent has to fall back to a line chart, and an area chart imported with pptx_to_json is read as a bar chart that only its _chartXml keeps (_chartRebuildable: false).
Proposed solution
Add chartType: "area", with the existing stacked flag:
{
"type": "chart", "chartType": "area",
"x": 192, "y": 216, "width": 1536, "height": 700,
"categories": ["Jan", "Feb", "Mar", "Apr"],
"series": [
{"name": "Lambda", "values": [120, 150, 180, 210], "color": "#FF9900"},
{"name": "ECS", "values": [80, 95, 90, 130], "color": "#41B3FF"}
],
"stacked": true,
"legend": true,
"dataLabels": false
}
stacked: false→XL_CHART_TYPE.AREA,stacked: true→XL_CHART_TYPE.AREA_STACKED. 100% stacked (AREA_STACKED_100) is out of scope and stays non-rebuildable.- Axes,
valueAxis/categoryAxis,numberFormat,style(gridlines, fonts, legend position) work as forbar. Seriescoloris the area fill.
Files to touch:
sdpm/sdpm/engine/builder/elements/chart.py(_add_chart): thetype_map, and the series colour branch (it handleslineandpie/donutseparately; an area series takes a fill like a bar).sdpm/sdpm/engine/converter/chart.py(extract_chart_element): mapAREA/AREA_STACKEDintype_mapso the chart reads back asareaand becomes rebuildable.sdpm/sdpm/engine/schema/lint.py: addareato_CHART_TYPES, update the "Specify bar, line, pie, or donut" message, and let the "stacked is only valid for bar" rule acceptarea.- Docs: the chart section of
sdpm/references/guides/slide-json-media.md(chartTypelist and guide list), and a newsdpm/references/guides/chart-area.mdmodelled onchart-line.md. 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: "area"builds anc:areaChart(stacked and not stacked), andpptx_to_jsonreads it back aschartType: "area"withstacked, categories, series names, values and colours intact. - An edited area chart is rebuilt from its JSON: drop
"area"from thekindlist ofTestChartsTheJsonCannotDescribe::test_edited_chart_keeps_its_typeintests/test_chart_roundtrip.py, and point the other tests in that class that use"area"at another non-rebuildable kind (radarorstacked100). - Lint accepts
areaand still rejects unknown types. -
make lintanduv run pytest tests/test_chart_roundtrip.py -vpass.
Tests to copy: TestChartTypes::test_bar_variants and TestColors::test_bar_series_colors 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 が今日担当しました。 オープン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 日以内に返信
-
Charts: add radar charts (chartType "radar")対応中かも @tridev-tej が 3 日前に担当しました。 オープンenhancement good first issue
難易度 4/5 3〜5日 初心者へのやさしさ 25/100
aws-samples/sample-spec-driven-presentation-maker#621 ·
メンテナーはふだん 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
-
area: ci bug good first issue help wanted
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
hffgzktbcc-blip/ounce-core#484 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 66/100
ranxianglei/billion-context#7063 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
-
needs-triage
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
MakazhanAlpamys/Soup#2971 ·
メンテナーはふだん 1 日以内に返信