Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

怎么改变label的字体? #2390

Closed
FelicityGao opened this issue Jul 21, 2022 · 4 comments
Closed

怎么改变label的字体? #2390

FelicityGao opened this issue Jul 21, 2022 · 4 comments
Labels
type: discussion 讨论 Usage questions, guidance, and other discussions

Comments

@FelicityGao
Copy link

问题描述

想通过fontFamily改变字体但是没有效果。

重现链接

重现步骤

text: {
fontSize: '12px',
fill: '#262626',
fontFamily: 'Arial',
}
这样设置没效果

预期行为

选择下拉内容可以改变框内的字体
image

平台

  • 操作系统: [macOS, Windows, Linux, React Native ...]
  • 网页浏览器: [Google Chrome, Safari, Firefox]
  • X6 版本: [1.28.2 ... ]

屏幕截图或视频(可选)

No response

补充说明(可选)

No response

@x6-bot
Copy link
Contributor

x6-bot bot commented Jul 21, 2022

👋 @FelicityGao

Thanks for opening your first issue here! If you're reporting a 🐞 bug, please make sure you include steps to reproduce it.

To help make it easier for us to investigate your issue, please follow the contributing guidelines.

We get a lot of issues on this repo, so please be patient and we will get back to you as soon as we can.

@NewByVector
Copy link
Contributor

我尝试了一下,有效果的。这个是效果图:
image
具体代码:

graph.addNode({
  x: 40,
  y: 40,
  width: 120,
  height: 60,
  label: 'rect',
  attrs: {
    text: {
      fontFamily: 'Times New Roman',
    }
  }
})

graph.addNode({
  x: 140,
  y: 40,
  width: 120,
  height: 60,
  label: 'rect',
})

@NewByVector NewByVector added the type: discussion 讨论 Usage questions, guidance, and other discussions label Jul 22, 2022
@NewByVector
Copy link
Contributor

请问上面的回答有解决你的问题吗,为了高效沟通,我们暂时关闭这个 issue,如果有必要,请重新开一个新的 issue。

@x6-bot
Copy link
Contributor

x6-bot bot commented Aug 22, 2023

This thread has been automatically locked because it has not had recent activity.

Please open a new issue for related bugs and link to relevant comments in this thread.

@x6-bot x6-bot bot locked as resolved and limited conversation to collaborators Aug 22, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
type: discussion 讨论 Usage questions, guidance, and other discussions
Projects
None yet
Development

No branches or pull requests

2 participants