Skip to content

Using Plotly with Salesforce (strict mode now enforced) #713

Closed
@xmas

Description

@xmas

Hello!

I'm super excited that Plotly is now open source, and I'm hoping to use it with an app I'm developing on the Salesforce platform.

Salesforce has recently put in place a new policy for 3rd party Javascript libraries: https://developer.salesforce.com/blogs/developer-relations/2016/04/introducing-lockerservice-lightning-components.html

Amongst other things, "strict" is on be default, and there are numerous areas where Plotly is failing.

I've just started looking through the errors and found a few things like:

<<<12586
var d3_document = this.document;
>>>
var d3_document = document;

<<< 13741
var d3_mouse_bug44083 = this.navigator && /WebKit/.test(this.navigator.userAgent) ? -1 : 0;
>>>
var d3_mouse_bug44083 = navigator && /WebKit/.test(navigator.userAgent) ? -1 : 0;

I'm not sure if the roadmap for Plot.ly includes support for moving to ES6 (where strict is on be default), or if Plotly is using the D3.v4 (which I believe is ES6 compatible...).

If it's not, then I will look into seeing how many changes and where need to happen to get Plotly running again on Salesforce.

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions