plotly / plotly/react-plotly.js
Range Slider - Slider handles gets overlapped by the plot lines.
Nadie ha tomado este issue todavía.
- Lenguaje dominante
- JavaScript
- Estrellas
- 1.1k
- Forks
- 138
- Merge medio
- 3 d 2 h
- PR fusionados (30 d)
- 4
Descripción
Overall this is a good library. This have been most useful to me and my team. Recently I found a bug where the range slider handles gets overlapped by the plot representation when a re-render has happened on a chart with multiple Y axis. This become a huge issue when the range slider is filled with multiple plot representations. Like 5 or more.
Code to reproduce.
const [chartData, setChartData] = useState<any[]>([]);
const [chartLayout, setChartLayout] = useState<any>({});
useEffect(() => {
setChartLayout({
...,
xaxis: {
rangeslider: {
autorange: true,
},
},
yaxis: { title: "One" },
yaxis2: {
title: "Two",
titlefont: { color: "rgb(148, 103, 189)" },
tickfont: { color: "rgb(148, 103, 189)" },
overlaying: "y",
side: "right",
},
});
}, []);
useEffect(() => {
setChartData([
{
x: [1, 2, 3],
y: [40, 50, 60],
name: "yaxis data",
type: "scatter",
},
]);
}, []);
const addSeries = () => {
const existingArr = [...chartData];
existingArr.push({
x: [2, 3, 4],
y: [4, 5, 6],
name: "yaxis2 data",
yaxis: "y2",
type: "scatter",
});
setChartData(existingArr);
};
return (
<Plot
data={chartData}
layout={chartLayout}
revision={revisionNumber}
/>
)
as above code describes its a pretty simple React component. This issue can only be reproduced to above scenario (or I only found this scenario). I have an initial data set for one plot in the state. Then I append another data set for another plot. So it should now draw two plots. It draws the two plots but as visible in the below video the range slider handles are getting overlapped. Also chart should have multiple Y axis.
I have tried to test this with having both plot data together for an initial render. Range slider works without the mentioned issue.
Guía de contribución
No hay ninguna guía de contribución indexada para este repositorio
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
Comienza con el punto de entrada Plot del componente React y reproduce la secuencia proporcionada: renderiza una serie, añade una segunda serie, usa múltiples ejes Y y habilita xaxis.rangeslider. Compara la superposición de los controles del range-slider antes y después del renderizado de nuevo; se considera terminado cuando los controles permanecen visibles con múltiples representaciones del gráfico.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- javascript, plotly, react
- Área
- data-visualization, frontend
- Tipo de issue
- Error
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Estado de actividad
- Estancado
- Claridad
- Bastante claro
- Aptitud para principiantes
- 35/100