简体   繁体   English

Vega-Lite 是否提供 Vega 提供的所有功能?

[英]Does Vega-Lite provide all the features that Vega provides?

I am trying to develop an interactive chart using Vega-Lite but I am not able to find any documentation that refers to interactive chart, mainly eventlisteners.我正在尝试使用 Vega-Lite 开发交互式图表,但我找不到任何涉及交互式图表的文档,主要是事件监听器。

So, wanted to know if Vega-Lite has that capability.所以,想知道 Vega-Lite 是否有这种能力。

Please help me here as I am a newbie and really need to develop an interactive chart preferably using Vega-Lite, if possible;请在这里帮助我,因为我是一个新手,如果可能的话,我真的需要最好使用 Vega-Lite 开发一个交互式图表; otherwise I will go with Vega.否则我会和维加一起去。

No. Vega supports everything that vega-lite does, as vega-lite is compiled into vega code.不。Vega 支持 vega-lite 所做的一切,因为 vega-lite 被编译成 vega 代码。 However, vega-lite does not support everything that vega does.然而,vega-lite 并不支持 vega 所做的一切。

However, if you want to use vega-lite, but want to take advantage of a feature available only in vega (like interactivity), you can start with vega-lite code, convert it into vega code (the online vega editor allows this) and then continue editing the vega code.但是,如果您想使用 vega-lite,但想利用仅在 vega 中可用的功能(如交互性),您可以从 vega-lite 代码开始,将其转换为 vega 代码( 在线 vega 编辑器允许这样做)然后继续编辑vega代码。

Specifying interactivity in Vega-Lite will be possible as of some time in mid-2017.从 2017 年年中的某个时间开始,可以在 Vega-Lite 中指定交互性。 Here is the announcement, including a paper and a demo video: Vega-Lite: A Grammar of Interactive Graphics这是公告,包括论文和演示视频: Vega-Lite:交互式图形语法

As the accepted answer said: No. Let me provide examples:正如接受的答案所说:不。让我举个例子:

  • SVG graphics support: You can't choose how to render your chart (image, svg) in Vega Lite. SVG 图形支持:您无法选择如何在 Vega Lite 中呈现图表(图像、svg)。
  • Week timeunit support: You can set timeunit to "week" only in Vega, this missing property is particularly frustrating.周时间单位支持:您只能在 Vega 中将时间单位设置为“周”,这个缺失的属性尤其令人沮丧。
  • Select drop-down lists: Adding drop down lists that update chart upon selection are available only in Vega.选择下拉列表:添加在选择时更新图表的下拉列表仅在 Vega 中可用。
  • Some Donut chart styling properties: Vega privdes more options to customize the look of the Donut chart.一些圆环图样式属性:Vega 提供了更多选项来自定义圆环图的外观。

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

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