Open
Description
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
Metadata
Metadata
Assignees
Labels
No labels