-
Notifications
You must be signed in to change notification settings - Fork 616
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
chart with repeat and a defined name disables the independency of the repeated channel (eg y-axis) #8446
Comments
Hopefully the cause of #8348 🙏 |
Hi @mattijn, my best guess is that for your example, in the code here vega-lite/src/normalize/core.ts Line 179 in 4556109
There is already some special logic for dealing with layers here; see especially this line. But if I understand right, that code only gets called if we have something like Does that give you any ideas? |
How critical is this issue? It seems weird to name a chart inside a repeat since the name will not be predictable anyway. Can you just remove the name from the chart? |
Its eventually to get this spec working, from here: #8348 (comment): Click to open Chart in Vega-Editor The spec renders, but once you start interacting, e.g. start with creating an interval at the last chart, x-axis time (binned), and then delay (binned) and then distance (binned), there are conflicts. Even though this type of chart is maybe not very common in practice, it is one of the selling-charts of vega-lite. The layer name is predictable as it is defined in Altair code. See also quote from Arvind:
|
> The layer name is predictable as it is defined in Altair code. What do you mean by this? I don't think were (Vega-Lite) make guarantees about generated names being consistent across versions. |
Our current approach of providing interactivity using params for compound charts is based on this #8230 (comment):
Using this approach we almost got all examples working. Except the layered repeat charts + interactivity. But just before the layered repeat charts + interactivity, are the repeat charts + interactivity. This we still got working by
"spec": {
"name": "view_1",
"repeat": {
"column": ["sepalLength", "sepalWidth"],
"row": ["petalLength", "petalWidth"]
},
"params": [
{
"name": "param_1",
"select": {"type": "interval", "encodings": ["x", "y"]},
"bind": "scales",
"views": [
"view_1child__row_petalLengthcolumn_sepalLength",
"view_1child__row_petalLengthcolumn_sepalWidth",
"view_1child__row_petalWidthcolumn_sepalLength",
"view_1child__row_petalWidthcolumn_sepalWidth"
]
}
] So here it is I took the code snippets from the following example specification that we used during development: Open the Chart in the Vega Editor, see related vega/altair#2684 (comment). Regarding the layered repeat charts + interactivity, I don't think we implemented this part yet on the Altair side, see vega/altair#2849, since it is also still halted here. All above is implemented in the following section of the Altair codebase. Addendum: hopefully it won't give noise, but this is my notebook with all type of Altair based compound charts that we have tested our developments on: colab notebook |
When a
name
is defined within alayer
within arepeat
spec
as such:Than the axis of the chart get confused, see the following screenshot:
Open the Chart in the Vega Editor
VL-spec:
When removing
"name": "FOO"
of the spec; the circles will be correctly displayed on the axis again:The text was updated successfully, but these errors were encountered: