XPlot icon indicating copy to clipboard operation
XPlot copied to clipboard

Unable to use a collection for hover data in XPlot.Plotly.Scattergl

Open lcorrigan opened this issue 3 years ago • 1 comments

Using an array as the source data for hover doesn't work with the Scattergl plot, but does with the non-gl scatter plot. The GL will only accept a string.

I use a custom formatter for the hover text for example: var ht = Samples.Select(x => $"Time (EST): {x.TimeStampEST}<br>Current (mA): {x.CurrentAmps * 1000}<br>").ToArray(); but the non-GL scatter's performance was choking so I tried the GL scatter and saw wouldn't accept it.

I'm using C# .NET Framework, with XPlot.Plotly 4.0.1 in LinqPad 5, but also tried it in the C# jupyter binder via one of the links in the help file. I wasn't able to get that to run as-is, until I changed the XPlot nuget reference to 4.0.1. The attached screen capture is from the binder, and shows the scatter plot accepting the array but the scattergl rejecting it. The ability to create an interactive graph in an HTML file with other report data has been awesome but without the scattergl, it's just too slow to update for interactive use. I used to use the scattergl like this in python, and would really like to see it again but in .NET if possible.

lcorrigan avatar Apr 03 '21 01:04 lcorrigan

scatterGL wont accept array for hovertext

lcorrigan avatar Apr 03 '21 01:04 lcorrigan