Hacktoberfest 2026:維護者為十月標記出來的 issue,仍然開放、適合新手。 瀏覽 Hacktoberfest issue

[BUG]: last period label sometimes not drawn when using negative ticklabelindex

未關閉
#7,875 0 則留言 1 個 reaction 已指派 0 人 在 GitHub 檢視

維護者通常 1 天內回覆

@my-tien 已經在處理了。

開始於 2026年8月6日。

  • #7877 來自 @my-tien —— 已關閉,未合併
  • #7937 來自 @my-tien —— 未關閉

評估

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

研究方向

使用連結的 CodePen 重現缺少的標籤,並比較 3.5.1 和 3.6.0 的行為。追蹤 ticklabelindex 的處理方式以及第一個週期現有的 helper-tick 邏輯,然後確保當索引為負數時,範圍末端的等效情況會為最後一個週期加上標籤。

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

描述

bug P2 size: 3

Here is an example of the last ticklabel not being drawn. The figure's ticklabelindex is set to -1:

Plotly 3.6.0 (missing last label)
Image

Plotly 3.5.1 (all labels visible)
Image

This is a regression from #7735. In version 3.5.1 ticklabelindex was ignored because no minor ticks were drawn. In version 3.6.0 ticklabelindex is not ignored and so for this figure, the label is expected to be drawn to the left of each major tick (ticklabelindex -1). However, there is no tick to the right of the last period and so that period is not labeled.

Before ticklabelindex, period labels were only ever drawn to the right of a major tick. There is logic in plotly to add a helper tick before the first period, making sure it will be labeled. For negative ticklabelindex, the same logic is required for the period at the end of the axis range.

Codepen: https://codepen.io/toffi-fee/pen/MYJEWLY

主要語言
JavaScript
星號
18.4k
分支
2k
平均合併
2 天 5 小時
30 天內合併 PR
16

環境準備

從這裡開始

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

plotly/plotly.js 的其他 Issue

查看 plotly/plotly.js 的全部 Issue

相似的 Issue

更多 JavaScript Issue

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

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