Questions tagged [vega]

Vega is a visualization grammar, a declarative language for creating, saving, and sharing interactive visualization designs.

Vega Logo

With Vega, you can describe the visual appearance and interactive behavior of a visualization in a JSON format, and generate web-based views using Canvas or SVG.

More on Wikipedia: Vega and Vega-Lite visualisation grammars

Official Websites

865 questions
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
14
votes
0 answers

Vega and Kibana - Dynamic timestamp label and filtered queries

I am working with my first Vega visualization with Kibana. { $schema: https://vega.github.io/schema/vega-lite/v2.json title: Event counts from all indexes data: { url: { %context%: true %timefield%: last_submission …
betto86
  • 694
  • 1
  • 8
  • 23
12
votes
2 answers

How can I make a map using GeoJSON data in Altair?

I'm very new to mapping, and to Altair/Vega. There's an example in the Altair documentation for how to make a map starting with an outline of US states, which is created basically with: states = alt.topo_feature(data.us_10m.url,…
Jonathan
  • 10,571
  • 13
  • 67
  • 103
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
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

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
1 answer

dynamic name in Altair alt.condition

I am following this example to create a bar chart with conditional color formatting on negative values: import altair as alt from vega_datasets import data source = data.us_employment() alt.Chart(source).mark_bar().encode( x="month:T", …
AleAve81
  • 275
  • 3
  • 8
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
7
votes
3 answers

Unable plot with vincent in IPython

Trying to plot sample plot with vincent in IPython: import vincent vincent.core.initialize_notebook() list_data = [10, 20, 30, 20, 15, 30, 45] bar = vincent.Bar(list_data) bar.display() and nothing happens. Is there any special settings in…
szu
  • 932
  • 1
  • 9
  • 22
6
votes
1 answer

React-Vega - WARN Infinite extent for field "x": [Infinity, -Infinity]

The code work perfectly in the vega online editor. But there are warnings in the console while using in react component and the X-axis is not rendering in the output. import React from 'react'; import { Vega } from 'react-vega'; import {…
6
votes
1 answer

Generating 3D surface plots with Vega?

A current project requires us to use Vega Visualization Grammar wherever possible and otherwise fall back to D3.js. 3D-surface plots are not part of the Vega's gallery of examples, however Vega Documentation makes me optimistic that we could…
B--rian
  • 5,578
  • 10
  • 38
  • 89
6
votes
1 answer

Getting ggvis::export_png() working

Goal Export a ggvis figure as a PNG file (for inclusion in an .Rmd document). Problem I know essentially nothing about Node.js, other than that it is great and I should know more. I get as far as: library(ggvis) mtcars %>% ggvis(~mpg, ~wt) %>%…
dholstius
  • 1,007
  • 1
  • 7
  • 16
5
votes
1 answer

Altair chart: Show less lines in the grid

I'm working on a chart using Altair, and I'm trying to figure out how to have less lines in the background grid. Is there a term for that background grid? Here's a chart that looks like mine, that I took from the tutorial: Let's say that I want to…
Ram Rachum
  • 84,019
  • 84
  • 236
  • 374
1
2 3
57 58