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;








1















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:
enter image description here



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"

]











share|improve this question




























    1















    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:
    enter image description here



    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"

    ]











    share|improve this question
























      1












      1








      1








      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:
      enter image description here



      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"

      ]











      share|improve this question














      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:
      enter image description here



      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






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Mar 8 at 22:09









      MattijnMattijn

      4,11463042




      4,11463042






















          1 Answer
          1






          active

          oldest

          votes


















          1














          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).






          share|improve this answer

























          • Thanks! Didn't expect three different answers!

            – Mattijn
            Mar 9 at 7:41











          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
          );



          );













          draft saved

          draft discarded


















          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









          1














          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).






          share|improve this answer

























          • Thanks! Didn't expect three different answers!

            – Mattijn
            Mar 9 at 7:41















          1














          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).






          share|improve this answer

























          • Thanks! Didn't expect three different answers!

            – Mattijn
            Mar 9 at 7:41













          1












          1








          1







          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).






          share|improve this answer















          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).







          share|improve this answer














          share|improve this answer



          share|improve this answer








          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

















          • 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



















          draft saved

          draft discarded
















































          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.




          draft saved


          draft discarded














          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





















































          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







          Popular posts from this blog

          Save data to MySQL database using ExtJS and PHP [closed]2019 Community Moderator ElectionHow can I prevent SQL injection in PHP?Which MySQL data type to use for storing boolean valuesPHP: Delete an element from an arrayHow do I connect to a MySQL Database in Python?Should I use the datetime or timestamp data type in MySQL?How to get a list of MySQL user accountsHow Do You Parse and Process HTML/XML in PHP?Reference — What does this symbol mean in PHP?How does PHP 'foreach' actually work?Why shouldn't I use mysql_* functions in PHP?

          Compiling GNU Global with universal-ctags support 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!Tags for Emacs: Relationship between etags, ebrowse, cscope, GNU Global and exuberant ctagsVim and Ctags tips and trickscscope or ctags why choose one over the other?scons and ctagsctags cannot open option file “.ctags”Adding tag scopes in universal-ctagsShould I use Universal-ctags?Universal ctags on WindowsHow do I install GNU Global with universal ctags support using Homebrew?Universal ctags with emacsHow to highlight ctags generated by Universal Ctags in Vim?

          Add ONERROR event to image from jsp tldHow to add an image to a JPanel?Saving image from PHP URLHTML img scalingCheck if an image is loaded (no errors) with jQueryHow to force an <img> to take up width, even if the image is not loadedHow do I populate hidden form field with a value set in Spring ControllerStyling Raw elements Generated from JSP tagds with Jquery MobileLimit resizing of images with explicitly set width and height attributeserror TLD use in a jsp fileJsp tld files cannot be resolved