`onClick` event handler doesn't take into account a right-click for Pie Charts.
まだ誰も着手していません。
- 主要言語
- JavaScript
- スター
- 18.3k
- フォーク
- 2k
- 平均マージ
- 2日 12時間
- マージ済み PR(30日)
- 28
説明
Reproduction of bug - https://codepen.io/dstender/pen/LYXEGYZ
Simple code example:
var myPlot = document.getElementById('myDiv'),
data = [{
values: [19, 26, 55],
labels: ['Residential', 'Non-Residential', 'Utility'],
type: 'pie'
}],
layout = {hovermode:'closest',
title:'Click on Points'
};
Plotly.newPlot('myDiv', data, layout);
myPlot.on('plotly_click', function(){
alert('You clicked this Plotly chart!');
});
I discovered this issue while using the react-plotly.js library. I wanted to handle the left and right clicking of a slice of a pie chart in the same manner. However, I noticed that the onClick event doesn't catch a right click. This is not the case for other charts (Line, Bar, etc...).
It seems to me that this is related to plotly.js rather than react-plotly.js but of course I could be wrong. If this is a legit bug are there any workarounds?
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
リンクされたCodePenの再現から始め、Plotlyの円グラフのクリック処理を追跡し、折れ線グラフおよび棒グラフの動作と比較します。右クリックで円グラフのスライスをクリックしたときに一貫してplotly_clickイベントが発生し、報告されたケースのリグレッションテストがカバーされていれば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- javascript
- 領域
- data-visualization
- issue の種類
- バグ
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 35/100