← All templates

决策树 <DecisionTree />

从上往下读的是 / 否决策树,最多两层问题、四个结果,结果用强调色框出。

Template and style descriptions are currently available in Chinese only.

See it in the demo deck →

Group
分析 · 什么情况选哪个
Component
DecisionTree · #decision-tree

Good for

  • 根据条件选方案、选工具
  • 每个问题都能用是 / 否回答

Avoid when

  • 问题超过两层:拆成两页
  • 要拆解原因:用 IssueTree

Content limits

1q ≤ 14 字,leaf ≤ 8 字,note ≤ 14 字
2最多两层问题、4 个结果

Fields

FieldType
kicker · requiredstring小节名,2–8 字
title · requiredstring | string[]标题;数组手动断行
leadstring一两句导语,≤ 60 字
sourcestring事实出处
root · requiredTreeNode{ q, yes, no } 或 { leaf, note? }

Example

<DecisionTree kicker="选图表" title="想比的是什么?" root={{ q: '数据跟时间有关吗?', yes: { leaf: 'LineChart' }, no: { leaf: 'BarChart' } }} />