Upgrade Plotly to new version - Paul-Reed/node-red-contrib-ui-plotly GitHub Wiki

When Plotly needs to be updated to a newer version, the following steps need to be executed:

  1. Update in the package.json file the version of the plotly.js-dist-min NPM package dependency to this new version.

  2. Install (temporarily) the same version of the plotly.js NPM package:

    npm install plotly.js
    
  3. Copy the plot-schema.json file from this package:

    image

  4. And upload this json file to this Github repository:

    image

    Remark: use the NPM version number in the commit message, to make sure we know afterwards which version has been uploaded

  5. Check whether there are new value types added to the defs->valObjects section in the json:

    image

    If a new type has been added, it will need to be supported in the createInputElement function!

  6. (Optionally) Uninstall the plotly.js NPM package again, since we don't need it anymore.

Remark: this update process could be simplified. Indeed currently we use the plotly.js-dist-min package, which only contains the minified plotly.min.js file. However we could also have used the plotly.js NPM package, which contains both the minified plotly.min.js file and the plot-schema.json. In that case we would only have to update the version of the plotly.js dependency in our package.json file. The problem is that the plotly.js NPM package, contains a large amount of other stuff that we don't need...