plotly / plotly/plotly.js

plotly_legendclick is sending the old state

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

還沒有人認領這個 Issue。

bug P3
主要語言
JavaScript
星號
18.3k
分支
2k
平均合併
2 天 12 小時
30 天內合併 PR
28

描述

Hi All,

I'm attaching one event to the plotly_legendclick, but when I'm clicking in the legend I get an event with the data but the line I've clicked comes with the parameter visible with the previous state instead of the current one.

Reproduce Steps

Codepen: https://codepen.io/fsantiago99/pen/BaxYQJw
Click in BB and toggle it again, the alert is showing the variable visible.

I'm not sure if it is a feature or a bug but please have a look here.

貢獻指南

開啟貢獻指南

從這裡開始

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

研究方向

從連結的 CodePen 重現開始,在切換 BB 兩次的過程中檢查 plotly_legendclick 事件的 payload。將事件中顯示的值與每次點擊前後圖例項目的狀態進行比較。當事件回報預期的目前狀態,並且有回歸測試或其他經驗證的重現涵蓋此行為時,即表示完成。

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

評估

技術堆疊
javascript
領域
data-visualization, frontend
Issue 類型
缺陷
難度
3/5
預估耗時
1-2 天
活躍度
停滯
描述清晰度
基本清楚
新手友好度
42/100

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

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