[BUG]: imperfect type definitions around graph export features
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 18.3k
- Forks
- 2k
- Avg merge
- 2d 12h
- Merged PRs (30d)
- 28
Description
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-jsonexport 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
imageDataOnlyoption. This option is also very recently documented here. - Some properties being set as required. The properties of the second parameter in
toImage()anddownloadImage()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.
Contributor guide
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
Locate the *.d.ts definitions for toImage(), downloadImage(), and config.toImageButtonOptions, then compare them with the documented export features and CHANGELOG.md. Confirm that full-json and imageDataOnly are represented and that the second-parameter properties are optional; the type-definition changes should be covered by the repository's existing checks.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, typescript
- Domain
- data-visualization
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 72/100