Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 14 additions & 3 deletions src/Plotly.NET/ChartAPI/GenericChart.fs
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ type HTML() =

/// Module to represent a GenericChart
[<Extension>]
module GenericChart =
module rec GenericChart =

type Figure =
{
Expand Down Expand Up @@ -137,6 +137,19 @@ module GenericChart =
type GenericChart =
| Chart of Trace * Layout * Config * DisplayOptions
| MultiChart of Trace list * Layout * Config * DisplayOptions

/// Method to support dumping charts in LINQPad.
// See https://www.linqpad.net/CustomizingDump.aspx
member private this.ToDump () : System.Object =
let html = toEmbeddedHTML this

let iFrameType = Type.GetType("LINQPad.Controls.IFrame, LINQPad.Runtime")

if isNull iFrameType then
this
else
let iFrame = System.Activator.CreateInstance(iFrameType, html, true);
iFrame

let toFigure (gChart: GenericChart) =
match gChart with
Expand Down Expand Up @@ -218,9 +231,7 @@ module GenericChart =
// let l' = getLayouts gChart
// MultiChart (traces, Some (layouts@l'))

open Plotly.NET.LayoutObjects
// Combines two GenericChart

let combine (gCharts: seq<GenericChart>) =
// temporary hard fix for some props, see https://github.com/CSBiology/DynamicObj/issues/11

Expand Down