简体   繁体   English

图表的这一部分在 Vega-Lite 中称为什么?

[英]What is this part of the chart called in Vega-Lite?

I'm trying to get rid of the right side of the box of a chart in Vega-Lite.我试图摆脱 Vega-Lite 中图表框的右侧。 I assume I can just set the color to white once I figure out what it's called.我想一旦我弄清楚它的名字就可以将颜色设置为白色。 It's not the domain or the grid, what is it?这不是域或网格,它是什么? For bonus points, what do I need to do to make it go away?对于奖励积分,我需要做什么才能让它消失? Thanks.谢谢。

图表的图片,其中有问题的部分用红色圈出

The line which you have highlighted is called stroke , you will find it in view config as it is a part of your chart view and provide the value as white or transparent.您突出显示的行称为stroke ,您将在view配置中找到它,因为它是图表视图的一部分,并提供白色或透明的值。

Refer the below snippet or editor reference:请参阅以下代码段或编辑器参考:

{
  "$schema": "https://vega.github.io/schema/vega-lite/v5.json",
  "description": "Google's stock price over time.",
  "data": {"url": "data/stocks.csv"},
  "transform": [{"filter": "datum.symbol==='GOOG'"}],
  "mark": "line",
  "config": {"view": {"stroke": "transparent"}},
  "encoding": {
    "x": {"field": "date", "type": "temporal", "axis": {"grid": false}},
    "y": {"field": "price", "type": "quantitative", "axis": {"domain": false}}
  }
}

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM