You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For example if we load Plotly, plot a graph and later dynamically register mapbox and plot a mapbox it will error since coorect subplotTypes are not passed to handleSubplotDefaults.
Could we simply not cache subplotTypes or reset when we register new traces?
Regards
The text was updated successfully, but these errors were encountered:
import Plotly from 'plotly.js/lib/core'; export default function() { Plotly.plot(...); }
And component Mapbox.js as:
import Plotly from 'plotly.js/lib/core'; import Mapbox from 'plotly.js/lib/scattermapbox'; Plotly.register(Mapbox); export default function() { Plotly.plot(...); }
And then in our main index.js we dynamically import Timeseries and plot a graph and later on import Mapbox and plot a map.
import("Timeseries").default(); and later...>> import("Mapbox").default();
This will produce an error in handleSubplotDefaults. The subplot types for Mapbox component should include 'Mapbox' but since we have cached subplot types when first rendering the timeseries, then chart we will miss them.
etpinard
changed the title
emptySubplotLists cache in plots.supplyDeffaults
Plots.supplyDeffaults subplot type cache doesn't allow dynamic trace module imports
Jan 14, 2019
Hi team,
collectableSubplotTypes gets cached and this leads to inaccurate subplot lists if new traces are registered dynamically:
plotly.js/src/plots/plots.js
Lines 582 to 614 in 51b5c25
For example if we load Plotly, plot a graph and later dynamically register mapbox and plot a mapbox it will error since coorect subplotTypes are not passed to handleSubplotDefaults.
Could we simply not cache subplotTypes or reset when we register new traces?
Regards
The text was updated successfully, but these errors were encountered: