'Duplicate signal name' error for shared param across views
See original GitHub issueWhen 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).
{
"facet": {
"column": {
"field": "name"
}
},
"spec": {
"repeat": {
"layer": [
// "y1", // Uncomment this to trigger bug
"y2"
]
},
"spec": {
"layer": [
{
"mark": {
"type": "line",
"interpolate": "monotone"
},
"encoding": {
"x": {
"field": "x",
"type": "quantitative"
},
"y": {
"field": {
"repeat": "layer"
},
"type": "quantitative"
},
"color": {
"datum": {
"repeat": "layer"
},
"legend": {
"title": "Legend"
}
}
}
},
{
"mark": {
"type": "circle"
},
"encoding": {
"x": {
"field": "x",
"type": "quantitative"
},
"y": {
"field": {
"repeat": "layer"
},
"type": "quantitative"
},
"color": {
"datum": {
"repeat": "layer"
},
"legend": {
"title": "Legend"
}
},
"opacity": {
"condition": {
"test": {
"selection": "sel1"
},
"value": 1
},
"value": 0
}
},
"selection": {
"sel1": {
"type": "single",
"encodings": [
"y"
],
"on": "mouseover",
"nearest": true,
"empty": "none"
}
}
}
],
"width": 350,
"height": 200
}
},
"data": {
"values": [
{
"name": "foo",
"x": 1,
"y1": 1,
"y2": 21
},
{
"name": "foo",
"x": 2,
"y1": 2,
"y2": 22
},
{
"name": "foo",
"x": 3,
"y1": 3,
"y2": 23
},
{
"name": "bar",
"x": 4,
"y1": 10,
"y2": 31
},
{
"name": "bar",
"x": 5,
"y1": 11,
"y2": 32
},
{
"name": "bar",
"x": 6,
"y1": 12,
"y2": 33
}
]
}
}
Issue Analytics
- State:
- Created 3 years ago
- Comments:14 (7 by maintainers)
Top Results From Across the Web
vega lite - Defining params at top-level in layer chart gives ...
When you try to provide params at top level, then you get the duplicate signal error . This is because the vega-lite is...
Read more >Altair : Duplicate signal name: "selector080_columnName"
I am trying to create a regression line using Altair and Streamlit and I am getting the following error while trying to execute...
Read more >Nastran Dmap Error Message List - Siemens PLM
In DMAP, when defining a parameter, the "N" in V,N %1 means user cannot set the value of the parameter with name %1...
Read more >Managing views | BigQuery - Google Cloud
For instructions on renaming a view when you copy it, see Copying a view. You cannot change the name of an existing view...
Read more >Part 5. Sharing Data Between Callbacks - Dash Plotly
Why Global Variables Will Break Your App. Dash is designed to work in multi-user environments where multiple people view the application at the...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
The reply from @kanitw with top-level defined params and a layered chart can be resolved using
views
withinparams
in combination with aname
definition on a single chart object within the layer: Open the Chart in the Vega EditorStatus of a chart with a:
repeat
operator ¶ms
within thespec
: Open the Chart in the Vega Editorrepeat
operator ¶ms
top-level: Open the Chart in the Vega Editorrepeat
operator ¶ms
top-level using aviews
attribute andname
: Open the Chart in the Vega Editorrepeat
operator on alayer
¶ms
on the first object withinlayer
: Open the Chart in the Vega Editor (slow!)repeat
operator on alayer
¶ms
top-level: Open the Chart in the Vega Editorrepeat
operator on alayer
¶ms
top-level using aviews
attribute &name
on the first object withinlayer
: Open the Chart in the Vega Editor (slow!)The following issue is also related to the
repeat
operator on alayer
withparams
top-level using aviews
attribute &name
on the first object within layer: https://github.com/vega/vega-lite/issues/8348, but there is still another issue with brush not resolving properly.I’m able to replicate this when we add params to top-level for multi-view charts