plotly / plotly/react-plotly.js
Graphs do not render in PopOS React App
Chưa có ai nhận issue này.
- 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
Mô tả
I am making a React app using Plotly connected to a flask backend. However, my graphs only display as white squares that when hovered over display the plotly toolbar.
This is a picture of what it looks like: here
When I use the command npm start, I get this message which might have something to do with it:
WARNING in ./node_modules/plotly.js/dist/plotly.js
Module Warning (from ./node_modules/source-map-loader/dist/cjs.js):
Failed to parse source map from '/home/david/Programming/Python-Projects/Investment-Hunter-Web/frontend/node_modules/plotly.js/dist/maplibre-gl-unminified.js.map' file: Error: ENOENT: no such file or directory, open '/home/david/Programming/Python-Projects/Investment-Hunter-Web/frontend/node_modules/plotly.js/dist/maplibre-gl-unminified.js.map'
Can anyone help me figure out why my plotly graphs are not displaying at all?
My code seems relatively straightforward as I hard coded the numbers to begin with just to get something going:
import React from 'react';
import Plot from 'react-plotly.js'
function Portfolio() {
const growthPortfolio = [{
values: [19, 26, 55],
labels: ['Residential', 'Non-Residential', 'Utility'],
type: 'pie',
hole: 0.4,
}]
const valuePortfolio = [{
values: [30, 40, 30],
labels: ['Residential', 'Non-Residential', 'Utility'],
type: 'pie',
hole: 0.4,
}]
const totalPortfolio = [{
values: [45, 35, 20],
labels: ['Residential', 'Non-Residential', 'Utility'],
type: 'pie',
hole: 0.4,
}]
return (
<div>
<Plot data={growthPortfolio} />
<Plot data={valuePortfolio} />
<Plot data={totalPortfolio}/>
</div>
);
}
export default Portfolio;
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.
Hướng nghiên cứu
Bắt đầu với component React chứa ba phần tử và tái hiện các biểu đồ trống bằng npm start trên thiết lập Pop!_OS đã được báo cáo. Kiểm tra đầu ra của trình duyệt và xác định liệu cảnh báo source-map có liên quan đến lỗi hiển thị hay không. Hoàn tất khi các biểu đồ tròn được hard-code hiển thị rõ ràng và nguyên nhân được ghi lại.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- javascript, react
- Lĩnh vực
- data-visualization, frontend
- Loại issue
- Lỗi
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Cần làm rõ
- Mức phù hợp với người mới
- 30/100