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

2.2.1版本中 设置 线条选中 颜色 失效了 ,官网的调试工具试了也不行 #324

Closed
Lokkve0126 opened this issue Jun 15, 2024 · 2 comments

Comments

@Lokkve0126
Copy link

微信截图_20240615183829

@zhunnyWang
Copy link

+1

@seeksdream
Copy link
Owner

这个是历史问题,之前的版本线条被选中时是直接更改线条的颜色。这种做法太粗暴了,这种做法后来被弃用了,所以【选中的线条颜色】这个属性也就没用了。
目前的做法是线条被选中时为线条添加一个类似变宽的背景。这个背景默认是黄色的。
现在,可以通过样式穿透去改变这个背景颜色、被选中的线条颜色、被选中线条的文字颜色:
https://www.relation-graph.com/#/demo/vue2?id=line-style2

https://www.relation-graph.com/#/demo/vue2?id=line-checked-style

修改线条颜色:

.relation-graph .c-rg-line-checked {
        stroke: #5b05f1;
}

修改背景颜色:

.relation-graph .c-rg-link-checked .c-rg-line-bg {
        stroke: #5b05f1;
}

修改被选中线条的文字颜色:

.relation-graph .c-rg-line-text-checked {
        fill: #5b05f1;
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants