plotly / plotly/react-plotly.js
how to use modebar buttons handlers
オープン
まだ誰も着手していません。
- 主要言語
- JavaScript
- スター
- 1.1k
- フォーク
- 138
- 平均マージ
- 3日 2時間
- マージ済み PR(30日)
- 4
説明
I am using "react-plotly.js": "^2.2.0" ,
- I am using react Image component
- on click of image i am calling ResetOnly(event) {
var plotDiv = document.getElementsByClassName('plot-chart-class1');
//var button = event.currentTarget;
// button.setAttribute('data-attr', 'zoom');
// button.setAttribute('data-val', 'reset');
ModeBarButtons.zoomIn2d.click(plotDiv[0], event);
} - i have imported import ModeBarButtons from 'plotly.js/src/components/modebar/buttons.js';
- I am getting this error
registry.js:221 Uncaught TypeError: Cannot read property 'apply' of undefined
at Object.exports.call (registry.js:221)
at Object.handleCartesian [as click] (buttons.js:264)
at PlotlyChart.ResetOnly (PlotlyChart.jsx:342)
at HTMLUnknownElement.boundFunc (ReactErrorUtils.js:63)
at Object.ReactErrorUtils.invokeGuardedCallback (ReactErrorUtils.js:69)
at executeDispatch (EventPluginUtils.js:83)
at Object.executeDispatchesInOrder (EventPluginUtils.js:106)
at executeDispatchesAndRelease (EventPluginHub.js:41)
at executeDispatchesAndReleaseTopLevel (EventPluginHub.js:52)
at Array.forEach () - In registry.js file, in below function exports.apiMethodRegistry[name] is undefined
exports.call = function() {
var name = arguments[0];
var args = [].slice.call(arguments, 1);
return exports.apiMethodRegistry[name].apply(null, args);
};
can someone help me to resolve this issue
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
まず、説明されている react-plotly.js のセットアップを使って、PlotlyChart.jsx の modebar ボタンのクリックを再現します。plotly.js/src/components/modebar/buttons.js と registry.js の失敗している呼び出しの周辺を読み、参照されている API メソッドが undefined である理由を特定します。完了条件は、registry エラーなしで handler が実行されることです。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- javascript, react
- 領域
- data-visualization, frontend
- issue の種類
- バグ
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 活発さ
- 停滞
- 明瞭さ
- 説明が足りない
- 初心者へのやさしさ
- 25/100