图例
为每种教学用色配上可见名称。
背景、主体与比较对象
01
02
03
- Context
- Subject
- Comparison
结果
- Measured
- Passes
- Fails
使用于 Axes.
用法与接口
DemoLegend 根据 items 渲染 ul.ui-legend:每个 { label, tone } 都会成为包含色块与名称的列表项。请放在托盘图注中或展示区旁。
<Demo caption={<DemoLegend items={[{ label: 'Subject', tone: 'blue' }, { label: 'Comparison', tone: 'violet' }]} />}> …</Demo><ul class="ui-legend" aria-label="Legend"> <li><i data-tone="blue" aria-hidden="true"></i>Subject</li> <li><i data-tone="violet" aria-hidden="true"></i>Comparison</li></ul>