Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incompatible with DynamicObj v. 3.0 #470

Open
ntwilson opened this issue Sep 3, 2024 · 1 comment
Open

Incompatible with DynamicObj v. 3.0 #470

ntwilson opened this issue Sep 3, 2024 · 1 comment

Comments

@ntwilson
Copy link

ntwilson commented Sep 3, 2024

Description

When installed with DynamicObj v. 3.0, Chart.Histogram crashes:

System.MissingMethodException: Method not found: 'Void DynamicObj.DynamicObj.CopyDynamicPropertiesTo(DynamicObj.DynamicObj)'.
   at Plotly.NET.GenericChart.ofTraceObject$cont@351(Trace trace, Unit unitVar)
   at Plotly.NET.GenericChart.ofTraceObject(Boolean useDefaults, Trace trace)
   at Plotly.NET.Chart2D.Chart.Histogram[a76,a77,a78](FSharpOption`1 X, FSharpOption`1 MultiX, FSharpOption`1 Y, FSharpOption`1 MultiY, FSharpOption`1 Orientation, FSharpOption`1 Name, FSharpOption`1 ShowLegend, FSharpOption`1 Opacity, FSharpOption`1 Text, FSharpOption`1 MultiText, FSharpOption`1 TextPosition, FSharpOption`1 HistFunc, FSharpOption`1 HistNorm, FSharpOption`1 AlignmentGroup, FSharpOption`1 OffsetGroup, FSharpOption`1 NBinsX, FSharpOption`1 NBinsY, FSharpOption`1 BinGroup, FSharpOption`1 XBins, FSharpOption`1 YBins, FSharpOption`1 MarkerColor, FSharpOption`1 MarkerColorScale, FSharpOption`1 MarkerOutline, FSharpOption`1 MarkerPatternShape, FSharpOption`1 MultiMarkerPatternShape, FSharpOption`1 MarkerPattern, FSharpOption`1 Marker, FSharpOption`1 Line, FSharpOption`1 XError, FSharpOption`1 YError, FSharpOption`1 Cumulative, FSharpOption`1 HoverLabel, FSharpOption`1 UseDefaults)

When downgrading DynamicObj to v. 2.0, it runs without issue. I haven't discovered if this affects other charts, or if it would work for histograms with different configuration options. I used the following options, though I cannot share the full code

Chart.Histogram(
    X = xValues,
    Name = modelName,
    MarkerColor = color,
    ShowLegend = showLegend,
    XBins = bins
)

Known workarounds

Just downgrade Dynamic Obj to >= 2.0 and < 3.0

Related information

  • Operating system: WSL Debian GNU/Linux 12 (bookworm); docker image mcr.microsoft.com/dotnet/sdk:8.0; host machine Windows 11
  • Branch: v. 4.0
  • .NET Runtime, CoreCLR or Mono Version: 8.0.303
@kMutagene
Copy link
Collaborator

Thanks for reporting this @ntwilson. We are aware of a few problems that the latest major version of DynamicObj brings when used with Plotly.NET (internal tests fail as well when upgrading the Plotly.NET repo from v2 to v3).

The best way is to just not upgrade this dependency for now. I think i will publish a patch to Plotly.NET that pins the version to > v3 though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants