Questions tagged [vega-lite]

Vega-Lite is a high-level grammar of interactive graphics. It provides a concise JSON syntax for rapidly generating visualizations to support analysis. Vega-Lite specifications can be compiled to Vega specifications.

Documentation: https://vega.github.io/vega-lite/

Bug Report: https://github.com/vega/vega-lite/issues

Community Mailing List: https://groups.google.com/forum/#!forum/vega-js

1224 questions
35
votes
2 answers

Plotly express vs. Altair/Vega-Lite for interactive plots

Recently I am learning both Plotly express and Altair/Vega-Lite for interactive plotting. Both of them are quite impressive and I am wondering what their strengths and weaknesses are. Especially for creating interactive plots, are there any big…
roudan
  • 3,082
  • 5
  • 31
  • 72
20
votes
1 answer

altair remove or suppress automatically generated plot legend

When using the altair package I've noticed that when a chart is created a plot legend is also generated. The follow code: import altair as alt from vega_datasets import data alt.renderers.enable('notebook') cars =…
James Draper
  • 5,110
  • 5
  • 40
  • 59
10
votes
1 answer

How do I remove the border around a vega(-lite) plot?

Vega/Vega Lite plots have a faint gray border around them... is it possible to remove this via a configuration parameter, or do I need to render as SVG and use CSS to do so?
Tom Crockett
  • 30,818
  • 8
  • 72
  • 90
9
votes
3 answers

How to render class/org/flow/state chart/diagrams with Vega / Vega-lite

I can't find an example of a state/class/flow chart/org chart diagram with Vega. Are there any out there? It feels like Vega is perfectly suited for this (if a bit overpowered), but without an example to start from it's a rather steep learning…
Brian M. Hunt
  • 81,008
  • 74
  • 230
  • 343
9
votes
2 answers

Changing Size of Legend in Altair

I'm loving Altair for creating choropleth maps! My biggest problem, however, is I cannot figure out how to change the size of the legend. I've read through the documentation and tried several things to no avail. Here's an example using the…
Ragnar Lothbrok
  • 1,045
  • 2
  • 16
  • 31
8
votes
2 answers

Hours and minutes as labels in Altair plot spanning more than one day

I'm trying to create in Altair a Vega-Lite specification of a plot of a time series whose time range spans a few days. Since in my case, it will be clear which day is which, I want to reduce noise in my axis labels by letting labels be of the form…
fuglede
  • 17,388
  • 2
  • 54
  • 99
8
votes
1 answer

Setting a maximum axis value in Vega lite

I'm trying to make a simple stacked bar chart, only on the X axis. I have it working, with two values of 50, and 250. So the max of the X axis shows as 300. How do I force that to another value, like 500? So there is a gap from the last value, to…
7
votes
2 answers

How to hide the three-dot dropdown menu on a Vega chart?

I have a simple chart embedded in my website. Using the vega-lite spec v5. Here's an example: The circle with three dots triggers a drop-down menu with some actions, including opening the chart in an online vega editor. I don't want to expose these…
btk
  • 3,158
  • 2
  • 29
  • 30
7
votes
1 answer

How do I set the max and min of the x-axis of Vega-Lite time series chart?

I'm making time series charts with Vega-Lite and I want to set the min and max values of the x-axis independent of the values that are being displayed. The reason is that I'm displaying multiple time series side by side in separate charts, and I…
Theo
  • 131,503
  • 21
  • 160
  • 205
7
votes
1 answer

Adding the line of identity to a scatter plot using altair

I have created a basic scatter plot to compare two variables using altair. I expect the variables to be strongly correlated and the points should end up on or close to the line of identity. How can I add the line of identity to the plot? I would…
Rikard N
  • 427
  • 4
  • 16
7
votes
1 answer

Using Vega Charts in an Ionic App causes runtime errors in launching on some devices

Much to my chagrin, I've discovered that an Ionic 4 app that I've developed and tested successfully on my Android (8.0) phone, as well as on an iPhone, freezes on the splash screen on an Android (8.1) tablet and crashes during launch on an iPad.…
vicatcu
  • 5,407
  • 7
  • 41
  • 65
7
votes
3 answers

How to make Altair plots responsive

Can one make Altair plots fit the screen size, rather than have a pixel-defined width and height? I've read things about autosize "fit", but I am unsure about where to specify these.
herman
  • 432
  • 6
  • 9
7
votes
1 answer

vega-lite: how to specify date in JSON as separate fields containing year, month, and day numbers?

My JSON data is a list of objects, each object contains the date in this format: "date" : { "year" : 2019, "month" : 2, "day" : 17 }, How can I tell Vega-lite that this is a date? I have worked around this by creating another…
dcj
  • 73
  • 4
7
votes
3 answers

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. So, wanted to know if Vega-Lite has that capability. Please help me here as I am a…
JVM
  • 946
  • 1
  • 10
  • 23
6
votes
2 answers

Altair: Line Chart with Stroked Point Markers

I'm trying to create a line chart with point markers in Altair. I'm using the multi-series line chart example from Altair's documentation and trying to combine it with the line chart with stroked point markers example from Vega-Lite's documentation.…
Ragnar Lothbrok
  • 1,045
  • 2
  • 16
  • 31
1
2 3
81 82