Uploaded image for project: 'Data Management'
  1. Data Management
  2. DM-14774

Upgrade Plotly library

    XMLWordPrintable

    Details

      Description

      We are using plotly-1.28.2.min.js As of today, the latest release is plotly-1.38.3.min.js.

      A lot of bugs in scattergl have been fixed, we might want to use scattergl for larger scatters.

      One of the bugs still present in scattergl is disappearing error bars on relayout. For this reason, we might not want to use scattergl as a default plot when the number of points is reasonably low.

        Attachments

          Issue Links

            Activity

            Hide
            gpdf Gregory Dubois-Felsmann added a comment -

            Tatiana Goldina Do you have a link to something like a Plotly Github issue on the disappearing error bars?

            Show
            gpdf Gregory Dubois-Felsmann added a comment - Tatiana Goldina Do you have a link to something like a Plotly Github issue on the disappearing error bars?
            Hide
            tatianag Tatiana Goldina added a comment - - edited

            Plotly Github issue on the disappearing error bars: https://github.com/plotly/plotly.js/issues/2450 (comment)

            Show
            tatianag Tatiana Goldina added a comment - - edited Plotly Github issue on the disappearing error bars: https://github.com/plotly/plotly.js/issues/2450 (comment)
            Hide
            tatianag Tatiana Goldina added a comment -

            Emmanuel Joliet I am waiting for your input. 

            There are 3 options to make sure we support any desired behavior:

            // maximum table rows for scatter chart support, undefined means unlimited
            maxRowsForScatter: undefined,
            // maximum table rows for which the default chart is scatter, heatmap is created for larger tables
            maxRowsForDefaultScatter: 5000,
            // minimum number of points to use WebGL 'scattergl' instead of SVG 'scatter'
            minScatterGLRows: 1000,

            If IRSA does now want to go with scattergl just yet, we can set all values to be the same - this way the behavior will not change.

             

            One limitation of WebGL, that the number of WebGL contexts is limited (usually 16 per browser), when the new context is created and the limit is exceeded, the oldest context is dropped.

            Plotly is using 2 contexts per div, when one of the traces is 'gl'.

            Pull Request: https://github.com/Caltech-IPAC/firefly/pull/627

            Show
            tatianag Tatiana Goldina added a comment - Emmanuel Joliet I am waiting for your input.  There are 3 options to make sure we support any desired behavior: // maximum table rows for scatter chart support, undefined means unlimited maxRowsForScatter: undefined, // maximum table rows for which the default chart is scatter, heatmap is created for larger tables maxRowsForDefaultScatter: 5000, // minimum number of points to use WebGL 'scattergl' instead of SVG 'scatter' minScatterGLRows: 1000, If IRSA does now want to go with scattergl just yet, we can set all values to be the same - this way the behavior will not change.   One limitation of WebGL, that the number of WebGL contexts is limited (usually 16 per browser), when the new context is created and the limit is exceeded, the oldest context is dropped. Plotly is using 2 contexts per div, when one of the traces is 'gl'. Pull Request:  https://github.com/Caltech-IPAC/firefly/pull/627
            Hide
            tatianag Tatiana Goldina added a comment -

            See Pull Request for details.

            Show
            tatianag Tatiana Goldina added a comment - See Pull Request for details.
            Hide
            gpdf Gregory Dubois-Felsmann added a comment -

            One limitation of WebGL, that the number of WebGL contexts is limited (usually 16 per browser), when the new context is created and the limit is exceeded, the oldest context is dropped.

            What would dropping a context mean in practice in Firefly? That a Plotly plotting frame would suddenly go blank? Become unresponsive? Or could it crash the browser's rendering process for the whole session?

            Show
            gpdf Gregory Dubois-Felsmann added a comment - One limitation of WebGL, that the number of WebGL contexts is limited (usually 16 per browser), when the new context is created and the limit is exceeded, the oldest context is dropped. What would dropping a context mean in practice in Firefly? That a Plotly plotting frame would suddenly go blank? Become unresponsive? Or could it crash the browser's rendering process for the whole session?
            Hide
            tatianag Tatiana Goldina added a comment -

            Plotly uses 2 WebGL contexts per chart. If a chart is displayed and its context is dropped, the chart area will become blank, and a warning will appear on the console. The application will continue to work. For example, if the blanked chart is deletable, user can delete it or switch to a single chart view, etc.

            To test the behavior, you can create a scatter of more than 1000 rows in Firefly, and keep adding more scatters from the top menu. At some point, when adding a scatter or going to expanded view some charts will become blank.

             

            Show
            tatianag Tatiana Goldina added a comment - Plotly uses 2 WebGL contexts per chart. If a chart is displayed and its context is dropped, the chart area will become blank, and a warning will appear on the console. The application will continue to work. For example, if the blanked chart is deletable, user can delete it or switch to a single chart view, etc. To test the behavior, you can create a scatter of more than 1000 rows in Firefly, and keep adding more scatters from the top menu. At some point, when adding a scatter or going to expanded view some charts will become blank.  

              People

              Assignee:
              tatianag Tatiana Goldina
              Reporter:
              tatianag Tatiana Goldina
              Reviewers:
              Emmanuel Joliet
              Watchers:
              Emmanuel Joliet, Gregory Dubois-Felsmann, Tatiana Goldina, Trey Roby, Vandana Desai, Xiuqin Wu [X] (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Jenkins

                  No builds found.