Charts: add scatter charts (chartType "scatter")
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 68/100
- Loại issue
- Tính năng
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- python
- Lĩnh vực
- data-visualization
Hướng nghiên cứu
Start with _add_chart in sdpm/sdpm/engine/builder/elements/chart.py and the named chart round-trip tests in tests/test_chart_roundtrip.py; check how chart data and series colors are currently built. Then trace chart extraction in sdpm/sdpm/engine/converter/chart.py and scatter validation in sdpm/sdpm/engine/schema/lint.py. Done when the listed scatter round-trip, lint, and edit-rebuild cases pass, along with make lint and uv run pytest tests/test_chart_roundtrip.py -v.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
What problem would this solve?
Native charts support chartType bar, line, pie and donut only, and all of them plot values against categories. A scatter chart plots two numeric variables against each other (latency vs. payload size, cost vs. throughput, before/after benchmarks), which a category chart cannot show. python-pptx builds scatter charts natively (XL_CHART_TYPE.XY_SCATTER with XyChartData). Today a chartType: "scatter" silently becomes a bar chart (see TestInvalidInput::test_unknown_chart_type_degrades_to_bar).
Proposed solution
Add chartType: "scatter". Its series carry points ([x, y] pairs) instead of values, and it takes no categories:
{
"type": "chart", "chartType": "scatter",
"x": 192, "y": 216, "width": 1536, "height": 700,
"series": [
{"name": "Lambda", "points": [[128, 45], [256, 30], [512, 22], [1024, 18]], "color": "#FF9900"},
{"name": "Fargate", "points": [[128, 60], [512, 35], [1024, 25]], "color": "#41B3FF"}
],
"legend": true,
"valueAxis": {"min": 0},
"title": "Latency (ms) by memory (MB)"
}
- Markers only (
XL_CHART_TYPE.XY_SCATTER); seriescoloris the marker colour;style.markerSizeapplies. Connecting lines (XY_SCATTER_LINES*,XY_SCATTER_SMOOTH*) are out of scope for this issue. valueAxisapplies to the Y axis as it does today. X-axis options can come in a follow-up; keep the default X axis in this issue.
Files to touch:
sdpm/sdpm/engine/builder/elements/chart.py(_add_chart): build the data withXyChartData(add_series(name)thenseries.add_data_point(x, y)) whenchartTypeisscatter, add it to thetype_map, and colour the series markers. The current code always buildsCategoryChartDataand generates placeholder categories, so this is the main change.sdpm/sdpm/engine/converter/chart.py(extract_chart_element): mapXY_SCATTERintype_mapand read each series' points. python-pptx'sseries.valuesgives the Y values only; read X from the series'c:xValelement. Writepoints, notcategories/values.sdpm/sdpm/engine/schema/lint.py: addscatterto_CHART_TYPES, update the "Specify bar, line, pie, or donut" message, skip the categories/values length check for scatter, and flag a scatter series withoutpoints.- Docs: the chart section of
sdpm/references/guides/slide-json-media.md(chartTypelist, thepointsshape, guide list), and a newsdpm/references/guides/chart-scatter.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: "scatter"builds ac:scatterChart, andpptx_to_jsonreads it back aschartType: "scatter"with series names,points(in order) and colours intact. - An edited scatter chart (a changed point) is rebuilt from its JSON, not restored from
_chartXml. -
TestInvalidInput::test_unknown_chart_type_degrades_to_baruses another unknown type name instead ofscatter. - Lint accepts
scatterand still rejects unknown types. -
make lintanduv run pytest tests/test_chart_roundtrip.py -vpass.
Tests to copy: TestChartTypes::test_line_markers, TestSeriesAndCategories::test_non_ascii_and_float_values 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
- Ngôn ngữ chính
- Python
- Star
- 136
- Fork
- 13
- Merge trung bình
- 7 giờ 36 phút
- Pull request đã merge (30 ngày)
- 175
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của aws-samples/sample-spec-driven-presentation-maker
-
Charts: setting `valueAxis` skips theme styling of axis labels and axis linesCó thể đã có người làm @ShotaroKataoka đã nhận 1 ngày trước. Đang mởbug
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 67/100
aws-samples/sample-spec-driven-presentation-maker#630 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
enhancement
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 50/100
aws-samples/sample-spec-driven-presentation-maker#627 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Charts: add radar charts (chartType "radar")Có thể đã có người làm @tridev-tej đã nhận 4 ngày trước. Đang mởenhancement good first issue
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 25/100
aws-samples/sample-spec-driven-presentation-maker#621 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
enhancement good first issue
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 77/100
aws-samples/sample-spec-driven-presentation-maker#620 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Make the element JSON round trip match the docs (4 small fixes)Có thể đã có người làm @Vedant-200 đã nhận 5 ngày trước. Đang mởenhancement good first issue
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 35/100
aws-samples/sample-spec-driven-presentation-maker#586 ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của aws-samples/sample-spec-driven-presentation-maker
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
ip-tools/patzilla#219 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
EPSSClient commits to its SQLite cache once per score: a 100-CVE bulk fetch makes 101 disk flushesĐang mởpriority:p3 technical-debt
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
jimmy058910/jmo-security-repo#1673 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
enhancement ready
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 86/100
-
integration: frontier_silicon
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
home-assistant/core#193176 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
task create and task update take --body-file and --stdinCó thể đã có người làm @JuanBarriosS đã nhận hôm nay. Đang mởcli enhancement good first issue help wanted
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 92/100
pyrite-wiki/pyrite#1687 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày