Questions tagged [vega-embed]

24 questions
0
votes
0 answers

Is there a way to zoom out of a vega-embed plot programatically?

I know how to enable zooming and panning with the mouse in vega-embed. I would like to zoom out one step programatically after pushing data into vega-embed. Is this somehow possible?
Manuel
  • 6,461
  • 7
  • 40
  • 54
0
votes
0 answers

Vega-lite circle chart does not render but same specs in vega editor renders circle chart

I am trying to render a line chart using vega-lite in my react app. It gets rendered as follows: As per the specs it should get rendered as follows (notice the circular data points in green line chart): I copy pasted the spec in vega editor and it…
MsA
  • 2,599
  • 3
  • 22
  • 47
0
votes
1 answer

Element does not exist in React's componentDidMount

I have following react component: var ForumActivityTimeLine = React.createClass({ componentDidMount: function () { this.showActivityLineChart() }, showActivityLineChart() { const lineChartSpec =…
MsA
  • 2,599
  • 3
  • 22
  • 47
0
votes
1 answer

Vega viz truncated on grow

My web app has a vega-lite chart (from altair) with some transform_filter. The issue is that the visualization doesn't grow when initial filters are removed. Because of this the visualization is truncated, neither don't scroll bars appear: Char is…
dani herrera
  • 48,760
  • 8
  • 117
  • 177
0
votes
1 answer

How do I re-position an axes for a re-positioned bar chart mark?

I need to create a visualization that contains multiple marks, namely 2 bar charts side by side. I need them to be in the same vega spec, not 2 separate vega specs. After much research and a decent amount of trial and error, I discovered you can…
irwazr
  • 77
  • 1
  • 9
0
votes
1 answer

How to set miximum for max value displayed on y-axis in vega lite

I want set minimum for maximum value displayed on line chart. For example, it should always display values from 0 to 100 on y-axis, something as follows: I achieved this with: vl.y().fieldQ('d').scale({"domain":[0,2]}), as can be seen in the…
MsA
  • 2,599
  • 3
  • 22
  • 47
0
votes
1 answer

Sorting in vegalite screws when changing values from fraction to percentage

I have specified sorting in vegalite api as -y as shown below: vl.markLine().data(video_data).encode( vl.x() .fieldN('names') //nominal …
MsA
  • 2,599
  • 3
  • 22
  • 47
0
votes
1 answer

Slider for chloropeth map Vega-lite

I am trying to add a slider for my chloropeth map of Europe in vega-lite, to filter the data by year. I currently have a map which just shows data from 2019 (colour coded), and I am trying to make a slider so I can change years and see how the…
jamesj477
  • 3
  • 1
0
votes
2 answers

What should the value parameter look like when programmatically triggering a signal in Vega?

In one of my view's layers I have "params": [ { "name": "selectedFeature", "select": { "type": "point", "fields": ["order"] } } I'm using vega-embed and added a signal…
Mathieu Dhondt
  • 8,405
  • 5
  • 37
  • 58
1
2