plotly / plotly/react-plotly.js

Getting Aw Snap Error for following code snippet

未關閉
#284 3 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視

還沒有人認領這個 Issue。

主要語言
JavaScript
星號
1.1k
分支
138
平均合併
3 天 2 小時
30 天內合併 PR
4

描述

import React from 'react'
import Plot from 'react-plotly.js';

export default function Histogram() {

  const data = [{
		"type": "histogram",
		"x": [0, 21000000, 0, 200, 0, 0, 0, 600000],
    "xbins": {
			"size": 1
		}
	}]

  const style = {
		"width": "600px",
		"height": "330px"
	}

  const layout = {
		"margin": {
			"t": 30
		},
		"xaxis": {
			"showline": true,
			"mirror": true,
			"linewidth": 2,
			"tickangle": 45,
			"automargin": true,
			"title": {
				"standoff": 20,
				"text": "feature_na e",
			}
		},
		"yaxis": {
			"showline": true,
			"mirror": true,
			"linewidth": 2,
			"tickangle": 0,
			"automargin": true,
			"title": {
				"standoff": 20,
				"text": "Frequency",
			}
		}
	}

  const renderPlot = () => {
    try {
      return (
        <Plot
          data={data}
          style={style}
          layout={layout}
          onError={(error) => console.log('Error message: ', error)}
        />
      )
    } catch (ex) {
      console.log(ex)
      return (<p>No Plot</p>)
    }
  }

  return (
    <div>
      {renderPlot()}
    </div>
  );
}

貢獻指南

這個儲存庫沒有索引到貢獻指南

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

研究方向

重現所提供的 React 直方圖程式碼片段,並在專案支援的環境中確認「Aw Snap」故障。payload 未指定原始檔案或測試,因此首先定位渲染入口以及現有的直方圖或錯誤處理測試;完成的標準是找出觸發原因,並新增一項不再導致當機的回歸檢查。

由索引模型根據 Issue 內容生成。

評估

技術堆疊
javascript, react
領域
data-visualization, frontend
Issue 類型
缺陷
難度
3/5
預估耗時
1-2 天
活躍度
停滯
描述清晰度
需要釐清
新手友好度
25/100

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。