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

条形图表上设置guide().text的offsetX偏移量在"第二象限"上显示有问题 #339

Open
panghujiajia opened this issue Jan 11, 2021 · 0 comments

Comments

@panghujiajia
Copy link

  • F2 Version:
  • Platform:
  • Mini Showcase(like screenshots):
  • CodePen Link:
chart.source(data, {
	value: {
		type: 'linear',
		ticks: [-100, -50, 0, 50, 100],
	}
});

data.forEach(obj => {
	chart.guide().text({
		position: [obj.name, obj.value],
		content: obj.value,
		style: {
			textBaseline: 'bottom',
			textAlign: 'center',
		},
		offsetY: 7,
		offsetX: 15,
	});
});
value的ticks从负数开始,导致我设置的offsetX会让0点左侧的几何标记上的文字显示在几何标记的正上方
预期希望0点左侧的guide text显示在几何标记的左侧,0点右侧的guide text显示在几何标记的右侧
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

1 participant