From e86d83d135e8b8379d03e9ff59690b73c1088e40 Mon Sep 17 00:00:00 2001 From: Yasutake Yohei <61961825+yasutakeyohei@users.noreply.github.com> Date: Sat, 10 Oct 2026 22:10:48 +0900 Subject: sanpi/: 議案の賛否一覧を年度別ページに分割 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 概要ページ(/sanpi/)は累計の傾向グラフと年度別リンクのみに - 表と賛否理由は /sanpi/r1d/〜/sanpi/r8d/ の8ページに分割 (3月定例会は前年度に属する) - 傾向グラフは年度別ページの表をビルド時に集計して描画 (src/utils/sanpiStats.ts / src/components/SanpiChart.astro) - SanpiTable.astro は表のツールチップ・全文表示のみに整理 --- src/components/SanpiChart.astro | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 src/components/SanpiChart.astro (limited to 'src/components/SanpiChart.astro') diff --git a/src/components/SanpiChart.astro b/src/components/SanpiChart.astro new file mode 100644 index 0000000..7bc4174 --- /dev/null +++ b/src/components/SanpiChart.astro @@ -0,0 +1,33 @@ +--- +// 議案の賛否一覧(/sanpi/)の「会派ごとの賛否の傾向」グラフ。 +// 年度別ページの表をビルド時に集計して、サーバー側で描画する +// (以前はページ内の表をブラウザで集計していた。集計ロジックは +// src/utils/sanpiStats.ts を参照)。 +import { computeSanpiStats, SANPI_CHART_CAPTION } from "@/utils/sanpiStats"; + +const rows = computeSanpiStats(); +--- + +{ + rows.length > 0 && ( +
{SANPI_CHART_CAPTION}
+