We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
You can continue the conversation there. Go to discussion →
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
5.0.12版本 在 https://g2.antv.antgroup.com/zh/examples/general/line/#line-aggregated-label 这个例子里改变legend的位置 文字会显示不全 使用style itemWidth也不生效 另:不改变浏览器窗口大小 只是拖拽图表渲染区域大小的话legend不会重新计算位置 希望可以给个解决方案
`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(); `
The text was updated successfully, but these errors were encountered:
No branches or pull requests
5.0.12版本
在 https://g2.antv.antgroup.com/zh/examples/general/line/#line-aggregated-label 这个例子里改变legend的位置 文字会显示不全 使用style itemWidth也不生效 另:不改变浏览器窗口大小 只是拖拽图表渲染区域大小的话legend不会重新计算位置 希望可以给个解决方案
`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();
`
The text was updated successfully, but these errors were encountered: