简体   繁体   English

如何将多个 VegaLite 图堆叠在一起

[英]How to stack multiple VegaLite graphs on top of each other

I am trying to recreate a certain graphing tool for my company (I'm an intern getting my BS still).我正在尝试为我的公司重新创建某种绘图工具(我是一名实习生,还在获得学士学位)。 I want to use VegaLite graphs to recreate a graph that is essentially 3 unique graphs stacked directly on top of each other.我想使用 VegaLite 图表重新创建一个图表,该图表本质上是 3 个直接堆叠在彼此之上的独特图表。 each graph has its own separate Y axis but they all share the same X axis (time).每个图表都有自己独立的 Y 轴,但它们都共享相同的 X 轴(时间)。 Right now I have populated 2 graphs but they are side by side.现在我已经填充了 2 个图表,但它们是并排的。 It would be helpful to be pointed in the right direction to figure out how to format the graphs placement so that each graph is directly on top of the each other.指出正确的方向以弄清楚如何格式化图形放置以使每个图形直接在彼此之上会很有帮助。 like so:像这样:

Graph1
Graph2
Graph3

It would also be helpful to learn how to format the X/Y axis labels and hide/remove the X axis of Graph1 and Graph2.学习如何格式化 X/Y 轴标签以及隐藏/删除 Graph1 和 Graph2 的 X 轴也很有帮助。 Thank you!谢谢!

You need a concat as described here.您需要一个 concat,如此处所述。 https://vega.github.io/vega-lite/docs/composition.html https://vega.github.io/vega-lite/docs/composition.html

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

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