Javascript 织女星图表JSON规范改变Y的范围
我已使用以下Vega(带NodeJS)JSON规范生成了上面的图表:Javascript 织女星图表JSON规范改变Y的范围,javascript,node.js,charts,data-visualization,vega,Javascript,Node.js,Charts,Data Visualization,Vega,我已使用以下Vega(带NodeJS)JSON规范生成了上面的图表: { "$schema": "https://vega.github.io/schema/vega/v5.json", "description": "A basic line chart example.", "width": 300, "height": 300, "paddi
{
"$schema": "https://vega.github.io/schema/vega/v5.json",
"description": "A basic line chart example.",
"width": 300,
"height": 300,
"padding": 0,
"signals": [
{
"name": "interpolate",
"value": "linear",
"bind": {
"input": "select",
"options": [
"basis",
"cardinal",
"catmull-rom",
"linear",
"monotone",
"natural",
"step",
"step-after",
"step-before"
]
}
}
],
"scales": [
{
"name": "x",
"type": "point",
"range": "width",
"domain": {
"data": "table",
"field": "x"
}
},
{
"name": "y",
"type": "linear",
"range": "height",
"nice": true,
"zero": true,
"domain": {
"data": "table",
"field": "y"
}
},
{
"name": "color",
"type": "ordinal",
"range": "category",
"domain": {
"data": "table",
"field": "c"
}
}
],
"axes": [
{
"orient": "bottom",
"scale": "x",
"zindex": 1
},
{
"orient": "left",
"scale": "y",
"zindex": 1
}
],
"marks": [
{
"type": "group",
"from": {
"data": "table"
},
"marks": [
{
"type": "line",
"from": {
"data": "table"
},
"encode": {
"enter": {
"x": {
"scale": "x",
"field": "x"
},
"y": {
"scale": "y",
"field": "y"
},
"stroke": {
"scale": "color",
"field": "c"
},
"strokeWidth": {
"value": 2
}
},
"update": {
"interpolate": {
"signal": "interpolate"
},
"strokeOpacity": {
"value": 1
}
},
"hover": {
"strokeOpacity": {
"value": 0.5
}
}
}
}
]
}
]
}
我想知道: