-
Notifications
You must be signed in to change notification settings - Fork 617
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
'Duplicate signal name' error for shared param across views #6890
Comments
Thanks for the bug report. To isolate the issue, can you try to simplify the spec to a minimal spec? |
It already is. Uncomment the line, it will break. Comment the line, it will not break. It has two lines, each with three points, so that you can see the hover in action reliably. It has one x coord, and two y coords, so you can actually see the difference when repeating for two fields. See the Observablehq page linked above if you want to play with layer/facet/repeat options. |
Could you do me a favor and try to reproduce the issue with just layer and no repeat? It would help us isolate the problem. |
I cannot. It works fine without repeat.
|
Hello, do you have any solution to this issue ? I'm trying to have a tooltip like this while using the If you have any hint that would be appreciated 😄 thanks ! |
I haven't looked into this issue yet. To make debugging easier it would be awesome if you could create a minimal example. |
I'm able to replicate this when we add params to top-level for multi-view charts
|
Hard to believe this bug has been open for over two years and is now a P2. As from days spent trying to work around it, it reduces both primary means of dealing with data complexity, faceting and repeats, as no longer supporting direct interaction. I guess this yields a "Graphenberg" state, you can see your data, or you can interact with it, but you can't do both :-( |
The reply from @kanitw with top-level defined params and a layered chart can be resolved using Status of a chart with a:
The following issue is also related to the |
First, thank you very much for the timely and informative answer with several examples. Alas, I've spent a day trying, but my attempts to generalize your solution and apply it to my particular charts have not met with much success. I just can't seem to get a faceted repeated layered specification to work. Working simple facet(repeat(layer)) without interaction: Open the Chart in the Vega Editor Broken attempt to add interaction version 1 of 10: Open the Chart in the Vega Editor Note: These are not meant to be great graphics, just the smallest perturbation to your examples that reflected the nesting structure I need for my data (multiple factor columns and repeated metric fields). Hopefully there is a known workaround for this version of the problem. Thanks, |
Two things:
The following Vega-Lite spec, Open the Chart in the Vega Editor: {
"$schema": "https://vega.github.io/schema/vega-lite/v5.json",
"data": {"url": "data/weather.csv"},
"facet": {"field": "location", "type": "nominal"},
"spec": {
"repeat": {"layer": ["temp_max", "precipitation", "wind"]},
"spec": {
"layer": [
{
"name": "FOO",
"mark": "rule",
"encoding": {
"x": {"field": "date", "timeUnit": "month"},
"color": {"value": "black"},
"opacity": {"value": 1}
}
},
{
"mark": {"type": "line", "point": false},
"encoding": {
"x": {"field": "date", "timeUnit": "month"},
"y": {"field": {"repeat": "layer"}, "aggregate": "mean"},
"color": {"datum": {"repeat": "layer"}, "type": "nominal"}
}
}
]
}
}
} Result in the following error: Duplicate data set name: "FOO_marks". If you remove
You can use a As such, Open the Chart in the Vega Editor: {
"$schema": "https://vega.github.io/schema/vega-lite/v5.json",
"data": {"url": "data/weather.csv"},
"transform": [{"fold": ["temp_max", "precipitation", "wind"]}],
"facet": {"field": "location", "type": "nominal"},
"params": [
{
"name": "HIGHLIGHT",
"select": {
"type": "point",
"nearest": true,
"on": "mouseover",
"clear": "mouseout",
"encodings": ["x"]
},
"views": ["CHART_0"]
}
],
"spec": {
"layer": [
{
"name": "CHART_0",
"mark": "rule",
"encoding": {
"x": {"field": "date", "timeUnit": "month"},
"color": {"value": "black"},
"opacity": {
"condition": {"param": "HIGHLIGHT", "empty": false, "value": 1},
"value": 0
}
}
},
{
"mark": {"type": "line", "point": true},
"encoding": {
"x": {"field": "date", "timeUnit": "month"},
"y": {"field": "value", "aggregate": "mean", "title":"Mean of temp_max, precipitation, wind"},
"color": {"field": "key", "type": "nominal", "title":null}
}
}
]
}
} And a bonus, using row/column facetting and a shared rule: Open the Chart in the Vega Editor |
Open the Chart in the Vega Editor
Thanks, |
|
1) I tried unsuccessfully to locate the explicit definition of "name" by
searching the vega-lite site. It is listed in the parameter definition, but
I don't recall seeing it elsewhere?
2) That is the significantly aggregated data set, it starts at O(2T)
records ;-)
Thanks,
Jim
…On Fri, Oct 7, 2022 at 12:36 PM Mattijn van Hoek ***@***.***> wrote:
1. I also tried encoding name. Its intuitive, but it is not in the
list of https://vega.github.io/vega-lite/docs/encoding.html, so
probably silently ignored (cc @domoritz <https://github.com/domoritz>).
2. Yes, with that datasize please aggregate before rendering. We have
good experiences with duckdb in combination with vega-lite.
—
Reply to this email directly, view it on GitHub
<#6890 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AC4LRFH44URNGTL3F3VOEOLWCB3UVANCNFSM4RVI7XHQ>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
bump |
When using repeat to layer multiple fields, one is unable to use hover to implement any interaction. An error is shown
Error: Duplicate signal name: "sel1_tuple"
See https://observablehq.com/@cjnygard/vega-lite-bug for implementation (you can play with the flags in the plot4() function to true different combinations of hover, repeat, and facet. It's clearly related to the repeat, as shown in the below generated JSON (generated from the page above).
The text was updated successfully, but these errors were encountered: