Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

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

V5 legend居右时显示不全 #5210

Closed
dechenwj opened this issue Jun 20, 2023 · 0 comments
Closed

V5 legend居右时显示不全 #5210

dechenwj opened this issue Jun 20, 2023 · 0 comments

Comments

@dechenwj
Copy link

5.0.12版本
https://g2.antv.antgroup.com/zh/examples/general/line/#line-aggregated-label 这个例子里改变legend的位置 文字会显示不全 使用style itemWidth也不生效 另:不改变浏览器窗口大小 只是拖拽图表渲染区域大小的话legend不会重新计算位置 希望可以给个解决方案
image

`import { Chart } from "@antv/g2";

const chart = new Chart({ container: "container" });

chart.options({
type: "line",
theme: "classic",
autoFit: true,
data: {
type: "fetch",
value:
"https://gw.alipayobjects.com/os/bmw-prod/cb99c4ab-e0a3-4c76-9586-fe7fa2ff1a8c.csv",
},
encode: {
x: (d) => new Date(d.date).getFullYear(),
y: "price",
color: "symbol",
},
transform: [{ type: "groupX", y: "mean" }],
legend: {
color: { position: "right", layout: { alignItems: "flex-start" } },
},
labels: [
{
text: "price",
transform: [{ type: "overlapDodgeY" }],
style: { fontSize: 10 },
},
],
tooltip: { items: [{ channel: "y", valueFormatter: ".1f" }] },
});

chart.render();
`

@antvis antvis locked and limited conversation to collaborators Jun 20, 2023
@pearmini pearmini converted this issue into discussion #5211 Jun 20, 2023

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant