Replies: 1 comment
-
大佬,还有就是颜色通道里没有null, 能正常画出来,但是y通道有null, 导致滚动条失效报错 此场景代码如下 const chart = new Chart({ container: "container" }); chart.options({ chart.render(); |
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
Uh oh!
There was an error while loading. Please reload this page.
-
代码如下
import { Chart } from "@antv/g2";
const chart = new Chart({ container: "container" });
chart.options({
type: "line",
theme: "classic",
data: [
{ x: "a", y: 4 },
{ x: "b", y: 20 },
{ x: "c", y: 10 },
{ x: "d", y: 11 },
{ x: "e", y: null },
{ x: "f", y: 8 },
{ x: "g", y: 13 },
],
encode:{
x: 'x',
y: 'y',
color: 'y',
},
style:{
gradient: 'color'
}
});
chart.render();
Beta Was this translation helpful? Give feedback.
All reactions