question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Duplicate signal name: "selector080_Fiscal_Week"

See original GitHub issue

I am trying to create a regression line using Altair and Streamlit and I am getting the following error while trying to execute the same: Duplicate signal name: “selector080_Fiscal_Week”

Below is the code I am using:

import streamlit as st
import pandas as pd
import numpy as np
import altair as alt

def scatter_chart(f, col1, col2):
    scatter = alt.Chart(f).mark_point().encode(
    x=col1,
    y=col2,
    tooltip=[col1, col2]).interactive()
    reg = scatter.transform_regression(col1,col2).mark_line()
    return scatter

st.altair_chart(scatter_chart(df, scatter_opt1, scatter_opt2), use_container_width = True)

Please let me know the issue and how to resolve it ?

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
jakevdpcommented, May 19, 2020

OK, in that case the issue is that you are layering two charts with the same interaction signal, exactly as in my snippet above. The solution is to put the interaction in only one of the layers, like this:

import altair as alt
chart = alt.Chart('data.csv').mark_point()
chart + chart.interactive()
0reactions
anshulcool1989commented, May 19, 2020

Thanks a lot for the help. Your solution worked.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Altair : Duplicate signal name: "selector080_columnName"
Duplicate signal name : “selector080_Fiscal_Week”. Below is the code I am using: import streamlit as st import pandas as pd
Read more >
Altair selection error: "Javascript Error: Duplicate signal name
But I get the following error: Javascript Error: Duplicate signal name: "selector074_index" This usually means there's a typo in your chart ...
Read more >
Is there a straightforward way to get names or IDs of signals ...
a list of signal names to log is stored in an Excel file (no duplicate signal names allowed); the model as built has...
Read more >
Dark Bramble Duplicate Signal Question : r/outerwilds - Reddit
Any signal, be it for your signalscope, or from your ship or scout will get duplicated by a DB seed. So you would...
Read more >
duplicated preloaded scene with signals problem - Q&A
Just guessing, but I assume you want to change the argument on your duplicate() call from 1 to 5 . Looking at the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found