[BUG]: imperfect type definitions around graph export features

未關閉 適合新手
#8,057 1 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視

還沒有人認領這個 Issue。

評估

難度
2/5
預估耗時
1-3 小時
新手友好度
72/100
Issue 類型
缺陷
描述清晰度
基本清楚
活躍度
活躍
技術堆疊
javascript, typescript

研究方向

找出 toImage()、downloadImage() 和 config.toImageButtonOptions 的 *.d.ts 定義,然後將它們與文件記載的匯出功能和 CHANGELOG.md 進行比較。確認其中表示了 full-json 和 imageDataOnly,且第二個參數的屬性是選用的;型別定義的變更應由儲存庫現有的檢查涵蓋。

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

描述

bug
Description

I found the following imperfect definitions in type definitions Plotly introduced recently (v4.0.0?), around toImage(), downloadImage() and config.toImageButtonOptions. This will hinder using these functions/option for TypeScript users (like me).

  • Lack of full-json export format. A graph can be exported as JSON probably since v1.53.0 (see CHANGELOG.md or #4593) but this feature was not documented until very recently (plotly/graphing-library-docs#471).
  • Lack of imageDataOnly option. This option is also very recently documented here.
  • Some properties being set as required. The properties of the second parameter in toImage() and downloadImage() should be all optional. Currently some are required.

Can I send a PR for these? The PR won't include changes on executable code in JS; it will only modify *.d.ts files and maybe docstring parts in JS files.

主要語言
JavaScript
星號
18.3k
分支
2k
平均合併
2 天 12 小時
30 天內合併 PR
28

貢獻指南

開啟貢獻指南

從這裡開始

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

plotly/plotly.js 的其他 Issue

查看 plotly/plotly.js 的全部 Issue

相似的 Issue

更多 JavaScript Issue

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

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