Rangeselector buttons flashing
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 3/5
- Geschätzter Aufwand
- 1-2 Tage
- Anfängerfreundlichkeit
- 45/100
- Issue-Typ
- Bug
- Klarheit
- Größtenteils klar
- Aktivitätsstatus
- Veraltet
- Tech-Stack
- javascript, react
- Bereich
- data-visualization, frontend
Rechercherichtung
Beginne damit, issue #329 mit der bereitgestellten MonthlyStats-Komponente und react-plotly.js 2.6.0 zu reproduzieren, wobei du dich auf die xaxis-rangeselector-Schaltflächen und deren Hover-Verhalten konzentrierst. Vergleiche das Verhalten mit der zugrunde liegenden Plotly-Bibliothek, um festzustellen, ob der Fehler in diesem React-Wrapper oder upstream liegt. Als abgeschlossen gilt die Aufgabe, wenn das verantwortliche Projekt identifiziert und eine minimale Reproduktion oder der bestätigte Ort der Fehlerbehebung dokumentiert wurde.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
I have a simple react plotly chart. I've been playing around with styles and such, but no matter what I do all but the left most rangeselector buttons continuously flash on hover. Including a video below.
I'm using react-plotly.js 2.6.0 and will include my component code in it's entirety below.
Is this an issue I should direct to the main plotly library?
https://github.com/plotly/react-plotly.js/assets/7331495/73eb4341-ed2f-4cf8-b2d5-c4ba9ab60e0c
import { useEffect, useState } from "react";
import Loading from "./Loading";
import Plot from 'react-plotly.js';
import { PropTypes } from "prop-types";
import React from "react";
import { formatMonthData } from "../utils/formatMonthData";
const MonthlyStats = ({userId}) => {
const [loading, setLoading] = useState(false);
const [months, setMonths] = useState([])
const [runMiles, setRuns] = useState([])
const [walkMiles, setWalks] = useState([])
useEffect(() => {
const retrieveData = async () => {
setLoading(true);
const response = await fetch(`https://us-central1-stroller-stats.cloudfunctions.net/app/monthly-activities/${userId}`)
const data = await response.json();
const [months, runDistances, walkDistances] = formatMonthData(data)
setMonths(months)
setRuns(runDistances)
setWalks(walkDistances)
setLoading(false);
}
retrieveData()
}, [userId])
const data = [
{
x: months,
y: runMiles,
type: 'scatter',
name: "Run miles",
mode: 'lines+markers',
marker: {color: '#03045e'},
line: {color: "#03045e", width: 3}
},
{
x: months,
y: walkMiles,
type: 'scatter',
name: "Walk miles",
mode: 'lines+markers',
marker: {color: "#00f5d4"},
line: {color: "#00f5d4", width: 3}
},
]
const layout = {
font: {family: "Inter", color: "black"},
font_color: "black",
dragmode: false,
xaxis: {
rangeselector: {
buttons: [{
step: 'month',
stepmode: 'backward',
count: 6,
label: '6m'
},{
step: 'year',
stepmode: 'todate',
count: 1,
label: 'YTD'
}, {step: 'all'}]
},
type: "date", 'tickformat': '%b', tickmode: "array", tickvals: months},
yaxis: {visible: true, hoverformat: ".2f"},
hovermode: "x",
tickformat: ".0f",
legend: {
orientation: "h"
},
margin: { r: 0, l: 15, t: 0}
}
return (
<>
<h1>Monthly stroller miles</h1>
{loading ? <Loading /> :
<Plot
data={data}
layout={layout}
useResizeHandler={true}
style={{width: "100%"}}
config={{displayModeBar: false}}
/>}
</>
);
}
MonthlyStats.propTypes = {
userId: PropTypes.string.isRequired,
}
export default MonthlyStats;
- Vorherrschende Sprache
- JavaScript
- Sterne
- 1.1k
- Forks
- 138
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Entwicklungsumgebung
Dieses Projekt bietet weder Dev-Container noch Dockerfile noch Beitragsleitfaden – die Einrichtung liegt bei Ihnen. Beginnen Sie mit der README; die allgemeinen Schritte stehen in unserem Leitfaden für den ersten Beitrag.
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus plotly/react-plotly.js
-
P3 plotly-internal size: 1 task
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 45/100
plotly/react-plotly.js#386 ·
-
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 48/100
plotly/react-plotly.js#358 · 1 Kommentar ·
-
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 35/100
plotly/react-plotly.js#354 ·
-
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 30/100
plotly/react-plotly.js#353 · 1 Kommentar ·
-
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 35/100
plotly/react-plotly.js#352 · 1 Kommentar ·
Alle Issues in plotly/react-plotly.js
Ähnliche Issues
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 66/100
riverqueue/river#1576 ·
Maintainer antworten meist innerhalb von 1 Tag
-
documentation good first issue
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 72/100
Maintainer antworten meist innerhalb von 1 Tag
-
good first issue help wanted
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 88/100
modrollstudio/Modroll-Studio-Website#80 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag
-
good first issue help wanted
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 85/100
mafzalkalwardev/mailforge#21 ·
-
good first issue help wanted
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 82/100