plotly / plotly/react-plotly.js
Can't react a 3d chart with react-plotly
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 1.1k
- Forks
- 138
- Avg merge
- 3d 2h
- Merged PRs (30d)
- 4
Description
I am using "react-plotly.js": "^2.3.0", and plotly.js 1.45.3.
I am trying to recreate this graph in reactjs version 16.8.
But all the charts are 2d and i can't even see anything in the screen. (No errors there).
import React from 'react';
import Plot from 'react-plotly.js';
import graphData from '../../public/resources/3d-graph.json';
> class Graphs extends React.Component {
> render(){
> return(
> <Plot
> data={[
> {
> type: 'surface',
> x: graphData.x,
> y: graphData.y,
> z: graphData.z
> }
> ]}
> layout={
> {
> width: 800,
> height: 600,
> margin: {
> l: 50,
> r: 50,
> b: 80,
> t: 90,
> pad: 4
> },
> title: graphData.masterGraph.title,
> annotations: [{
> text: graphData.masterGraph.model,
> font: {
> size: 14,
> color: '#444444',
> },
> showarrow: false,
> align: 'center',
> x: 0.5,
> y: 1.1,
> xref: 'paper',
> yref: 'paper',
> }],
> scene: {
> xaxis: {
> title: graphData.masterGraph.xAxis,
> titlefont: {
> family: 'Courier New, monospace',
> size: 12,
> color: '#444444'
> }
> },
> yaxis: {
> title: graphData.masterGraph.yAxis,
> titlefont: {
> family: 'Courier New, monospace',
> size: 12,
> color: '#444444'
> }
> },
> zaxis: {
> title: graphData.masterGraph.zAxis,
> titlefont: {
> family: 'Courier New, monospace',
> size: 12,
> color: '#444444'
> }
> }
> }
> }
> }
> />
> )
> }
> }
>
> export default Graphs
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the Graphs component with react-plotly.js 2.3.0, plotly.js 1.45.3, React 16.8, and the imported 3d-graph.json data. Check how the surface trace and scene layout are handled, then verify that the 3D chart renders visibly without errors.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, react
- Domain
- data-visualization, frontend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100