Filter by selection from referenced table Announcing the arrival of Valued Associate #679: Cesar Manara Planned maintenance scheduled April 23, 2019 at 23:30 UTC (7:30pm US/Eastern) Data science time! April 2019 and salary with experience The Ask Question Wizard is Live!Vega lite - accessing 'repeat' variable to use as filterVega visualization remove empty cells from filtered matrixHow to Recover data from a field Vegalite?Altair/Vega-Lite bar chart: filter top K bars from aggregated fieldAre selections in Vega visualizations accessible from outside Vega?altair selection in multiple chartsAltair - filter range by slider bindingIs it possible to create custom aggregations that work with selection filters in Altair/Vega-Lite?vega-lite line plot - color not getting applied in transform filterMulti cross-filtering in Vega-Lite
Sum letters are not two different
How do living politicians protect their readily obtainable signatures from misuse?
Time evolution of a Gaussian wave packet, why convert to k-space?
How to compare two different files line by line in unix?
One-one communication
Karn the great creator - 'card from outside the game' in sealed
Why weren't discrete x86 CPUs ever used in game hardware?
Flight departed from the gate 5 min before scheduled departure time. Refund options
Google .dev domain strangely redirects to https
If the probability of a dog barking one or more times in a given hour is 84%, then what is the probability of a dog barking in 30 minutes?
Is there public access to the Meteor Crater in Arizona?
How many time has Arya actually used Needle?
Why are vacuum tubes still used in amateur radios?
Why is it faster to reheat something than it is to cook it?
How can I set the aperture on my DSLR when it's attached to a telescope instead of a lens?
Would it be easier to apply for a UK visa if there is a host family to sponsor for you in going there?
Amount of permutations on an NxNxN Rubik's Cube
How many morphisms from 1 to 1+1 can there be?
What is the chair depicted in Cesare Maccari's 1889 painting "Cicerone denuncia Catilina"?
How does Belgium enforce obligatory attendance in elections?
What's the difference between the capability remove_users and delete_users?
Is multiple magic items in one inherently imbalanced?
What is best way to wire a ceiling receptacle in this situation?
What's the meaning of "fortified infraction restraint"?
Filter by selection from referenced table
Announcing the arrival of Valued Associate #679: Cesar Manara
Planned maintenance scheduled April 23, 2019 at 23:30 UTC (7:30pm US/Eastern)
Data science time! April 2019 and salary with experience
The Ask Question Wizard is Live!Vega lite - accessing 'repeat' variable to use as filterVega visualization remove empty cells from filtered matrixHow to Recover data from a field Vegalite?Altair/Vega-Lite bar chart: filter top K bars from aggregated fieldAre selections in Vega visualizations accessible from outside Vega?altair selection in multiple chartsAltair - filter range by slider bindingIs it possible to create custom aggregations that work with selection filters in Altair/Vega-Lite?vega-lite line plot - color not getting applied in transform filterMulti cross-filtering in Vega-Lite
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty height:90px;width:728px;box-sizing:border-box;
I have a single data source within datasets
that I use in two concatenated charts. Now when I click on a bar in the left chart I would like to filter the right chart. See animated gif:
But is doesn't.
Click here to open in the vega-editor.
Or check the spec here::
"config": "view": "width": 400, "height": 300,
"hconcat": [
"width": 100,
"selection": "SELECT": "type": "single", "resolve": "global",
"data": "name": "table_data",
"mark": "bar",
"encoding":
"x": "type": "nominal", "field": "Major_Genre",
"y": "aggregate": "count", "type": "quantitative",
"color": "type": "nominal", "field": "Major_Genre",
"fillOpacity":
"condition": "selection": "SELECT", "value": 1,
"value": 0.3
,
"width": 100,
"data": "name": "table_data",
"transform": ["filter": "selection": "SELECT"],
"mark": "bar",
"encoding":
"x": "type": "nominal", "field": "Major_Genre",
"y": "aggregate": "count", "type": "quantitative",
"color": "type": "nominal", "field": "Major_Genre"
],
"datasets":
"table_data": [
"Title": "Cidade de Deus",
"Major_Genre": "Drama",
"Country_Origin": "Brazil"
,
"Title": "Chocolate: Deep Dark Secrets",
"Major_Genre": "Thriller/Suspense",
"Country_Origin": "India"
,
"Title": "Fiza", "Major_Genre": "Drama", "Country_Origin": "India",
"Title": "First Love, Last Rites",
"Major_Genre": "Drama",
"Country_Origin": "United States"
,
"Title": "Foolish",
"Major_Genre": "Comedy",
"Country_Origin": "United States"
,
"Title": "I Married a Strange Person",
"Major_Genre": "Comedy",
"Country_Origin": "United States"
]
vega-lite
add a comment |
I have a single data source within datasets
that I use in two concatenated charts. Now when I click on a bar in the left chart I would like to filter the right chart. See animated gif:
But is doesn't.
Click here to open in the vega-editor.
Or check the spec here::
"config": "view": "width": 400, "height": 300,
"hconcat": [
"width": 100,
"selection": "SELECT": "type": "single", "resolve": "global",
"data": "name": "table_data",
"mark": "bar",
"encoding":
"x": "type": "nominal", "field": "Major_Genre",
"y": "aggregate": "count", "type": "quantitative",
"color": "type": "nominal", "field": "Major_Genre",
"fillOpacity":
"condition": "selection": "SELECT", "value": 1,
"value": 0.3
,
"width": 100,
"data": "name": "table_data",
"transform": ["filter": "selection": "SELECT"],
"mark": "bar",
"encoding":
"x": "type": "nominal", "field": "Major_Genre",
"y": "aggregate": "count", "type": "quantitative",
"color": "type": "nominal", "field": "Major_Genre"
],
"datasets":
"table_data": [
"Title": "Cidade de Deus",
"Major_Genre": "Drama",
"Country_Origin": "Brazil"
,
"Title": "Chocolate: Deep Dark Secrets",
"Major_Genre": "Thriller/Suspense",
"Country_Origin": "India"
,
"Title": "Fiza", "Major_Genre": "Drama", "Country_Origin": "India",
"Title": "First Love, Last Rites",
"Major_Genre": "Drama",
"Country_Origin": "United States"
,
"Title": "Foolish",
"Major_Genre": "Comedy",
"Country_Origin": "United States"
,
"Title": "I Married a Strange Person",
"Major_Genre": "Comedy",
"Country_Origin": "United States"
]
vega-lite
add a comment |
I have a single data source within datasets
that I use in two concatenated charts. Now when I click on a bar in the left chart I would like to filter the right chart. See animated gif:
But is doesn't.
Click here to open in the vega-editor.
Or check the spec here::
"config": "view": "width": 400, "height": 300,
"hconcat": [
"width": 100,
"selection": "SELECT": "type": "single", "resolve": "global",
"data": "name": "table_data",
"mark": "bar",
"encoding":
"x": "type": "nominal", "field": "Major_Genre",
"y": "aggregate": "count", "type": "quantitative",
"color": "type": "nominal", "field": "Major_Genre",
"fillOpacity":
"condition": "selection": "SELECT", "value": 1,
"value": 0.3
,
"width": 100,
"data": "name": "table_data",
"transform": ["filter": "selection": "SELECT"],
"mark": "bar",
"encoding":
"x": "type": "nominal", "field": "Major_Genre",
"y": "aggregate": "count", "type": "quantitative",
"color": "type": "nominal", "field": "Major_Genre"
],
"datasets":
"table_data": [
"Title": "Cidade de Deus",
"Major_Genre": "Drama",
"Country_Origin": "Brazil"
,
"Title": "Chocolate: Deep Dark Secrets",
"Major_Genre": "Thriller/Suspense",
"Country_Origin": "India"
,
"Title": "Fiza", "Major_Genre": "Drama", "Country_Origin": "India",
"Title": "First Love, Last Rites",
"Major_Genre": "Drama",
"Country_Origin": "United States"
,
"Title": "Foolish",
"Major_Genre": "Comedy",
"Country_Origin": "United States"
,
"Title": "I Married a Strange Person",
"Major_Genre": "Comedy",
"Country_Origin": "United States"
]
vega-lite
I have a single data source within datasets
that I use in two concatenated charts. Now when I click on a bar in the left chart I would like to filter the right chart. See animated gif:
But is doesn't.
Click here to open in the vega-editor.
Or check the spec here::
"config": "view": "width": 400, "height": 300,
"hconcat": [
"width": 100,
"selection": "SELECT": "type": "single", "resolve": "global",
"data": "name": "table_data",
"mark": "bar",
"encoding":
"x": "type": "nominal", "field": "Major_Genre",
"y": "aggregate": "count", "type": "quantitative",
"color": "type": "nominal", "field": "Major_Genre",
"fillOpacity":
"condition": "selection": "SELECT", "value": 1,
"value": 0.3
,
"width": 100,
"data": "name": "table_data",
"transform": ["filter": "selection": "SELECT"],
"mark": "bar",
"encoding":
"x": "type": "nominal", "field": "Major_Genre",
"y": "aggregate": "count", "type": "quantitative",
"color": "type": "nominal", "field": "Major_Genre"
],
"datasets":
"table_data": [
"Title": "Cidade de Deus",
"Major_Genre": "Drama",
"Country_Origin": "Brazil"
,
"Title": "Chocolate: Deep Dark Secrets",
"Major_Genre": "Thriller/Suspense",
"Country_Origin": "India"
,
"Title": "Fiza", "Major_Genre": "Drama", "Country_Origin": "India",
"Title": "First Love, Last Rites",
"Major_Genre": "Drama",
"Country_Origin": "United States"
,
"Title": "Foolish",
"Major_Genre": "Comedy",
"Country_Origin": "United States"
,
"Title": "I Married a Strange Person",
"Major_Genre": "Comedy",
"Country_Origin": "United States"
]
vega-lite
vega-lite
asked Mar 8 at 22:09
MattijnMattijn
4,11463042
4,11463042
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
When your selections refer to groups of points rather than single points, you need to provide an explicit fields
or encodings
argument to specify what points are included in the selection.
In this case, the chart will behave as expected if you specify your selection in one of the following ways:
"selection": "SELECT": "type": "single", "fields": ["Major_Genre"], "resolve": "global"
"selection": "SELECT": "type": "single", "encodings": ["color"], "resolve": "global"
"selection": "SELECT": "type": "single", "encodings": ["x"], "resolve": "global"
Here's the working chart in action: (vega editor link).
Thanks! Didn't expect three different answers!
– Mattijn
Mar 9 at 7:41
add a comment |
Your Answer
StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55071694%2ffilter-by-selection-from-referenced-table%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
When your selections refer to groups of points rather than single points, you need to provide an explicit fields
or encodings
argument to specify what points are included in the selection.
In this case, the chart will behave as expected if you specify your selection in one of the following ways:
"selection": "SELECT": "type": "single", "fields": ["Major_Genre"], "resolve": "global"
"selection": "SELECT": "type": "single", "encodings": ["color"], "resolve": "global"
"selection": "SELECT": "type": "single", "encodings": ["x"], "resolve": "global"
Here's the working chart in action: (vega editor link).
Thanks! Didn't expect three different answers!
– Mattijn
Mar 9 at 7:41
add a comment |
When your selections refer to groups of points rather than single points, you need to provide an explicit fields
or encodings
argument to specify what points are included in the selection.
In this case, the chart will behave as expected if you specify your selection in one of the following ways:
"selection": "SELECT": "type": "single", "fields": ["Major_Genre"], "resolve": "global"
"selection": "SELECT": "type": "single", "encodings": ["color"], "resolve": "global"
"selection": "SELECT": "type": "single", "encodings": ["x"], "resolve": "global"
Here's the working chart in action: (vega editor link).
Thanks! Didn't expect three different answers!
– Mattijn
Mar 9 at 7:41
add a comment |
When your selections refer to groups of points rather than single points, you need to provide an explicit fields
or encodings
argument to specify what points are included in the selection.
In this case, the chart will behave as expected if you specify your selection in one of the following ways:
"selection": "SELECT": "type": "single", "fields": ["Major_Genre"], "resolve": "global"
"selection": "SELECT": "type": "single", "encodings": ["color"], "resolve": "global"
"selection": "SELECT": "type": "single", "encodings": ["x"], "resolve": "global"
Here's the working chart in action: (vega editor link).
When your selections refer to groups of points rather than single points, you need to provide an explicit fields
or encodings
argument to specify what points are included in the selection.
In this case, the chart will behave as expected if you specify your selection in one of the following ways:
"selection": "SELECT": "type": "single", "fields": ["Major_Genre"], "resolve": "global"
"selection": "SELECT": "type": "single", "encodings": ["color"], "resolve": "global"
"selection": "SELECT": "type": "single", "encodings": ["x"], "resolve": "global"
Here's the working chart in action: (vega editor link).
edited Mar 9 at 4:33
answered Mar 9 at 3:22
jakevdpjakevdp
20.5k33758
20.5k33758
Thanks! Didn't expect three different answers!
– Mattijn
Mar 9 at 7:41
add a comment |
Thanks! Didn't expect three different answers!
– Mattijn
Mar 9 at 7:41
Thanks! Didn't expect three different answers!
– Mattijn
Mar 9 at 7:41
Thanks! Didn't expect three different answers!
– Mattijn
Mar 9 at 7:41
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55071694%2ffilter-by-selection-from-referenced-table%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown