Table Unable to Become Invisible with 'updatemenus' Buttons
Nadie ha tomado este issue todavía.
- Lenguaje dominante
- JavaScript
- Estrellas
- 18.3k
- Forks
- 2k
- Merge medio
- 2 d 12 h
- PR fusionados (30 d)
- 28
Descripción
I love plotly.js, such a fantastic library. I have very little javascript knowledge and yet have accomplished quite a lot. Unfortunately, I have run into a problem with the layout/updatemenus buttons. I am trying to create a set of buttons that would allow a user to switch from a "Chart" mode to a "Table" mode. When the user clicks "Table", it successfully displays the table, as you can see from the included codepen. Unfortunately, once the table is set to visible, it will never leave the screen, no matter what you select. The table continues to obscure the chart after you select "Chart".
https://codepen.io/rar83/pen/OJVvXWW
If this is indeed a bug, could someone possibly point out an alternative way of doing this? Or it is quite possible I am just using the plotly.js badly.
I have included a portion of the relevant code to show how I am turning on/off visibility, just as the documentation shows.
var updatemenus=[
{
buttons: [
{
args: [{'visible': [true, true, true, true, false]},{'xaxis.visible': true, 'yaxis.visible': true, 'autosize': true}],
label: 'Chart',
method: 'update'
},
{
args: [{'visible': [false, false, false, false, true]},{'xaxis.visible': false, 'yaxis.visible': false, 'autosize': false, 'width': 500}],
label: 'Table',
method:'update'
}
],
direction: 'left',
pad: {'r': 5, 't': 5},
showactive: true,
type: 'buttons',
x: 0.01,
xanchor: 'left',
y: 1.1,
yanchor: 'middle',
font: {size: '30'}
}
]
Guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Línea de trabajo
Comience con el CodePen enlazado y la configuración de layout/updatemenus proporcionada; rastree las llamadas method: 'update' y sus arrays visible para los botones Chart y Table. Reproduzca ambas transiciones y confirme que seleccionar Chart elimina la tabla y restaura el diseño del gráfico.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- javascript
- Área
- data-visualization, frontend
- Tipo de issue
- Error
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Estado de actividad
- Estancado
- Claridad
- Bastante claro
- Aptitud para principiantes
- 35/100