plotly / plotly/react-plotly.js
Can't react a 3d chart with react-plotly
未關閉
還沒有人認領這個 Issue。
- 主要語言
- JavaScript
- 星號
- 1.1k
- 分支
- 138
- 平均合併
- 3 天 2 小時
- 30 天內合併 PR
- 4
描述
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
貢獻指南
這個儲存庫沒有索引到貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
研究方向
首先,使用 react-plotly.js 2.3.0、plotly.js 1.45.3、React 16.8 以及匯入的 3d-graph.json 資料重現 Graphs 元件。檢查如何處理 surface trace 和 scene layout,然後驗證 3D 圖表是否能夠在沒有錯誤的情況下正常顯示。
由索引模型根據 Issue 內容生成。
評估
- 技術堆疊
- javascript, react
- 領域
- data-visualization, frontend
- Issue 類型
- 缺陷
- 難度
- 4/5
- 預估耗時
- 3-5 天
- 活躍度
- 停滯
- 描述清晰度
- 需要釐清
- 新手友好度
- 25/100