文档上暂时没找到如何设置shape 为text-block字体的颜色和大小 #1994
-
文档上暂时没找到如何设置shape 为text-block字体的颜色和大小 |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments
-
this.graph.addNode({ |
Beta Was this translation helpful? Give feedback.
-
这个设置对text-block的node不起作用,对rect节点起作用的
…---原始邮件---
发件人: ***@***.***>
发送时间: 2022年4月11日(周一) 中午11:44
收件人: ***@***.***>;
抄送: ***@***.******@***.***>;
主题: Re: [antvis/X6] 文档上暂时没找到如何设置shape 为text-block字体的颜色和大小 (Discussion #1994)
this.graph.addNode({
x: 200,
y: 100,
width: 100,
height: 40,
attrs: {
body: {
fill: 'none', // 填充
stroke: "none" // 边框
},
label: {
text: "Hello", // 文本
fill: "#f00" //填充颜色
}
}
});
文档
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you authored the thread.Message ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
使用 graph.addNode({
x: 160,
y: 120,
width: 360,
height: 120,
shape: 'text-block',
text: `There are many variations of passages of Lorem Ipsum available, but the majority have suffered alteration in some form, by injected humour, or randomised words which don't look even slightly believable.`,
attrs: {
label: {
style: {
color: 'red'
}
}
},
}) |
Beta Was this translation helpful? Give feedback.
-
好的多谢
…---原始邮件---
发件人: ***@***.***>
发送时间: 2022年4月11日(周一) 下午2:16
收件人: ***@***.***>;
抄送: ***@***.******@***.***>;
主题: Re: [antvis/X6] 文档上暂时没找到如何设置shape 为text-block字体的颜色和大小 (Discussion #1994)
使用 label 是文本容器的选择器。
graph.addNode({ x: 160, y: 120, width: 360, height: 120, shape: 'text-block', text: `There are many variations of passages of Lorem Ipsum available, but the majority have suffered alteration in some form, by injected humour, or randomised words which don't look even slightly believable.`, attrs: { label: { style: { color: 'red' } } }, })
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you authored the thread.Message ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
使用
label
是文本容器的选择器。