Questions tagged [vega]
Vega is a visualization grammar, a declarative format for creating, saving and sharing visualization designs.
810
questions
0
votes
0
answers
7
views
Specify multiple data sources in react vega
In react vega, we can create a component using:
<Vega data={data} spec={spec}/>
It works fine when I have a single data source. How to use two data sources so that I can use lookup on the ...
0
votes
2
answers
11
views
Vega Lite script doesn't retrieve data from extrenal url
I created this public json data url: https://json.extendsclass.com/bin/fe8c1cc6bebf
Now I want to incluse this url in vega script, but its not working.
Note that it's working with data 'inside the ...
2
votes
1
answer
38
views
Convert Vega (Deneb) Gauge to Work in PowerBI
Code: Link
For me it seems like the value of "83%" is hardcoded and I want this to adjust based on a Power BI Measure. I feel like I am really missing something, but isn't there a way to ...
0
votes
1
answer
25
views
What will be the pandas equivalent of the following altair transformation?
I've been trying to create a parallel set chart with the help of altair, but am unable to understand what the below mentioned code means, esp. the transform_window function. I've looked up the ...
0
votes
2
answers
36
views
Vega compute relative change based on another column value
Suppose I have the following vega data table:
c x y
a 5 10
a 6 12
a 7 14
a 8 16
b 5 20
b 6 22
b 7 24
b 8 26
I want to compute the relative change in y when x = 6 for both a and b. First, I need to ...
2
votes
1
answer
16
views
Vega line plot from json data
If I have data in the form below as a json file:
{"groups":[{"days":[17,22,23,27,31],"experiment":"S1","value":[[19.77,23.92,22.19,20.47,25.85],[21.78,...
0
votes
0
answers
26
views
Can't get the data from an elastic index
with your help, i managed to create a dynamic textbox whose data is contained directly in the vega code. However, the goal is to display this textbox in a kibana dashboard. The textbox should get the ...
0
votes
0
answers
12
views
How to add action buttons to a Kibana DashBoard table?
I currently have a Kibana ( 8.3.3 ) DashBoard that uses data from Elastic Search ( Data View ).
In this DashBoard I have a table that shows flows, the number of messages sent through each flow etc.
I ...
1
vote
0
answers
27
views
Vega or Vega Lite in Deneb generates the following error "Cannot read properties of null (reading 'marktype')"
I´ve run in the problem in Vega and Vega Lite that I couldn´t generate a signal that needs a field from data.
Example:
{
"name": "summeSignal",
"update": &...
0
votes
1
answer
34
views
Dynamic Textbox from Data Values
I need your help again. Now I need to build a textbox with dynamic text in it. It should look like this:
The code of the shown box is this:
{
"$schema": "https://vega.github.io/...
1
vote
2
answers
42
views
Dynamic Chart Title From Data Values
I want to take the title of my vega-chart directly from the data which are base of the chart. For example the title of this chart should be 'charttitle':
{
"$schema": "https://vega....
1
vote
1
answer
24
views
Achieving custom tooltip containing multiple columns in vega-lite
I am able to prepare following visualization with vegalite:
The code for this visualization looks like following:
{
"width": 400,
"config": {"view": {"...
1
vote
1
answer
31
views
Vega-Lite - How to Combine Line and Symbol Legend
I am able to implement vega-lite chart which renders as follows:
The code for it looks something like this:
{
"width": 400,
"config": {"view": {"continuousWidth&...
-1
votes
0
answers
12
views
Area stack - I'm having trouble identifying the error
I want to graph the data transfer rate per day using a Stacked Area Chart Example and when the graph is displayed it only takes the date but the Y axis is not taking the data from the transform ...
0
votes
1
answer
19
views
Pan and Zoom in Vega-Lite scatterplot
I have created a scatter plot that works well, but I need to add zoom and pan functionality to it.
I have searched online for a solution, but I haven't found one that works for my particular case. Can ...
0
votes
1
answer
42
views
How to add additional data to Vega lite tooltip?
I'm trying to add an additional value (in this case z) to the tooltip. How can I achieve this with the following schema I have so far? I know it should be along the lines of adding additional objects ...
0
votes
1
answer
32
views
Displaying Repeated Values for Range (Color) in Ordinal Scales?
I'm trying to create a discrete mapping between values and colors for a Vega visualization. I don't know beforehand exactly the values that I'll be getting (I'm pulling in data from Elasticsearch), ...
1
vote
1
answer
25
views
Why is my vega-lite tooltip attached to a rule so slow
I have this vega-lite chart (based on the seattle-weather data).
It includes a vertical "rule" mark that moves on hover, and has a tooltip attached to it. I find that the rule feels very ...
0
votes
0
answers
31
views
Circular dendrogram with Altair
I'm trying to build a circular dendrogram with Python.
This example from Vega is perfect: https://vega.github.io/vega/examples/radial-tree-layout/
But after several days, I've been unable to reproduce ...
0
votes
0
answers
21
views
Elasticsearch + Vega - Implode/Join Values from Nested Aggregation
My IoT devices send documents like these:
{
"systems_used": [
{
"system_name": "Motor",
"system_id": "1"
},
{
"...
0
votes
0
answers
23
views
Vega-Lite: Enable Autosizing for Faceted Plot
I would like to set the width of a faceted plot dependent on the size of my window (I'm using the Vega-Lite plot in Kibana).
This would be a minimal example:
{
"$schema": "https://...
1
vote
1
answer
25
views
Vega lite: Add Total Column to Table Visual
Here is my script:
https://vega.github.io/editor/#/url/vega-lite/...
1
vote
1
answer
31
views
How to calculate MAX from a dataset column in original Vega
I'm working on a Power BI Deneb visual, using original (not Lite) Vega syntax. I'm trying to calculate a maximum value from a column of my dataset, containing only integers. I could do this on Power ...
1
vote
1
answer
31
views
Vega-lite: How to split one column into multiple rows
I would like to split one column into multiple rows.
This is my code
It should be 3 months in each row like:
Jan Feb Mar
Apr Mai Jun
Jul Aug Sep
Oct Nov Dec
Thanks in advance!
enter image description ...
1
vote
1
answer
37
views
How to add a title to a concat in Vega-Lite
How do I add a title to each concat in a spec?
I'd like to insert titles on top of every concat.
Here's what I did so far (preview/code here)
Here's an example of the result I'd like to achieve:
...
0
votes
1
answer
51
views
How do I make a stacked bar graph in Vega-Lite where the bars are count but the data labels are percent?
I am trying to make a stacked bar chart in vega-lite so that I can use it with Deneb in PowerBI. In this simple example), the expected behaviour is that the X-axis should be variety, and the Y-axis ...
2
votes
1
answer
32
views
How do I vertically align symbols, so that they align with the y-axis labels?
I'm trying to create a bar and symbol plot which shares the same axes. The issue I am having is that the symbol is aligning to the top of the bar instead of the center. Is this even possible with the ...
1
vote
1
answer
35
views
How can I unbind legend on a facetted layered graph (Vega-Lite) (Deneb)
My issue is that legends and color encoding are functionning correclty appart on different layer of my visualization, but when I have the color encoding of two layered mark together, nothing works ...
1
vote
3
answers
75
views
Vega Zoomable USA Map
I want to use this map https://vega.github.io/vega/examples/zoomable-world-map/ but only for USA.
I used this spec.
private specVega = {
"$schema": "https://vega.github.io/schema/...
1
vote
1
answer
37
views
What type of Vega marks to show a point along a scale? (see image)
I am attempting to create a visualization where we are showing a score along a scale, something like this:
The scale is based on quartiles of a large dataset (these are pre-calculated and don’t need ...
1
vote
1
answer
39
views
Labels on Rects in Vega Stacked Bar Chart
In the old vega-label documentation there is reference to a labeled stacked bar chart example. The example spec doesn’t work in the online Vega editor, throwing an error that a.map is not a function.
...
0
votes
1
answer
38
views
The Vega-lite x-axis displays the specified number of data
Here is my generated pic, my x-axis is too large, so if I wanna display specified number, how can I fix my code?
I tried to cut my data source from ES DSL as my breakthrough point, but cumulative_sum ...
0
votes
1
answer
42
views
Vega-lite timeseries chart that overlays current, last year and average in a cyclical way
I have a simple timeseries with a price over time: [{t:"2023-01-31", price: 100}, ...].
With vega-lite.js I can easily plot this as a line.
The script for that is here.
But, I'd like to ...
1
vote
1
answer
26
views
How do I use aggregates in grouped marks?
I'm trying to use the min and max aggregates of a quantitative column (Total bombers) grouped by another column (Country) in a rule mark of my visual. I want the rule y property to start at the ...
1
vote
1
answer
22
views
Facet graph : how to filter Y - array field
As you can see here in the editor, the version axis shows the version of all product, for each products.
On the exemple there is only 2 products, but I am working with an undefined numbers of products,...
1
vote
0
answers
56
views
How to align 0 value in multiple y axis layered chart in Vega-lite?
In Vega-lite, I want to align y-axis values, so that zeroes are in the same place and negative values go below x-axis. Is it possible to do in Vega-lite? I can't hardcode the domain limits, as the ...
1
vote
1
answer
34
views
Can I partially color a bar based on percentage complete on a temporal axis?
I am trying to create a Gantt chart and I want to color a single task with two colors, based on a percentage complete. Say, make the complete part green and the remaining part orange.
How can I ...
1
vote
1
answer
84
views
Encode a Field using Conditions in Vega-Lite
OBJECTIVE
I'm trying to add data labels to my chart, however I have multiple bars layered on top of each other, and I need the data labels to hover over different bars depending on if values in a ...
1
vote
1
answer
35
views
Tooltips on points not working in vegalite v5 spec
I have the following Vega-Lite v5 spec:
vega editor
{
"$schema": "https://vega.github.io/schema/vega-lite/v5.json",
"encoding": {
"x": {"field"...
0
votes
0
answers
22
views
Pan and Zoom a Radial Tree Layout in Vega
Looking to be able to Pan and Zoom a Radial Tree Layout( not a Tree Layout)
I have searched Google and found "Pan and Zoom Tree in Vega"
1
vote
1
answer
76
views
How to access the value of a single datum in a dataset using an expression in Vega Lite
We are attempting to parameterize the y-axis domain range by allowing the user to create simple measures (y_min=0.3, y_max=0.7) in PowerBI, and then access these measures within the Vega-lite JSON ...
0
votes
1
answer
23
views
How to use sequential schemes in vega-scale api with linear or log scale
In our project we are using vega-scale to generate heatmaps for numeric data. We managed to use a sequential scheme like viridis with scale = vega.scale('sequential').interploate(vega.scheme('viridis')...
1
vote
0
answers
22
views
How to set color based on interval selection in Vega-lite for line mark?
I am trying to make interval selection in Vega-lite change color to grey for not selected line segment (see in vega editor) and it keeps selecting line as whole. What can be done to achieve it?
It is ...
0
votes
1
answer
24
views
Vega lite plot state transition in a day
I need to plot the state transition of different agents in a 24h span. I can visualize the transitions:
But I need this to be a 24h span (from 00:00 to 00:00 of the next day)
I tried adding scaling:
&...
1
vote
1
answer
62
views
Vega Lite Conditional Grid Format
This is my settings for y axis
field: 'a',
"type": "nominal",
axis: {
title: null,
labelFontSize: 10,
labelColor: '#94A3B8',
...
1
vote
1
answer
26
views
How to colour code a heatmap in Vega Lite?
I am trying to make a simple heatmap showing the distribution of premier league scores however despite my colour scheme all values are showing '0'...
{
"$schema": "https://vega.github....
1
vote
1
answer
23
views
Vega lite, y-axis columns are not in the middle of the grid
I added grid for both, x and y axis. For 'x' it works well, but with 'y' something strange, columns are not in the middle of the lines.
My encoding object:
encoding: {
x: {
field: 'b',
...
1
vote
1
answer
32
views
Vega lite, reduce amount of labels on the x-axis
I need to reduce amount of x-axis labels because now you can see what is going on:
Is it possible to adjust the step on the x-axis? I didn't find it in the documentation. In my case, it automatically ...
0
votes
0
answers
21
views
How to add a gradient color and solve the wrong cursor indicating issue in vega chart
Current mouse cursor is not working well.
It indicates wrong tooltip.
And I want to set item gradient color.
current code is like this
import React from "react";
import { Vega } from "...
0
votes
1
answer
88
views
Vega-lite interactive Bar Chart
I am trying to make a basic interactive chart where the user can select a country and observe a single measurement based on the height of the bar. However, prior to selecting a country, the chart ...