拓展 / GraphUI / LegendGroupOptions
接口: LegendGroupOptions
UI.legend以其多节形式:一张对接卡同时在多个编码上键入图形。部分按声明顺序从上到下堆叠,每个部分都有自己的标题、条目和折叠切换。
每个可过滤部分都有自己的过滤器,并且一起过滤和:在一个部分中关闭attribute,在另一部分中关闭self,留在画布上的是两者都不是的节点。
既没有声明 key 也没有声明 entries 的部分是已经声明为 render.nodeTypeAccessor 的维度 — 这是不是普通数据键的样式维度的一种拼写。只有一个部分可以做到这一点。
示例
js
UI: {
legend: {
position: 'bottom-left',
sections: [
{ key: 'type', title: 'Element' },
{ key: 'scope', title: 'Provenance' },
],
},
}属性
enabled?
optionalenabled:boolean
默认值
ts
true when the block is presentposition?
optionalposition:LegendPosition
整张卡停靠在哪个角落。
默认值
full 模式下为“右下角”,否则为 'bottom-left'
sections
sections:
LegendSection[]
这些部分按声明顺序从上到下呈现。