Rangeselector buttons flashing
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 45/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- javascript, react
- Lĩnh vực
- data-visualization, frontend
Hướng nghiên cứu
Bắt đầu bằng cách tái hiện issue #329 với component MonthlyStats được cung cấp và react-plotly.js 2.6.0, tập trung vào các nút rangeselector của xaxis và hành vi hover của chúng. So sánh hành vi này với thư viện Plotly bên dưới để xác định liệu lỗi nằm trong React wrapper này hay ở upstream. Được xem là hoàn tất khi đã xác định project chịu trách nhiệm và ghi lại một bản tái hiện tối thiểu hoặc vị trí đã xác nhận của bản sửa lỗi.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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;
- Ngôn ngữ chính
- JavaScript
- Star
- 1.1k
- Fork
- 138
- Merge trung bình
- 3 ngày 2 giờ
- Pull request đã merge (30 ngày)
- 4
Hướng dẫn đóng góp
Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của plotly/react-plotly.js
-
P3 plotly-internal size: 1 task
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 45/100
plotly/react-plotly.js#386 ·
-
enhancement P3 size: 1
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 65/100
plotly/react-plotly.js#380 · 7 bình luận ·
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 48/100
plotly/react-plotly.js#358 · 1 bình luận ·
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
plotly/react-plotly.js#354 ·
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 30/100
plotly/react-plotly.js#353 · 1 bình luận ·
Tất cả issue của plotly/react-plotly.js
Issue tương tự
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
avniproject/avni-client#2135 ·
-
automated broken-link
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 85/100
-
agent/security hive/hosted-available-lke648397-260827-5n31 security
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
-
enhancement
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
babalae/bettergi-scripts-list#3674 ·
-
A-Release-Notes C-Editing D-Modest S-Ready-For-Implementation
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
bevyengine/bevy-website#2595 ·