-
Reproduction linkSteps to reproduce同时设置color和scrollbar,会导致图标渲染异常,如上述链接所示。 Setting both color and scrollbar, will cause chart render uncorrect, as the link above.
import { Chart } from "@antv/g2";
const data = Array.from({ length: 50 }, (_, index) => ({
title: `选项 ${index + 1}`,
value: 100 * (index + 1)
}));
const chart = new Chart({
container: "root",
height: 300,
autoFit: true
});
// 这里只要设置了color和滚动条就会渲染错误
chart.interval().position("title*value").color("title");
chart.option("scrollbar", {
type: "horizontal"
});
chart.data(data);
chart.render(); 期望设置颜色的同时,也可以正确显示滚动条 |
Beta Was this translation helpful? Give feedback.
Answered by
visiky
Jun 29, 2022
Replies: 3 comments
-
1、color 通道和 x 通道的字段一致,会导致 scrollbar(对 x 通道数据的过滤)失效(目前这个问题是已知的,暂时比较难解决) |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
hustcc
-
我做这个需求也遇到,原来是这样,希望大佬早点更新 |
Beta Was this translation helpful? Give feedback.
0 replies
-
这是来自QQ邮箱的假期自动回复邮件。您好,您的来信已收到。 --计信郭日钊
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
1、color 通道和 x 通道的字段一致,会导致 scrollbar(对 x 通道数据的过滤)失效(目前这个问题是已知的,暂时比较难解决)
2、G2 5.0 会解决这个问题