| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
The method is recognized by LinqPad, and dumps a chart's html into an IFrame, but Chart.saveHtml cannot be called here.
|
Hi @Peter-B- First of all, this is a very nicely formatted PR, clear and concise! Also, I must say that LINQPad looks quite interesting. I do most interactive programming in dotnet notebooks these days, but from my limited look at it it seems like it also has a debugger which can be very handy. What I like most about this PR is that we do not need to add external dependencies. Since the member is private, the public API stays the same and since the tests pass, everything looks good to me. Regarding the module rec, this will be unnecessary once I start moving to v5, because I want to get rid of the GenericChart module in favor of a type with static members (so it is only Plotly.NET.GenericChart instead of Plotly.NET.GenericChart.GenericChart). As of now, I think this PR itself does not add backwards-incompatible stuff, so adding it to a minor release (4.2.0) seems reasonable. |
Sorry, something went wrong.
|
Thanks a lot for your review and for merging it. I'm looking forward to seeing it published. LINQPad is indeed a great app, especially as a database-scripting-tool in combination with Entity Framework. Just the plots were a bit old-school - until now :-) |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Hello,
at first I must declare, that this is my first F# pull request, so please let me ask for some patience :-)
Motivation
I am a big fan of LINQPad as a (C# and F#) code scratchpad. One of it's main features is the .Dump() extension method, which let's you bring almost everything into a nicely formatted output.
Almost everything: Plotly.Net charts are dumped as plain objects:
This is a pity, since LINQPad's output is html and it would perfectly support interactive charts.
How To
LINQPad supports customized dumps from F# in two ways:
The first option would require every user to implement an extension, so the second is the way to go.
Implementation
After some try-and-error, I figured out a way to support Plotly.Net in LINQPad with relatively view changes.
This method can be (and is) private.
ToDump must be able to call toEmbeddedHTML, which is defined later within this module.
Maybe there is a better solution to this.
The use of reflection avoids a static reference to LINQPad.Runtime
The Result