Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork137
Open
Description
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 commandnpm start
, I get this message which might have something to do with it:
WARNING in ./node_modules/plotly.js/dist/plotly.jsModule 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;
Metadata
Metadata
Assignees
Labels
No labels