omitted base property in index.d.ts
Open
Nobody has claimed this yet.
bug
P2
- Dominant language
- JavaScript
- Stars
- 18.3k
- Forks
- 2k
- Avg merge
- 2d 12h
- Merged PRs (30d)
- 28
Description
# "plotly.js-dist-min": "^2.27.1",
# "@types/plotly.js-dist-min": "^2.3.4",
const minutes = Array.from({ length: 24 * 6 }, (_, i) => {
const hour = Math.floor(i / 6)
const minute = (i % 6) * 10
return `2023-01-01 ${hour.toString().padStart(2, '0')}:${minute.toString().padStart(2, '0')}:00`
})
const traceDeath: Partial<Plotly.PlotData> = {
x: minutes,
base: minutes.map(() => Math.random() * 5),
y: minutes.map(() => Math.random() * 5 + 3),
type: 'bar',
marker: { color: 'red' },
}
In this code, please check base property.
I followed Plotly.PlotData
Whenever i omit base property, plotly graph changed.
But there is not base property in index.d.ts.
so I added interface
interface extendPlotData extends Partial<Plotly.PlotData> {
base?: number[]
}
const traceDeath: extendPlotData = {
x: minutes,
base: minutes.map(() => Math.random() * 5),
y: minutes.map(() => Math.random() * 5 + 3),
type: 'bar',
marker: { color: 'red' },
}
I know you have document
https://plotly.com/javascript/reference/bar/#bar-base
but please add missing properties.
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.
Assessment
This issue has not been assessed yet.