Search code examples
vega-lite

cross-filtering with different chart encodings via `hconcat` and `layer`


I was trying to adapt the cross-filter example from the gallary to have an additional chart that is not a numeric value, e.g., origin from the flights data set in the same example. However, the selections became rather strange after I moved the transform into the hconcat layer---opening a new chart instead of updating in place. I also wasn't sure how the selections composed across the charts now that there is another level of composition (hconcat in additional to repeat layering).

Open the Chart in the Vega Editor

Thanks for the help!


Solution

  • I was able to ping Arvind for an answer here:

    Open the Chart in the Vega Editor

    The error I had was that the repeat was outside of the spec, but it should have been inside the hconcat spec. Also, minor correct: interval selections do work on nominal axes.