omitted base property in index.d.ts
Đang mở
Chưa có ai nhận issue này.
bug
P2
- Ngôn ngữ chính
- JavaScript
- Star
- 18.3k
- Fork
- 2k
- Merge trung bình
- 2 ngày 12 giờ
- Pull request đã merge (30 ngày)
- 28
Mô tả
# "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.
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Đánh giá
Issue này chưa được đánh giá.