-
Notifications
You must be signed in to change notification settings - Fork 795
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
naming parameter views of layered repeated charts + interactivity #2849
Comments
This issue is halted by vega/vega-lite#8733 which will define the strategy that Altair should take. |
vega/vega-lite#8662 might also be worth keeping an eye on. |
With VL5.7 released in editor I can see that it now behaves as follows: "params": [
{
"name": "brush",
"select": {"type": "interval", "encodings": ["x"]},
"views": [
"child__column_distance_layer_0",
"child__column_delay_layer_0",
"child__column_time_layer_0"
]
}
], So there is no list-nesting needed, now |
@ChristopherDavisUCI, do you have time available to work on this in the coming week? Otherwise will try as well. |
Hi @mattijn, in terms of looking at the Altair code, I definitely have time this week, it's more getting everything updated to the current place that is the sticking point for me... @mattijn could you briefly summarize the issue for me? Was this interactive crossfilter example working in a previous version (using our new parameter naming convention) and then it broke, or was it never working? |
Yes will do! The issue is currently only about
From the moment we introduced top-level defined parameters this has never worked (due not proper initiating the I think the following approach should be adopted, for the Interactive Crossfilter example:
"spec": {
"layer": [{
"name": "view_1",
"repeat": {"column": ["distance", "delay", "time"]}
"params": [
{
"name": "param_1",
"select": {"encodings": ["x"], "type": "interval"},
"views": [
"child__column_distance_view_1",
"child__column_delay_view_1",
"child__column_time_view_1"
]
}
], Where the view is defined as, See here a working specification how it should become: Open the Chart in the Vega Editor |
@ChristopherDavisUCI, I just merged PR in the Altair main repo, so the main branch of Altair is on VL5.7.1. I hope this will make it easier to work on this issue. Here a few steps that maybe helps getting up your local environment again after all the recent changes:
>>> from altair_viewer import get_bundled_script
>>> get_bundled_script("vega-lite", '5.7.1')
hatch run test If you need help, just ping! Edit: |
Thanks @mattijn, I hope to find some time this weekend! |
Those detailed instructions were very helpful @mattijn, thank you! I think my development environment is caught up. I will keep you updated... I need to refresh my memory on the logic of where the view naming is currently happening. Update: My first guess is that at least part of the problem is due to these lines: |
That is a separate issue, #3024, namely a repeat chart with params. |
As discussed in this comment: vega/vega-lite#8348 (comment). It is not really clear how we implemented naming of view in top-level parameters for a layered repeater.
This was partly discussed before here: #2684 (comment), and potentially initially implemented in this commit: f547323 (this commit was not merged), but this PR #2702 was merged where the actual change is included.
Moreover, the behavior we implemented previously does work in the following situation, -example 1- (using altair from main branch on github):
Example 1
Specifically note this part within
parameters
:Example 2
But the following specification:
leads to:
Specifically, our
params
looks as such:Where the vega-lite specification should be defined similar to this Open the Chart in the Vega Editor as is mentioned in this comment
Which contains a
params
definition as follows:As can be observed the
views
object is different.We might have missed something here. Maybe this is because example 2 contains a layered repeater object, where example 1 does not contain a layered repeater.
The text was updated successfully, but these errors were encountered: