vega-lite

How to link multiple plots with vega-lite only on horizontal axis?

冷暖自知 提交于 2020-07-10 05:17:39
问题 I have tested this: https://vega.github.io/editor/?#/url/vega-lite/N4IgJAzgxgFgpgWwIYgFwhgF0wBwqgegIDc4BzJAOjIEtMYBXAI0poHsDp5kTykBaADZ04JACyUAVhDYA7EABoQAEySYUqUAwBOgtCrVJOmNlADWESlAjEQAXyXEocqGrQBtUJm1JZEAGZs2ggeoP40gphw2vqqmAwIlBAAnghMbIIAvNkA5ACSAEIAsjn2ALpKyNpm+sKycIogcLLOyjSyZGigAB5dIOFwgsqxag1KmMk4DehRCDhBSHoOIMl9A0P6ONo0UGMgE1P6AI4Mvph0ajSk9ssQg3BQ53J92uTs8pr7k9Mg7VHaxEWjSY7WG6GgizgEBuDi8Pj8gWCoX6EX+I3iiRSaQy2UyOQA4gB5Qn40p2CogKo1dB1PbNVrtTqfXqfdZggxRRoHH6zeY

How to link multiple plots with vega-lite only on horizontal axis?

情到浓时终转凉″ 提交于 2020-07-10 05:17:08
问题 I have tested this: https://vega.github.io/editor/?#/url/vega-lite/N4IgJAzgxgFgpgWwIYgFwhgF0wBwqgegIDc4BzJAOjIEtMYBXAI0poHsDp5kTykBaADZ04JACyUAVhDYA7EABoQAEySYUqUAwBOgtCrVJOmNlADWESlAjEQAXyXEocqGrQBtUJm1JZEAGZs2ggeoP40gphw2vqqmAwIlBAAnghMbIIAvNkA5ACSAEIAsjn2ALpKyNpm+sKycIogcLLOyjSyZGigAB5dIOFwgsqxag1KmMk4DehRCDhBSHoOIMl9A0P6ONo0UGMgE1P6AI4Mvph0ajSk9ssQg3BQ53J92uTs8pr7k9Mg7VHaxEWjSY7WG6GgizgEBuDi8Pj8gWCoX6EX+I3iiRSaQy2UyOQA4gB5Qn40p2CogKo1dB1PbNVrtTqfXqfdZggxRRoHH6zeY

How to link multiple plots with vega-lite only on horizontal axis?

耗尽温柔 提交于 2020-07-10 05:15:59
问题 I have tested this: https://vega.github.io/editor/?#/url/vega-lite/N4IgJAzgxgFgpgWwIYgFwhgF0wBwqgegIDc4BzJAOjIEtMYBXAI0poHsDp5kTykBaADZ04JACyUAVhDYA7EABoQAEySYUqUAwBOgtCrVJOmNlADWESlAjEQAXyXEocqGrQBtUJm1JZEAGZs2ggeoP40gphw2vqqmAwIlBAAnghMbIIAvNkA5ACSAEIAsjn2ALpKyNpm+sKycIogcLLOyjSyZGigAB5dIOFwgsqxag1KmMk4DehRCDhBSHoOIMl9A0P6ONo0UGMgE1P6AI4Mvph0ajSk9ssQg3BQ53J92uTs8pr7k9Mg7VHaxEWjSY7WG6GgizgEBuDi8Pj8gWCoX6EX+I3iiRSaQy2UyOQA4gB5Qn40p2CogKo1dB1PbNVrtTqfXqfdZggxRRoHH6zeY

How to avoid zoom conflict in a line chart with layer?

蹲街弑〆低调 提交于 2020-07-10 01:44:54
问题 VEGA-lite is not perfect, but is very good, and in general for something that looks like a bug, there are a workaround... So I supposing that in this "bug" we have a workaround. ((edit after answer: it is not a real bug, is a "semantic bug" on the specification language)) The strange behaviour , a "semantic bug": I was using selection: { "grid": {"type":"interval", "bind":"scales"} } for zoom, in a trivial context, with simple mark: 'line' . When I add layer , it stopts to work . { title:

Points only in the central line

送分小仙女□ 提交于 2020-06-17 03:53:45
问题 I am using this example named "Line Chart with Point Markers" as reference, but not see other example or any clues about conditional or "selected by symbol" points. The illustration shows a typical case (see also SPC) where I need only the blue central line with dots. 回答1: You can do this by layering filtered versions of the dataset. Modifying the example you linked to, it might look something like this (vega editor): { "$schema": "https://vega.github.io/schema/vega-lite/v4.json",

Filtering an aggregated chart with another aggregation field

泪湿孤枕 提交于 2020-03-03 09:45:57
问题 I'm trying to produce something similar to the K-top example. Except that instead of filtering out and displaying the same aggregated field data, I want: to display one type of aggregated data (the max of daily temps) and filter on another aggregation field ( the mean of daily temps) I've created an observable notebook here to build my test case, and this is how far I got. { "$schema": "https://vega.github.io/schema/vega-lite/v4.json", "data": {"url": "data/seattle-weather.csv"}, "transform":

Filtering an aggregated chart with another aggregation field

 ̄綄美尐妖づ 提交于 2020-03-03 09:45:27
问题 I'm trying to produce something similar to the K-top example. Except that instead of filtering out and displaying the same aggregated field data, I want: to display one type of aggregated data (the max of daily temps) and filter on another aggregation field ( the mean of daily temps) I've created an observable notebook here to build my test case, and this is how far I got. { "$schema": "https://vega.github.io/schema/vega-lite/v4.json", "data": {"url": "data/seattle-weather.csv"}, "transform":

Drawing line plot for a histogram

喜你入骨 提交于 2020-03-01 03:46:11
问题 I'm trying to reproduce this chart using Altair as much as I can. https://fivethirtyeight.com/wp-content/uploads/2014/04/hickey-bechdel-11.png?w=575 I'm stuck at getting the black line dividing pass/fail. This is similar to this Altair example: https://altair-viz.github.io/gallery/step_chart.html. However: in the 538 viz the value for the final date must be extended for the full width of that last element. In the step chart example and my solution, the line stops as soon as the last date

Clamping y-axis when layering aggregated charts in vega-lite

丶灬走出姿态 提交于 2020-02-25 06:32:10
问题 This is a follow up from a previous question for wich I built a test case in a (hopefully now public) notebook and noticed the following behavior: At the end of the notebook, in the section bugs you will notice that y-axis of the max_precipitation of the layered chart using is clamped to 10. I tried changing the domain but the bars do not go above 10. Here the code example in vega-lite's editor reproduced below: { "$schema": "https://vega.github.io/schema/vega-lite/v4.json", "title": "Top