fix: slide graphe noire + nombre slides adaptatif
- slides-renderer: SlideChart supporte le nouveau format plat
(slide.chartType + slide.data[{label,value}]) en plus de slide.chart
→ corrige la slide noire avec légende visible mais graphe vide
- slides.tool: nombre de slides adapté au contenu
(3-4 pour note courte, 5-7 moyenne, 8-12 longue)
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
@@ -25,7 +25,18 @@ const GRID_STROKE = 'rgba(255,255,255,0.07)'
|
|||||||
|
|
||||||
// ── Chart ──────────────────────────────────────────────────────────────────────
|
// ── Chart ──────────────────────────────────────────────────────────────────────
|
||||||
function SlideChart({ slide }: { slide: SlideSpec }) {
|
function SlideChart({ slide }: { slide: SlideSpec }) {
|
||||||
const { chart } = slide
|
// Support both old format (slide.chart) and new flat format (slide.chartType + slide.data)
|
||||||
|
const chart = slide.chart ?? (
|
||||||
|
slide.chartType || slide.data
|
||||||
|
? {
|
||||||
|
type: slide.chartType ?? 'bar',
|
||||||
|
data: (slide.data as any[])?.map((d: any) => ({ name: d.label ?? d.name, value: d.value })) ?? [],
|
||||||
|
xKey: 'name',
|
||||||
|
yKeys: ['value'],
|
||||||
|
showLegend: true,
|
||||||
|
}
|
||||||
|
: undefined
|
||||||
|
)
|
||||||
if (!chart?.data?.length) return null
|
if (!chart?.data?.length) return null
|
||||||
|
|
||||||
const colors = chart.colors ?? CHART_COLORS
|
const colors = chart.colors ?? CHART_COLORS
|
||||||
|
|||||||
@@ -45,7 +45,7 @@ Available slide types:
|
|||||||
- "summary": title, items[] (conclusion with checkmarks)
|
- "summary": title, items[] (conclusion with checkmarks)
|
||||||
|
|
||||||
RULES:
|
RULES:
|
||||||
- 6-12 slides per presentation
|
- Adapt the number of slides to the content: 3-4 slides for short notes (<200 words), 5-7 for medium, 8-12 for long/rich notes
|
||||||
- First slide MUST be type "title"
|
- First slide MUST be type "title"
|
||||||
- Last slide MUST be type "summary"
|
- Last slide MUST be type "summary"
|
||||||
- Include at least 1 "chart" or "stats" slide
|
- Include at least 1 "chart" or "stats" slide
|
||||||
|
|||||||
Reference in New Issue
Block a user