-
Notifications
You must be signed in to change notification settings - Fork 17
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
Enable pure JS linking of the view, selection, and hover state #82
Comments
Having had a quick look, using Say we have the following setup. import jscatter
import pandas as pd
df_one = pd.DataFrame({
'id': ['a', 'b', 'c'],
'x': [1, 2, 3],
'y': [1, 2, 3],
})
df_two = pd.DataFrame({
'id': ['b', 'c', 'a'],
'x': [1, 2, 3],
'y': [1, 2, 3],
})
config = {
'x': 'x',
'y': 'y',
'color_by': 'id',
'size': 20,
'legend': True
}
scatter_one = jscatter.Scatter(data=df_one, **config)
scatter_two = jscatter.Scatter(data=df_two, **config)
jscatter.link([scatter_one, scatter_two], match_by='id') Simply linking the selection won't work because Any thoughts @manzt? |
Yeah, I'm not sure I can think of a workaround either unfortunately. Maybe that's too convoluted, or not even possible. I'm just wondering if there is a common case that could be supported with |
Would it be possible to check if the dataframe has a range index and only in this case use jslink? I would be potentially interested in this feature ... I am working on a website complementing a publication such that readers can interactively explore the dataset. To my understanding, currently multiple synchronized plots require a callback to the server, and my concern is that this would degrade performance for users in Europe if the site is hosted in the US. Is this a reasonable concern that might be solved by using jslink? |
@abast that could work. Do you want to draft how this could be implemented? jslink would for sure be faster than any server as it avoids any server request. |
When exporting a notebook to HTML via the following snippet, the resulting HTML file properly renders the scatter plot instance and data but the view, selection, and hover linking do not work as they currently require a Python kernel. However, this is not necessary. By using
jslink()
we can ensure that the linking works with and without a Python kernel. Therefore, we should switchjslink()
overobserve()
.The text was updated successfully, but these errors were encountered: