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

旭日图可否分层设置nodeClick属性 #7541

Closed
candy4290 opened this issue Jan 19, 2018 · 8 comments
Closed

旭日图可否分层设置nodeClick属性 #7541

candy4290 opened this issue Jan 19, 2018 · 8 comments
Assignees
Labels
enhancement pending We are not sure about whether this is a bug/new feature. stale Inactive for a long time. Will be closed in 7 days.

Comments

@candy4290
Copy link

candy4290 commented Jan 19, 2018

One-line summary [问题简述]

我希望点击旭日图最外层时,跳转,也就是设置nodeClick: 'link'。但这时候点别的层时,就不会下钻了。
可否有办法,让我只有最外层点击时不是下钻,别的层点击时是下钻。

Version & Environment [版本及环境]

  • ECharts version [ECharts 版本]: 4.0.0
  • Browser version [浏览器类型和版本]: 谷歌63.0.3239.132(正式版本) (64 位)
  • OS Version [操作系统类型和版本]: window7

Expected behaviour [期望结果]

旭日图,只有最外层点击时是跳转,别的层点击时是下钻

ECharts option [ECharts配置项]

option = {
				title: {
					text: '旭日图',
					textStyle: {
						fontStyle: 'italic',
						fontWeight: 'bold',
						fontSize: 14
					},
				},
				series: {
					type: 'sunburst',
					highlightPolicy: 'ancestor',
					data: this.data,
					radius: [0, '95%'],
					sort: null,
					levels: [{}, {
						r0: '15%',
						r: '35%',
						itemStyle: {
							borderWidth: 2
						},
						label: {
							rotate: 'tangential'
						}
					}, {
						r0: '35%',
						r: '70%',
						nodeClick: 'link',
						label: {
							align: 'right'
						}
					}, {
						r0: '70%',
						r: '72%',
						label: {
							position: 'outside',
							padding: 5,
							silent: false,
							color: 'black'
						},
						itemStyle: {
							borderWidth: 3
						}
					}]
				}
			};

Other comments [其他信息]

image

@candy4290
Copy link
Author

candy4290 commented Jan 22, 2018

换个说法,旭日图可以设置最外面一层点击后无法下钻,别的层点击后,下钻么

@Ovilia
Copy link
Contributor

Ovilia commented Jan 22, 2018

@candy4290 后面我会支持一下这个功能

@candy4290
Copy link
Author

candy4290 commented Jan 22, 2018

@pissang 希望的就是设置下钻与点击后跳转。这两者是可以并存的。我可以设置旭日图内容为下钻,外层为点击事件。现在是如果设置可以点击跳转,整个图将无法下钻。这不是我想要的。然后希望有tooltip,如果我可以在tooltip里面添加link,进行跳转也可以。期待你们的下个版本,thank you

@Ovilia
Copy link
Contributor

Ovilia commented Jan 22, 2018

嗯嗯,明白了,可以新支持按层,或者对每个扇形块单独设置链接还是下钻的功能。

@candy4290
Copy link
Author

candy4290 commented Jan 23, 2018

@Ovilia 是的,就是希望有这样的功能,目前项目先把这段代码注释了-。-,期待你们的新功能,thank you

@Ovilia Ovilia closed this as completed in c7d935b Jan 23, 2018
@candy4290
Copy link
Author

candy4290 commented Mar 9, 2018

原来希望的功能在4.0.4中已经有了。但我发现了个问题,我设置了target: 'self',当我第一次点这个地方时,跳转了,但是跳转到了一个新的页面上。在新的页面中,我返回该旭日图并点击上次的地方,现在是在原页面上跳转,没问题。 只有第一次打开页面时,点击,会跳转到一个新的页面上!!!这是什么原因呢,大神 @Ovilia

@Ovilia
Copy link
Contributor

Ovilia commented Mar 9, 2018

诶,我检查下

@Ovilia Ovilia reopened this Mar 9, 2018
@Ovilia Ovilia self-assigned this Sep 6, 2018
@Ovilia Ovilia added the pending We are not sure about whether this is a bug/new feature. label Sep 6, 2018
@stale
Copy link

stale bot commented Sep 5, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale Inactive for a long time. Will be closed in 7 days. label Sep 5, 2020
@stale stale bot closed this as completed Sep 12, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement pending We are not sure about whether this is a bug/new feature. stale Inactive for a long time. Will be closed in 7 days.
Projects
None yet
Development

No branches or pull requests

3 participants