As of May 31, 2023, we have updated our Code of Conduct.

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.

Filter by
Sorted by
Tagged with
1 vote
2 answers
85 views

Vega-lite / add dynamic layer based on range defined by joinaggregate columns

I'm building a milestone trend analysis chart with vega-lite. The vega-lite chart pulls a dataset (milestone date and finish date), calculates the range for the scales based on the subranges and plots ...
PhilippHof's user avatar
0 votes
2 answers
41 views

formatting text marks in a hconcat composition

I have this gist: my sample table I have two questions: Can I control the spacing between the 2nd "sumofvals" and the 3rd "the individuals" view control separately, I want them ...
Tom Martens's user avatar
0 votes
1 answer
17 views

How to use multiple marks in vega-lite whem embedded into HTML?

I want to embed a vega-lite chart into a html page. It should draw a line chart with additional point symbols. However, it seems that the vega-lite code for multiple layers does not work when it is ...
Jens's user avatar
  • 2,343
1 vote
1 answer
26 views

How to perform a lookup to same dataset in vega-lite

I'm using vega-lite 5.6.1 within the Deneb visual for Power BI. I've built a tree/matrix hybrid visual: Now I need to get child rows to dynamically lookup fields from their parent row. This needs ...
Sean McLarty's user avatar
0 votes
1 answer
95 views

Is there a way to get a drop-down hierarchical gantt in Deneb?

I've seen @david-bacci do some great work in Deneb . Specifically in this post Deneb/Vega-Lite: Hierarchial y-axis on a Gantt chart I want to know though if it is possible to have those top categories ...
mike_mussini's user avatar
0 votes
0 answers
29 views

How can I show multiple event values in a Deneb (vega-lite) PowerBI tooltip?

In PowerBI using a Deneb (vega-lite) visual, I have created a horizontal timeline (similar to a Gantt chart, but all along one timeline), with point marks along the timeline whenever an event occurred....
Caitlin's user avatar
0 votes
1 answer
24 views

Is there a way to change the formatting (font, color, etc.) of the interactive elements for "bind"?

Using the bind property in vega-lite will show an interactive element (e.g., a slider, dropdown, radio, etc.). For example, in https://vega.github.io/vega-lite/docs/bind.html, there is a sample ...
dkcheng's user avatar
1 vote
1 answer
26 views

encoding based on condition, somehow like an else if

this is my vega-lite spec { "data": { "values": [ {"group": "I", "groupSort": 1, "segment": "A", "val": 1}...
Tom Martens's user avatar
0 votes
1 answer
26 views

How can I overlay two scatter plots using different Elasticsearch data sources in vega-lite?

I want to overlay two scatter plots created from different sources of data using elasticsearch index. I am able to use "layer" to use one data source to create two different plots but not ...
yelo95's user avatar
  • 1
0 votes
1 answer
21 views

Map difference from Vega- Lite Topojson and UN map for Morocco and western Shara

We are using Vegalite to draw a global map, we have used the topo-json provided by Vega. when we compared Morocco and Western maps generated from Vega Topo Json and the UN map of Morocco and Western ...
vijay MR's user avatar
1 vote
1 answer
19 views

How to assign y axes and scales to the layers in Dual-Axis multi-layer charts

I have a multi-layer visual showing actuals as a bar chart w. text marks aka labels, and a few different goals showing as line charts. Note: this is just a minimalistic test case. The real visual is ...
VladB's user avatar
  • 59
1 vote
1 answer
35 views

How To Set Dynamic Max Domain in VegaLite

I have a vega-lite plot that streams data, and I want the domainMax for x-axis to always be one value higher than the extent of the data. I'm using ExprRef to specify what I want "encoding": ...
P JMU's user avatar
  • 69
1 vote
1 answer
31 views

Condition working for text but not bar in vega-lite power bi chart

I have the Deneb custom chart in Power BI. I have been building a chart and have it mostly working. What I'm struggling with is having a few conditional marks on the chart. I have this working for a ...
intoccabile's user avatar
1 vote
2 answers
19 views

vega-lite change rank order with a parameter not working for some reason

I have a ranked chart that I want to change sort order for and it does not work for me; wonder if anyone can tell me what I missed. I looked at it more, after posting the question and sort does not ...
keepTrackOfYourStack's user avatar
0 votes
1 answer
41 views

custom labels on x axis

I am trying to put labels on x-axis but I am getting 'undefined'. this is what i achieve so far: flatten not working, I tried separate flatten as well as one array. I need replace density values with ...
newDev's user avatar
  • 33
1 vote
1 answer
68 views

AttributeError: module 'altair' has no attribute 'selection_point'

I'm trying to make a drop down menu and I am getting this error below. I'm not really understanding why since I've used alt.Chart and alt.binding_select before and it didn't get any problems. I'm a ...
jejelim's user avatar
  • 33
0 votes
1 answer
35 views

Aggregate a fields values from elastic search documents using Kibana to have one value as a final search result

our application log file is defined as a multi-document in elastic search since each document has one line of the log file saved in the message field. I am now trying to collect all the documents ...
Oraib EDghaim's user avatar
1 vote
1 answer
64 views

In a Deneb bar chart with data labels, how do I sort the Y axis?

I have a bar chart created with Deneb, which I originally sorted by a DAX measure ("Measure1"). After I added a new mark to show data labels, the chart is not sorted correctly anymore. Why ...
Davide Di Franco's user avatar
1 vote
1 answer
66 views

vega-lite deneb grouped bar chart - Labels positioning

i am still polishing this project: Vega-Lite / Deneb grouped bar chart (The solution code from above link is pasted at the bottom + image). I would like to add data labels to this visual showing ...
WojtekW's user avatar
  • 25
1 vote
3 answers
43 views

Can 'on-hover' text be added to VegaLite chart's legends for when the text to render gets cut off?

An example When I have overly long, or many items in the legend, some of the legend item's text will get truncated. Is there some way of adding some 'on-hover' text so that when I mouse-over the ...
Greg Bartlett's user avatar
2 votes
1 answer
52 views

How to dispatch vega-lite events from JavaScript

I am trying to emulate vega-lite events to trigger interactions on charts manually through javascript. I am able to dispatch events and get them to be reconized by the listner, however the event doesn'...
David saffo's user avatar
0 votes
1 answer
23 views

Make Gantt chart using aggregation or grouping two data set

I am making a gantt chart to display some ongoing and overlapping tasks, My problem data is similar to this, { {hashcode=idR, operation='start', time=09-May-2023 14:08:17.900,userName='B',...
jagdish samdani's user avatar
1 vote
3 answers
50 views

Add rule mark on top of multiple layers

I'm pretty new to Vega/Deneb and can't figure out how to add a global rule mark to my chart. When I add it as a new layer, it displays a rule mark for each bar (see code below) Can somebody help? Many ...
WhoKnowss's user avatar
0 votes
2 answers
28 views

Vega expression debug messages in Kibana

I cannot seem to get debug messages to show up in vega in kibana. The docs say I can use the functions warn(), info(), and debug() in expressions and they will print to the console which I assumed is ...
Currn Hyde's user avatar
1 vote
1 answer
65 views

can I bind a condition to a slider when the condition uses a datum?

This is a chart that I have; I would like to tie the percentage text conditional test to the slider, is there a way to do this? { "$schema": "https://vega.github.io/schema/vega-lite/...
keepTrackOfYourStack's user avatar
1 vote
1 answer
64 views

Vega-Lite / Deneb grouped bar chart

I am trying to use the code for Gantt chart provided by HoosierBi in his youtube video, but not to show 100% Gantt chart, but to achive grouped bar chart. I would like to see projects grouped by ...
WojtekW's user avatar
  • 25
1 vote
1 answer
28 views

How to specify the order of labels in the color legend of Vega?

I have the following definition which draws lines from two groups of data: A and B. When using the "color" property in "encoding", Vega will create a legend for the colors and will ...
Olivier Melançon's user avatar
1 vote
1 answer
44 views

In a Deneb bar chart, how do I apply conditional formatting based on a DAX measure?

I've created a Deneb bar chart, and I would like to apply a diffrent color to the bars based on a DAX measure in Power BI. For instance, if the value is greater than 200, I want the bar to be red, ...
Davide Di Franco's user avatar
-1 votes
1 answer
53 views

Is it possible to put a label inside every circle in a scatter plot in vega-lite?

Is there a way to put a label inside the circle of a bubble chart, I have the following chart developed in Vega-lite. I am uploading my script too, inside the circle I want to show to the value of “...
Manish Chhipa's user avatar
2 votes
2 answers
40 views

Can you clip marks to a region based on other marks in Vega-Lite?

I would like to create a table with circle marks representing the table values, that are clipped to the underlying cell region. Is it possible to implement this behavior in Vega-Lite? The closest ...
sabine's user avatar
  • 66
0 votes
1 answer
34 views

Create repetitive line chart in vega-lite

I am trying to create 3 line chart on same dashboard. I used 'repeat' and getting result, but i can't modify y-axis. this is what i currently get but I need have y-axis which calculated as rank *60 - ...
newDev's user avatar
  • 33
1 vote
2 answers
139 views

Deneb/Vega-Lite: Hierarchial y-axis on a Gantt chart

I'm trying to make a Deneb Gantt chart, but I'd like to show the Projects grouped by Assignee ( quite the same way as if I had a Power BI table and I'd stack both Assignee and Project on rows, I could ...
nirnroot's user avatar
  • 664
1 vote
1 answer
20 views

Color encoding in multi layer chart not relfecting as intended in Vega-Lite

I am attempting to encode specific colours to circle marks plotted on a second Y-Axis. However, it seems as if the color encoding is inherited from an encoding declared in a preceding layer. This is ...
Deston's user avatar
  • 97
1 vote
1 answer
40 views

How to 'set' legend order in Vega-Lite charts, bonus for being able to set/assign specific colors to specific lines

Here is an example I have a Vega-Lite chart where I would like to set/impose the order that items appear in the chart's legend (ex: have the 'Vorpal Rabbits' appear first, in the noted example). Also, ...
Greg Bartlett's user avatar
1 vote
1 answer
36 views

How to set an auto scale for text number in Vega-Lite

I have a Vega-Lite chart built in a Power BI report that is underpinned by a dimensional model. The report offers users the ability to drill down into categories and I would like for the chart to ...
Deston's user avatar
  • 97
1 vote
1 answer
55 views

Custom legend colors in Vega-Lite chart

When I have more than one line layer on my chart, the line colors in the legend do not match the line color in the chart itself. I want to have the legend color match the line color, ie, if the line ...
Greg Bartlett's user avatar
1 vote
1 answer
32 views

Text marks in a nested layered chart built in Vega-Lite

I am attempting to add total text marks to my nested layered chart. It works fine with text marks added to one of the bar marks: text marks added to 1 bar mark - VL editor But as soon as I add for ...
Deston's user avatar
  • 97
1 vote
1 answer
31 views

Creating a Horizontal State/StatusBar in Vega-Lite

I have been trying to use rectangles to shade a region of the 'state' of something over a time period. This application is for a time series database with information like: { "time": <...
Gene Parmesan's user avatar
0 votes
1 answer
49 views

Changing the scale on a vega-lite waterfall

I would like to scale the y-axis of a vega-lite waterfall so that the y-axis does not start at 0 and the corresponding bars in the chart are formatted correctly with the right numbers. I was able to ...
user21693260's user avatar
1 vote
1 answer
25 views

How to get colours to appear on map in Vega-Lite?

I have a map of the world to display road deaths in each country. I'm trying to create a choropleth map, where the shade of the colour is dependant on the amount of deaths in that country. The figures ...
Cian O'Reilly's user avatar
1 vote
2 answers
36 views

Applying different colours to line charts in Vega-Lite

In my multi layered chart, where the 2 lines shares the same second Y-Axis; I am attempting to apply a different colour to the second line to distinguish it as the prior year. However, the same colour ...
Deston's user avatar
  • 97
1 vote
1 answer
23 views

Conditionally define color channel on multi-line graph

I have a graph with two lines, I want the option to toggle a param to combine the two lines into one. Vega-lite allows you to encode a field with a condition, but I can't seem to "define nothing&...
markson edwardson's user avatar
1 vote
1 answer
23 views

Data in bar mark not depicted accurately in Vega-Lite visual and flipping stacked bars

The data in my Vega-Lite visual is not being depicted accurately. Visually, the total of my target mark is higher than the total of the Usage PY mark: Looking at the data, the correct numbers are ...
Deston's user avatar
  • 97
1 vote
0 answers
17 views

The input spec uses Vega-Lite v4.8.1, but the current version of Vega-Lite is v5.7.0

Good day! I have been getting this warning for a while and have not found a way to get rid of it. The warning reads: The input spec uses Vega-Lite v4.8.1, but the current version of Vega-Lite is v5.7....
CarlaVdB's user avatar
  • 145
0 votes
1 answer
35 views

Filter and sum in Vega lite

I am trying to plot a line graph using Vega-Lite (in Airtable) which plots cumulative sum of a field by date. I want to filter out data points with empty dates. I somehow need to combine the "...
Richard W's user avatar
1 vote
1 answer
56 views

Is there a way to rename fields in Vega-lite

In working with data sources that have field names with spaces, I often struggle with having to insert datum['field name with space'] in various parts of my specs. I'm looking for a way to (pseudocode)...
scrampy's user avatar
  • 43
1 vote
1 answer
31 views

Automatic chart axes using json

I'm building a graph using json, and I would like that the start and the end of the axis (x and y) to be automatically adjusted according to the data. And also I would like to set the tick intervarl (...
fernando lupinacci's user avatar
1 vote
1 answer
51 views

Text mark (data label) placement in a layered Vega-Lite chart

I am attempting to exercise greater control in the placement of text marks within a chart that has dual Y-Axis; however, applying an independent scale throws the text mark placement out of kilter. ...
Deston's user avatar
  • 97
1 vote
1 answer
73 views

Enable multi line / wrap of single legend label text in vega-lite

I am trying to ensure that the text of the legend label (the text is not from the core data set, but separately declared values) will line break / wrap and not be clipped if the text string is too ...
cb789's user avatar
  • 25
1 vote
1 answer
52 views

Altair showing error on graphs and vega-lite itself isn't

I have some vega-lite specifications in a csv that I want to load into python and show using altair. I am loading them in as strings, converting to json, and then using altair to display them, which ...
hutmh's user avatar
  • 11

1
2 3 4 5
24