PlotlyJS 'scatter3D' not working outside ng serve

Discussão em 'Angular' iniciado por Link, Novembro 26, 2024.

  1. Link

    Link Guest

    I basically have two Plotly-charts, one 'scattergl' and one 'scatter3d'. If I am using ng serve everything works fine and both charts are shown perfectly. The trouble begins if I use ng build and serve the static assets: [​IMG]

    Of course, my browser supports WebGL. I suspect Angulars bundle-process. I do import and use PlotlyJS like an ES6 module:

    import Plotly, { Data } from 'plotly.js-dist-min';


    As you cans ee I am using the minified version in my package.json:

    "plotly.js-dist-min": "^2.35.2",


    Even adding it as a CommonJS dependency or asset doesn't work at all:

    "allowedCommonJsDependencies": [
    "plotly.js-dist-min"
    ],


    Still the same picture. Is there any "trick"?

    Continue reading...

Compartilhe esta Página