Skip to content

New Plotly.js update broke ? ''ERROR TypeError: Cannot read property 'map' of undefined'' #30

Closed
@Alterock13

Description

@Alterock13

Hi,

I've been using plotly for quite some time now and everything in my app was working rather fine.
However, since about 12 days ago, my app stopped working without any change in the code.

        Plotly.newPlot(
            this.layout['title'], 
            this.traces, this.layout, 
            this.options);        

or Plotly.update give the same error :

ERROR TypeError: Cannot read property 'map' of undefined
    at Object.r.coerceTraceIndices (plotly-latest.min.js:7)
    at Object.J [as update] (plotly-latest.min.js:7)
    at SafeSubscriber.eval [as _next] (chart.component.ts:93)
    at SafeSubscriber.__tryOrUnsub (Subscriber.js:243)
    at SafeSubscriber.next (Subscriber.js:190)
    at Subscriber._next (Subscriber.js:131)
    at Subscriber.next (Subscriber.js:95)
    at AsyncAction.IntervalObservable.dispatch (IntervalObservable.js:80)
    at AsyncAction._execute (AsyncAction.js:119)
    at AsyncAction.execute (AsyncAction.js:94)

I can provide the contents of 'this.layout', 'this.traces' and 'this.options' if necessary.

I've noticed that a few hours before this problem, plotly.js had been updated with version 1.43.0
Is it due to an API change that would cause the angular wrapper to malfunction?

Can anyone tell me if they have had issues with it too since the update?

For now the fix I've made is to specify in head :
<script src="https://cdn.plot.ly/plotly-1.42.5.min.js"></script>
Rather than the latest.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions