Plot does not appear in some cases if rangebreaks overlap
まだ誰も着手していません。
- 主要言語
- JavaScript
- スター
- 18.3k
- フォーク
- 2k
- 平均マージ
- 2日 12時間
- マージ済み PR(30日)
- 28
説明
I've created a Codepen for the issue: https://codepen.io/mofojed/pen/ZEgPJPN
In this case, the data spans a week, and range breaks are specified for a full holiday on Thursday, Nov 23, 2023 (Thanksgiving), and a half day on Friday, Nov 24, 2023. These specifications overlaps with other patterns for business days.
The chart does not appear. It looks like the rangebreaks that Plotly.js locates for the plot is:
Where some of those overlap. It looks like that isn't taken into account when calculating the breaks length, so when there's overlap it will not generate a valid break length: https://github.com/plotly/plotly.js/blob/29ca37b4ba3ee28a3ffe3d48eab97a080d602af3/src/plots/cartesian/autorange.js#L199
I think it would make sense to check for overlapping here. I'll see if it's possible to adjust holidays to not overlap with any existing business periods as well...
#5783 is similar
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
リンクされているCodePenの再現から始め、src/plots/cartesian/autorange.jsの199行目付近にあるrangebreakの処理を調査してください。同様のissue #5783と動作を比較し、holidayとbusiness-dayのrangebreakが重なった場合でも、無効なbreak lengthを生成せずにチャートがレンダリングされることを確認してください。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- javascript
- 領域
- data-visualization
- issue の種類
- バグ
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 活発さ
- 活発
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 68/100