[TypeScript] Missing property in `Partial<PlotData>`
還沒有人認領這個 Issue。
評估
- 難度
- 4/5
- 預估耗時
- 3-5 天
- 新手友好度
- 35/100
- Issue 類型
- 缺陷
- 描述清晰度
- 基本清楚
- 活躍度
- 停滯
- 技術堆疊
- react, typescript
研究方向
首先定位 Plot 元件以及其 data prop 使用的 Partial 定義;該 issue 沒有指定儲存庫檔案或測試。將已宣告的 waterfall 屬性與 Plotly 範例和 API 文件中描述的 connector 和 measure 屬性進行比較。當使用這些屬性的有效 waterfall 資料能夠通過型別檢查且不再出現回報的錯誤時,即表示完成。
由索引模型根據 Issue 內容生成。
描述
Hi, thanks very much for this handy component!
I tried to look at all examples and API docs available but can't figure out how to make use of connector among other properties (e.g. measure) for a Waterfall chart. I wonder whether there is a generic way to pass those parameters or it's just not possible at the moment?
This is the code I have:
<Plot
data={[
{
type: 'waterfall',
x: ['Name 1', 'Name 2'],
y: [15, 20],
connector: {line: {color: 'red'}} // Cause error: Object literal may only specify known properties, and 'connector' does not exist in type 'Partial<PlotData>'
},
]}
layout={{
width: 300
height: 150
}}
/>
The root of the problem seems that only limited number of properties are implemented on Partial<PlotData> - including for instance (as shown in example) the marker: {color: 'red'} property - which is NOT relevant to a waterfall chart at all.
Actually, due to my limited knowledge with React/TypeScript, I don't even know how to look at the definition of PlotData (it looks not available on this repo?) in order to inspect what properties are actually implemented there - would be helpful if anyone can provide some pointers.
This might be related to this: https://github.com/plotly/react-plotly.js/issues/247
- 主要語言
- JavaScript
- 星號
- 1.1k
- 分支
- 138
- PR 合併指標
- 30 天內沒有已合併 PR
環境準備
這個專案沒有提供開發容器、Dockerfile 或貢獻指南,環境需要你自己搭建:先看它的 README,通用步驟見我們的新手貢獻指南。
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
plotly/react-plotly.js 的其他 Issue
-
P3 plotly-internal size: 1 task
難度 3/5 1-2 天 新手友好度 45/100
plotly/react-plotly.js#386 ·
-
難度 4/5 3-5 天 新手友好度 48/100
plotly/react-plotly.js#358 · 1 則留言 ·
-
難度 4/5 3-5 天 新手友好度 35/100
plotly/react-plotly.js#354 ·
-
難度 3/5 1-2 天 新手友好度 30/100
plotly/react-plotly.js#353 · 1 則留言 ·
-
難度 4/5 3-5 天 新手友好度 35/100
plotly/react-plotly.js#352 · 1 則留言 ·
查看 plotly/react-plotly.js 的全部 Issue
相似的 Issue
-
難度 2/5 1-3 小時 新手友好度 66/100
riverqueue/river#1576 ·
維護者通常 1 天內回覆
-
documentation good first issue
難度 1/5 1 小時以內 新手友好度 72/100
維護者通常 1 天內回覆
-
good first issue help wanted
難度 1/5 1 小時以內 新手友好度 88/100
modrollstudio/Modroll-Studio-Website#80 · 1 則留言 ·
維護者通常 1 天內回覆
-
good first issue help wanted
難度 2/5 1-3 小時 新手友好度 85/100
mafzalkalwardev/mailforge#21 ·
-
good first issue help wanted
難度 1/5 1 小時以內 新手友好度 82/100