Title: Create GenericChart from Json · plotly/Plotly.NET · Discussion #421 · GitHub
Open Graph Title: Create GenericChart from Json · plotly/Plotly.NET · Discussion #421
X Title: Create GenericChart from Json · plotly/Plotly.NET · Discussion #421
Description: Create GenericChart from Json
Open Graph Description: Hi, I am currently building an application where people can customise their template in json plotly standard (not sure if there is a standard, just the one used in javascript). { "data": [...], "la...
X Description: Hi, I am currently building an application where people can customise their template in json plotly standard (not sure if there is a standard, just the one used in javascript). { "data": ...
Opengraph URL: https://github.com/plotly/Plotly.NET/discussions/421
X: @github
Domain: patch-diff.githubusercontent.com
{"@context":"https://schema.org","@type":"QAPage","mainEntity":{"@type":"Question","name":"Create GenericChart from Json","text":"Hi, I am currently building an application where people can customise their template in json plotly standard (not sure if there is a standard, just the one used in javascript).
\n{\n \"data\": [...],\n \"layout\": {...},\n \"frames\": [...]\n}\nIs it possible to create a GenericGraph starting from the json without having to map each single property?
","upvoteCount":2,"answerCount":2,"acceptedAnswer":{"@type":"Answer","text":"The thing with our strongly typed layers is that they unfortunately only work well for JSON creation. plotly.js JSON has properties that have arbitrary types, which you can do in a dynamically typed language such as JavaScript or python, but is quite hard to do in .NET.
\nWe circumvent this on object creation by offering a strongly typed subset of possible types and by using DynamicObj, which lets us set members dynamically. However, this basically prevents deserialization - even if you could deserialize all nested objects into DynamicObj (which does not work), there is no way of knowing whether that DynamicObj represents a Trace, a LinearAxis, or any other strong type abstraction provided by Plotly.NET without looking at the name of the member and additional knowledge about the plotly JSON schema.
\nYour use case is especially hard, because chart templates are basically allowing all possible plotly objects. I'd suggest only providing the options to set a subset of template properties and expand with what is needed. But maybe a pointer to the code where we implement the plotly template at least helps a little:
\n\n \n \n Plotly.NET/src/Plotly.NET/Templates/ChartTemplates.fs\n
\n \n Lines 168 to 701\n in\n 11456b4\n
\n \n \n \n\n \n \n /// the default template, as used in the python lib by default. \n \n\n \n \n let plotly = \n \n\n \n \n \n \n\n \n \n // non-standard props, may change in the future \n \n\n \n \n let annotationdefaults = \n \n\n \n \n let tmp = DynamicObj() \n \n\n \n \n tmp?arrowcolor <- \"#2a3f5f\" \n \n\n \n \n tmp?arrowhead <- 0 \n \n\n \n \n tmp?arrowwidth <- 1 \n \n\n \n \n tmp \n \n\n \n \n \n \n\n \n \n let shapedefaults = \n \n\n \n \n let tmp = DynamicObj() \n \n\n \n \n tmp?line <- Line.init (Color = Color.fromHex \"#2a3f5f\") \n \n\n \n \n tmp \n \n\n \n \n \n \n\n \n \n let layoutTempplate = \n \n\n \n \n Layout.init ( \n \n\n \n \n AutoTypeNumbers = StyleParam.AutoTypeNumbers.Strict, \n \n\n \n \n Colorscale = \n \n\n \n \n DefaultColorScales.init ( \n \n\n \n \n Diverging = \n \n\n \n \n StyleParam.Colorscale.Custom \n \n\n \n \n [ \n \n\n \n \n 0., Color.fromString \"#8e0152\" \n \n\n \n \n 0.1, Color.fromString \"#c51b7d\" \n \n\n \n \n 0.2, Color.fromString \"#de77ae\" \n \n\n \n \n 0.3, Color.fromString \"#f1b6da\" \n \n\n \n \n 0.4, Color.fromString \"#fde0ef\" \n \n\n \n \n 0.5, Color.fromString \"#f7f7f7\" \n \n\n \n \n 0.6, Color.fromString \"#e6f5d0\" \n \n\n \n \n 0.7, Color.fromString \"#b8e186\" \n \n\n \n \n 0.8, Color.fromString \"#7fbc41\" \n \n\n \n \n 0.9, Color.fromString \"#4d9221\" \n \n\n \n \n 1., Color.fromString \"#276419\" \n \n\n \n \n ], \n \n\n \n \n Sequential = \n \n\n \n \n StyleParam.Colorscale.Custom \n \n\n \n \n [ \n \n\n \n \n 0.0, Color.fromString \"#0d0887\" \n \n\n \n \n 0.1111111111111111, Color.fromString \"#46039f\" \n \n\n \n \n 0.2222222222222222, Color.fromString \"#7201a8\" \n \n\n \n \n 0.3333333333333333, Color.fromString \"#9c179e\" \n \n\n \n \n 0.4444444444444444, Color.fromString \"#bd3786\" \n \n\n \n \n 0.5555555555555556, Color.fromString \"#d8576b\" \n \n\n \n \n 0.6666666666666666, Color.fromString \"#ed7953\" \n \n\n \n \n 0.7777777777777778, Color.fromString \"#fb9f3a\" \n \n\n \n \n 0.8888888888888888, Color.fromString \"#fdca26\" \n \n\n \n \n 1.0, Color.fromString \"#f0f921\" \n \n\n \n \n ], \n \n\n \n \n SequentialMinus = \n \n\n \n \n StyleParam.Colorscale.Custom \n \n\n \n \n [ \n \n\n \n \n 0.0, Color.fromString \"#0d0887\" \n \n\n \n \n 0.1111111111111111, Color.fromString \"#46039f\" \n \n\n \n \n 0.2222222222222222, Color.fromString \"#7201a8\" \n \n\n \n \n 0.3333333333333333, Color.fromString \"#9c179e\" \n \n\n \n \n 0.4444444444444444, Color.fromString \"#bd3786\" \n \n\n \n \n 0.5555555555555556, Color.fromString \"#d8576b\" \n \n\n \n \n 0.6666666666666666, Color.fromString \"#ed7953\" \n \n\n \n \n 0.7777777777777778, Color.fromString \"#fb9f3a\" \n \n\n \n \n 0.8888888888888888, Color.fromString \"#fdca26\" \n \n\n \n \n 1.0, Color.fromString \"#f0f921\" \n \n\n \n \n ] \n \n\n \n \n ), \n \n\n \n \n Font = Font.init (Color = Color.fromHex \"#2a3f5f\"), \n \n\n \n \n Hoverlabel = Hoverlabel.init (Align = StyleParam.Align.Left), \n \n\n \n \n HoverMode = StyleParam.HoverMode.Closest, \n \n\n \n \n PaperBGColor = Color.fromKeyword White, \n \n\n \n \n PlotBGColor = Color.fromHex \"#E5ECF6\", \n \n\n \n \n Title = Title.init (X = 0.05) \n \n\n \n \n ) \n \n\n \n \n //set axes/subplot templates (these are no direct Layout props in our model) \n \n\n \n \n |> Layout.updateColorAxisById ( \n \n\n \n \n StyleParam.SubPlotId.ColorAxis 1, \n \n\n \n \n ColorAxis.init (ColorBar = ColorBar.init (OutlineWidth = 0., Ticks = StyleParam.TickOptions.Empty)) \n \n\n \n \n ) \n \n\n \n \n |> Layout.updateGeoById ( \n \n\n \n \n StyleParam.SubPlotId.Geo 1, \n \n\n \n \n Geo.init ( \n \n\n \n \n BgColor = Color.fromKeyword White, \n \n\n \n \n LakeColor = Color.fromKeyword White, \n \n\n \n \n LandColor = Color.fromHex \"#E5ECF6\", \n \n\n \n \n ShowLakes = true, \n \n\n \n \n ShowLand = true, \n \n\n \n \n SubunitColor = Color.fromKeyword White \n \n\n \n \n ) \n \n\n \n \n ) \n \n\n \n \n |> Layout.updateMapboxById ( \n \n\n \n \n StyleParam.SubPlotId.Mapbox 1, \n \n\n \n \n Mapbox.init (Style = StyleParam.MapboxStyle.MapboxLight) \n \n\n \n \n ) \n \n\n \n \n |> Layout.updatePolarById ( \n \n\n \n \n StyleParam.SubPlotId.Polar 1, \n \n\n \n \n Polar.init ( \n \n\n \n \n AngularAxis = \n \n\n \n \n AngularAxis.init ( \n \n\n \n \n GridColor = Color.fromKeyword White, \n \n\n \n \n LineColor = Color.fromKeyword White, \n \n\n \n \n Ticks = StyleParam.TickOptions.Empty \n \n\n \n \n ), \n \n\n \n \n RadialAxis = \n \n\n \n \n RadialAxis.init ( \n \n\n \n \n GridColor = Color.fromKeyword White, \n \n\n \n \n LineColor = Color.fromKeyword White, \n \n\n \n \n Ticks = StyleParam.TickOptions.Empty \n \n\n \n \n ), \n \n\n \n \n BGColor = Color.fromHex \"#E5ECF6\" \n \n\n \n \n ) \n \n\n \n \n ) \n \n\n \n \n |> Layout.updateSceneById ( \n \n\n \n \n StyleParam.SubPlotId.Scene 1, \n \n\n \n \n Scene.init ( \n \n\n \n \n XAxis = \n \n\n \n \n LinearAxis.init ( \n \n\n \n \n BackgroundColor = Color.fromHex \"#E5ECF6\", \n \n\n \n \n GridColor = Color.fromKeyword White, \n \n\n \n \n GridWidth = 2., \n \n\n \n \n LineColor = Color.fromKeyword White, \n \n\n \n \n ShowBackground = true, \n \n\n \n \n Ticks = StyleParam.TickOptions.Empty, \n \n\n \n \n ZeroLineColor = Color.fromKeyword White \n \n\n \n \n ), \n \n\n \n \n YAxis = \n \n\n \n \n LinearAxis.init ( \n \n\n \n \n BackgroundColor = Color.fromHex \"#E5ECF6\", \n \n\n \n \n GridColor = Color.fromKeyword White, \n \n\n \n \n GridWidth = 2., \n \n\n \n \n LineColor = Color.fromKeyword White, \n \n\n \n \n ShowBackground = true, \n \n\n \n \n Ticks = StyleParam.TickOptions.Empty, \n \n\n \n \n ZeroLineColor = Color.fromKeyword White \n \n\n \n \n ), \n \n\n \n \n ZAxis = \n \n\n \n \n LinearAxis.init ( \n \n\n \n \n BackgroundColor = Color.fromHex \"#E5ECF6\", \n \n\n \n \n GridColor = Color.fromKeyword White, \n \n\n \n \n GridWidth = 2., \n \n\n \n \n LineColor = Color.fromKeyword White, \n \n\n \n \n ShowBackground = true, \n \n\n \n \n Ticks = StyleParam.TickOptions.Empty, \n \n\n \n \n ZeroLineColor = Color.fromKeyword White \n \n\n \n \n ) \n \n\n \n \n ) \n \n\n \n \n ) \n \n\n \n \n |> Layout.updateTernaryById ( \n \n\n \n \n StyleParam.SubPlotId.Ternary 1, \n \n\n \n \n Ternary.init ( \n \n\n \n \n AAxis = \n \n\n \n \n LinearAxis.init ( \n \n\n \n \n GridColor = Color.fromKeyword White, \n \n\n \n \n LineColor = Color.fromKeyword White, \n \n\n \n \n Ticks = StyleParam.TickOptions.Empty \n \n\n \n \n ), \n \n\n \n \n BAxis = \n \n\n \n \n LinearAxis.init ( \n \n\n \n \n GridColor = Color.fromKeyword White, \n \n\n \n \n LineColor = Color.fromKeyword White, \n \n\n \n \n Ticks = StyleParam.TickOptions.Empty \n \n\n \n \n ), \n \n\n \n \n CAxis = \n \n\n \n \n LinearAxis.init ( \n \n\n \n \n GridColor = Color.fromKeyword White, \n \n\n \n \n LineColor = Color.fromKeyword White, \n \n\n \n \n Ticks = StyleParam.TickOptions.Empty \n \n\n \n \n ), \n \n\n \n \n BGColor = Color.fromHex \"#E5ECF6\" \n \n\n \n \n ) \n \n\n \n \n ) \n \n\n \n \n |> Layout.updateLinearAxisById ( \n \n\n \n \n StyleParam.SubPlotId.XAxis 1, \n \n\n \n \n LinearAxis.init ( \n \n\n \n \n AutoMargin = StyleParam.TickAutoMargin.All, \n \n\n \n \n GridColor = Color.fromKeyword White, \n \n\n \n \n LineColor = Color.fromKeyword White, \n \n\n \n \n Ticks = StyleParam.TickOptions.Empty, \n \n\n \n \n Title = Title.init (Standoff = 15), \n \n\n \n \n ZeroLineColor = Color.fromKeyword White, \n \n\n \n \n ZeroLineWidth = 2. \n \n\n \n \n ) \n \n\n \n \n ) \n \n\n \n \n |> Layout.updateLinearAxisById ( \n \n\n \n \n StyleParam.SubPlotId.YAxis 1, \n \n\n \n \n LinearAxis.init ( \n \n\n \n \n AutoMargin = StyleParam.TickAutoMargin.All, \n \n\n \n \n GridColor = Color.fromKeyword White, \n \n\n \n \n LineColor = Color.fromKeyword White, \n \n\n \n \n Ticks = StyleParam.TickOptions.Empty, \n \n\n \n \n Title = Title.init (Standoff = 15), \n \n\n \n \n ZeroLineColor = Color.fromKeyword White, \n \n\n \n \n ZeroLineWidth = 2. \n \n\n \n \n ) \n \n\n \n \n ) \n \n\n \n \n |> fun l -> \n \n\n \n \n // set non-standard props \n \n\n \n \n l?annotationdefaults <- annotationdefaults \n \n\n \n \n l?shapedefaults <- shapedefaults \n \n\n \n \n \n \n\n \n \n l \n \n\n \n \n \n \n\n \n \n let traceTemplates: Trace list = \n \n\n \n \n [ \n \n\n \n \n Trace2D.initBar ( \n \n\n \n \n Trace2DStyle.Bar( \n \n\n \n \n XError = Error.init (Color = Color.fromHex \"#2a3f5f\"), \n \n\n \n \n YError = Error.init (Color = Color.fromHex \"#2a3f5f\"), \n \n\n \n \n Marker = \n \n\n \n \n Marker.init ( \n \n\n \n \n Outline = Line.init (Color = Color.fromHex \"#E5ECF6\", Width = 0.5), \n \n\n \n \n Pattern = \n \n\n \n \n Pattern.init ( \n \n\n \n \n FillMode = StyleParam.PatternFillMode.Overlay, \n \n\n \n \n Size = 10, \n \n\n \n \n Solidity = 0.2 \n \n\n \n \n ) \n \n\n \n \n ) \n \n\n \n \n ) \n \n\n \n \n ) \n \n\n \n \n \n \n\n \n \n TracePolar.initBarPolar ( \n \n\n \n \n TracePolarStyle.BarPolar( \n \n\n \n \n Marker = \n \n\n \n \n Marker.init ( \n \n\n \n \n Outline = Line.init (Color = Color.fromHex \"#E5ECF6\", Width = 0.5), \n \n\n \n \n Pattern = \n \n\n \n \n Pattern.init ( \n \n\n \n \n FillMode = StyleParam.PatternFillMode.Overlay, \n \n\n \n \n Size = 10, \n \n\n \n \n Solidity = 0.2 \n \n\n \n \n ) \n \n\n \n \n ) \n \n\n \n \n ) \n \n\n \n \n ) \n \n\n \n \n \n \n\n \n \n TraceCarpet.initCarpet ( \n \n\n \n \n TraceCarpetStyle.Carpet( \n \n\n \n \n AAxis = \n \n\n \n \n LinearAxis.initCarpet ( \n \n\n \n \n EndLineColor = Color.fromHex \"#2a3f5f\", \n \n\n \n \n GridColor = Color.fromKeyword White, \n \n\n \n \n LineColor = Color.fromKeyword White, \n \n\n \n \n MinorGridColor = Color.fromKeyword White, \n \n\n \n \n StartLineColor = Color.fromHex \"#2a3f5f\" \n \n\n \n \n ), \n \n\n \n \n BAxis = \n \n\n \n \n LinearAxis.initCarpet ( \n \n\n \n \n EndLineColor = Color.fromHex \"#2a3f5f\", \n \n\n \n \n GridColor = Color.fromKeyword White, \n \n\n \n \n LineColor = Color.fromKeyword White, \n \n\n \n \n MinorGridColor = Color.fromKeyword White, \n \n\n \n \n StartLineColor = Color.fromHex \"#2a3f5f\" \n \n\n \n \n ) \n \n\n \n \n ) \n \n\n \n \n ) \n \n\n \n \n \n \n\n \n \n TraceGeo.initChoroplethMap ( \n \n\n \n \n TraceGeoStyle.ChoroplethMap( \n \n\n \n \n ColorBar = ColorBar.init (OutlineWidth = 0., Ticks = StyleParam.TickOptions.Empty), \n \n\n \n \n ColorScale = \n \n\n \n \n StyleParam.Colorscale.Custom \n \n\n \n \n [ \n \n\n \n \n 0.0, Color.fromString \"#0d0887\" \n \n\n \n \n 0.1111111111111111, Color.fromString \"#46039f\" \n \n\n \n \n 0.2222222222222222, Color.fromString \"#7201a8\" \n \n\n \n \n 0.3333333333333333, Color.fromString \"#9c179e\" \n \n\n \n \n 0.4444444444444444, Color.fromString \"#bd3786\" \n \n\n \n \n 0.5555555555555556, Color.fromString \"#d8576b\" \n \n\n \n \n 0.6666666666666666, Color.fromString \"#ed7953\" \n \n\n \n \n 0.7777777777777778, Color.fromString \"#fb9f3a\" \n \n\n \n \n 0.8888888888888888, Color.fromString \"#fdca26\" \n \n\n \n \n 1.0, Color.fromString \"#f0f921\" \n \n\n \n \n ] \n \n\n \n \n ) \n \n\n \n \n ) \n \n\n \n \n Trace2D.initContour ( \n \n\n \n \n Trace2DStyle.Contour( \n \n\n \n \n ColorBar = ColorBar.init (OutlineWidth = 0., Ticks = StyleParam.TickOptions.Empty), \n \n\n \n \n ColorScale = \n \n\n \n \n StyleParam.Colorscale.Custom \n \n\n \n \n [ \n \n\n \n \n 0.0, Color.fromString \"#0d0887\" \n \n\n \n \n 0.1111111111111111, Color.fromString \"#46039f\" \n \n\n \n \n 0.2222222222222222, Color.fromString \"#7201a8\" \n \n\n \n \n 0.3333333333333333, Color.fromString \"#9c179e\" \n \n\n \n \n 0.4444444444444444, Color.fromString \"#bd3786\" \n \n\n \n \n 0.5555555555555556, Color.fromString \"#d8576b\" \n \n\n \n \n 0.6666666666666666, Color.fromString \"#ed7953\" \n \n\n \n \n 0.7777777777777778, Color.fromString \"#fb9f3a\" \n \n\n \n \n 0.8888888888888888, Color.fromString \"#fdca26\" \n \n\n \n \n 1.0, Color.fromString \"#f0f921\" \n \n\n \n \n ] \n \n\n \n \n ) \n \n\n \n \n ) \n \n\n \n \n \n \n\n \n \n TraceCarpet.initContourCarpet ( \n \n\n \n \n TraceCarpetStyle.ContourCarpet( \n \n\n \n \n ColorBar = ColorBar.init (OutlineWidth = 0., Ticks = StyleParam.TickOptions.Empty) \n \n\n \n \n ) \n \n\n \n \n ) \n \n\n \n \n \n \n\n \n \n Trace2D.initHeatmap ( \n \n\n \n \n Trace2DStyle.Heatmap( \n \n\n \n \n ColorBar = ColorBar.init (OutlineWidth = 0., Ticks = StyleParam.TickOptions.Empty), \n \n\n \n \n ColorScale = \n \n\n \n \n StyleParam.Colorscale.Custom \n \n\n \n \n [ \n \n\n \n \n 0.0, Color.fromString \"#0d0887\" \n \n\n \n \n 0.1111111111111111, Color.fromString \"#46039f\" \n \n\n \n \n 0.2222222222222222, Color.fromString \"#7201a8\" \n \n\n \n \n 0.3333333333333333, Color.fromString \"#9c179e\" \n \n\n \n \n 0.4444444444444444, Color.fromString \"#bd3786\" \n \n\n \n \n 0.5555555555555556, Color.fromString \"#d8576b\" \n \n\n \n \n 0.6666666666666666, Color.fromString \"#ed7953\" \n \n\n \n \n 0.7777777777777778, Color.fromString \"#fb9f3a\" \n \n\n \n \n 0.8888888888888888, Color.fromString \"#fdca26\" \n \n\n \n \n 1.0, Color.fromString \"#f0f921\" \n \n\n \n \n ] \n \n\n \n \n ) \n \n\n \n \n ) \n \n\n \n \n \n \n\n \n \n Trace2D.initHeatmapGL ( \n \n\n \n \n Trace2DStyle.Heatmap( \n \n\n \n \n ColorBar = ColorBar.init (OutlineWidth = 0., Ticks = StyleParam.TickOptions.Empty), \n \n\n \n \n ColorScale = \n \n\n \n \n StyleParam.Colorscale.Custom \n \n\n \n \n [ \n \n\n \n \n 0.0, Color.fromString \"#0d0887\" \n \n\n \n \n 0.1111111111111111, Color.fromString \"#46039f\" \n \n\n \n \n 0.2222222222222222, Color.fromString \"#7201a8\" \n \n\n \n \n 0.3333333333333333, Color.fromString \"#9c179e\" \n \n\n \n \n 0.4444444444444444, Color.fromString \"#bd3786\" \n \n\n \n \n 0.5555555555555556, Color.fromString \"#d8576b\" \n \n\n \n \n 0.6666666666666666, Color.fromString \"#ed7953\" \n \n\n \n \n 0.7777777777777778, Color.fromString \"#fb9f3a\" \n \n\n \n \n 0.8888888888888888, Color.fromString \"#fdca26\" \n \n\n \n \n 1.0, Color.fromString \"#f0f921\" \n \n\n \n \n ] \n \n\n \n \n ) \n \n\n \n \n ) \n \n\n \n \n \n \n\n \n \n Trace2D.initHistogram ( \n \n\n \n \n Trace2DStyle.Histogram( \n \n\n \n \n Marker = \n \n\n \n \n Marker.init ( \n \n\n \n \n Pattern = \n \n\n \n \n Pattern.init ( \n \n\n \n \n FillMode = StyleParam.PatternFillMode.Overlay, \n \n\n \n \n Size = 10, \n \n\n \n \n Solidity = 0.2 \n \n\n \n \n ) \n \n\n \n \n ) \n \n\n \n \n ) \n \n\n \n \n ) \n \n\n \n \n \n \n\n \n \n Trace2D.initHistogram2D ( \n \n\n \n \n Trace2DStyle.Histogram2D( \n \n\n \n \n ColorBar = ColorBar.init (OutlineWidth = 0., Ticks = StyleParam.TickOptions.Empty), \n \n\n \n \n ColorScale = \n \n\n \n \n StyleParam.Colorscale.Custom \n \n\n \n \n [ \n \n\n \n \n 0.0, Color.fromString \"#0d0887\" \n \n\n \n \n 0.1111111111111111, Color.fromString \"#46039f\" \n \n\n \n \n 0.2222222222222222, Color.fromString \"#7201a8\" \n \n\n \n \n 0.3333333333333333, Color.fromString \"#9c179e\" \n \n\n \n \n 0.4444444444444444, Color.fromString \"#bd3786\" \n \n\n \n \n 0.5555555555555556, Color.fromString \"#d8576b\" \n \n\n \n \n 0.6666666666666666, Color.fromString \"#ed7953\" \n \n\n \n \n 0.7777777777777778, Color.fromString \"#fb9f3a\" \n \n\n \n \n 0.8888888888888888, Color.fromString \"#fdca26\" \n \n\n \n \n 1.0, Color.fromString \"#f0f921\" \n \n\n \n \n ] \n \n\n \n \n ) \n \n\n \n \n ) \n \n\n \n \n \n \n\n \n \n Trace2D.initHistogram2DContour ( \n \n\n \n \n Trace2DStyle.Histogram2DContour( \n \n\n \n \n ColorBar = ColorBar.init (OutlineWidth = 0., Ticks = StyleParam.TickOptions.Empty), \n \n\n \n \n ColorScale = \n \n\n \n \n StyleParam.Colorscale.Custom \n \n\n \n \n [ \n \n\n \n \n 0.0, Color.fromString \"#0d0887\" \n \n\n \n \n 0.1111111111111111, Color.fromString \"#46039f\" \n \n\n \n \n 0.2222222222222222, Color.fromString \"#7201a8\" \n \n\n \n \n 0.3333333333333333, Color.fromString \"#9c179e\" \n \n\n \n \n 0.4444444444444444, Color.fromString \"#bd3786\" \n \n\n \n \n 0.5555555555555556, Color.fromString \"#d8576b\" \n \n\n \n \n 0.6666666666666666, Color.fromString \"#ed7953\" \n \n\n \n \n 0.7777777777777778, Color.fromString \"#fb9f3a\" \n \n\n \n \n 0.8888888888888888, Color.fromString \"#fdca26\" \n \n\n \n \n 1.0, Color.fromString \"#f0f921\" \n \n\n \n \n ] \n \n\n \n \n ) \n \n\n \n \n ) \n \n\n \n \n \n \n\n \n \n Trace3D.initMesh3D ( \n \n\n \n \n Trace3DStyle.Mesh3D( \n \n\n \n \n ColorBar = ColorBar.init (OutlineWidth = 0., Ticks = StyleParam.TickOptions.Empty) \n \n\n \n \n ) \n \n\n \n \n ) \n \n\n \n \n \n \n\n \n \n \n \n\n \n \n TraceDomain.initParallelCoord ( \n \n\n \n \n TraceDomainStyle.ParallelCoord( \n \n\n \n \n Line = \n \n\n \n \n Line.init ( \n \n\n \n \n ColorBar = ColorBar.init (OutlineWidth = 0., Ticks = StyleParam.TickOptions.Empty) \n \n\n \n \n ) \n \n\n \n \n ) \n \n\n \n \n ) \n \n\n \n \n \n \n\n \n \n TraceDomain.initPie (TraceDomainStyle.Pie(AutoMargin = true)) \n \n\n \n \n \n \n\n \n \n Trace2D.initScatter ( \n \n\n \n \n Trace2DStyle.Scatter( \n \n\n \n \n Marker = \n \n\n \n \n Marker.init ( \n \n\n \n \n ColorBar = ColorBar.init (OutlineWidth = 0., Ticks = StyleParam.TickOptions.Empty) \n \n\n \n \n ) \n \n\n \n \n ) \n \n\n \n \n ) \n \n\n \n \n \n \n\n \n \n Trace3D.initScatter3D ( \n \n\n \n \n Trace3DStyle.Scatter3D( \n \n\n \n \n Line = \n \n\n \n \n Line.init ( \n \n\n \n \n ColorBar = ColorBar.init (OutlineWidth = 0., Ticks = StyleParam.TickOptions.Empty) \n \n\n \n \n ), \n \n\n \n \n Marker = \n \n\n \n \n Marker.init ( \n \n\n \n \n ColorBar = ColorBar.init (OutlineWidth = 0., Ticks = StyleParam.TickOptions.Empty) \n \n\n \n \n ) \n \n\n \n \n ) \n \n\n \n \n ) \n \n\n \n \n \n \n\n \n \n TraceCarpet.initScatterCarpet ( \n \n\n \n \n TraceCarpetStyle.ScatterCarpet( \n \n\n \n \n Marker = \n \n\n \n \n Marker.init ( \n \n\n \n \n ColorBar = ColorBar.init (OutlineWidth = 0., Ticks = StyleParam.TickOptions.Empty) \n \n\n \n \n ) \n \n\n \n \n ) \n \n\n \n \n ) \n \n\n \n \n \n \n\n \n \n TraceGeo.initScatterGeo ( \n \n\n \n \n TraceGeoStyle.ScatterGeo( \n \n\n \n \n Marker = \n \n\n \n \n Marker.init ( \n \n\n \n \n ColorBar = ColorBar.init (OutlineWidth = 0., Ticks = StyleParam.TickOptions.Empty) \n \n\n \n \n ) \n \n\n \n \n ) \n \n\n \n \n ) \n \n\n \n \n \n \n\n \n \n Trace2D.initScatterGL ( \n \n\n \n \n Trace2DStyle.Scatter( \n \n\n \n \n Marker = \n \n\n \n \n Marker.init ( \n \n\n \n \n ColorBar = ColorBar.init (OutlineWidth = 0., Ticks = StyleParam.TickOptions.Empty) \n \n\n \n \n ) \n \n\n \n \n ) \n \n\n \n \n ) \n \n\n \n \n \n \n\n \n \n TraceMapbox.initScatterMapbox ( \n \n\n \n \n TraceMapboxStyle.ScatterMapbox( \n \n\n \n \n Marker = \n \n\n \n \n Marker.init ( \n \n\n \n \n ColorBar = ColorBar.init (OutlineWidth = 0., Ticks = StyleParam.TickOptions.Empty) \n \n\n \n \n ) \n \n\n \n \n ) \n \n\n \n \n ) \n \n\n \n \n \n \n\n \n \n TracePolar.initScatterPolar ( \n \n\n \n \n TracePolarStyle.ScatterPolar( \n \n\n \n \n Marker = \n \n\n \n \n Marker.init ( \n \n\n \n \n ColorBar = ColorBar.init (OutlineWidth = 0., Ticks = StyleParam.TickOptions.Empty) \n \n\n \n \n ) \n \n\n \n \n ) \n \n\n \n \n ) \n \n\n \n \n \n \n\n \n \n TracePolar.initScatterPolarGL ( \n \n\n \n \n TracePolarStyle.ScatterPolar( \n \n\n \n \n Marker = \n \n\n \n \n Marker.init ( \n \n\n \n \n ColorBar = ColorBar.init (OutlineWidth = 0., Ticks = StyleParam.TickOptions.Empty) \n \n\n \n \n ) \n \n\n \n \n ) \n \n\n \n \n ) \n \n\n \n \n \n \n\n \n \n TraceTernary.initScatterTernary ( \n \n\n \n \n TraceTernaryStyle.ScatterTernary( \n \n\n \n \n Marker = \n \n\n \n \n Marker.init ( \n \n\n \n \n ColorBar = ColorBar.init (OutlineWidth = 0., Ticks = StyleParam.TickOptions.Empty) \n \n\n \n \n ) \n \n\n \n \n ) \n \n\n \n \n ) \n \n\n \n \n \n \n\n \n \n Trace3D.initSurface ( \n \n\n \n \n Trace3DStyle.Surface( \n \n\n \n \n ColorBar = ColorBar.init (OutlineWidth = 0., Ticks = StyleParam.TickOptions.Empty), \n \n\n \n \n ColorScale = \n \n\n \n \n StyleParam.Colorscale.Custom \n \n\n \n \n [ \n \n\n \n \n 0.0, Color.fromString \"#0d0887\" \n \n\n \n \n 0.1111111111111111, Color.fromString \"#46039f\" \n \n\n \n \n 0.2222222222222222, Color.fromString \"#7201a8\" \n \n\n \n \n 0.3333333333333333, Color.fromString \"#9c179e\" \n \n\n \n \n 0.4444444444444444, Color.fromString \"#bd3786\" \n \n\n \n \n 0.5555555555555556, Color.fromString \"#d8576b\" \n \n\n \n \n 0.6666666666666666, Color.fromString \"#ed7953\" \n \n\n \n \n 0.7777777777777778, Color.fromString \"#fb9f3a\" \n \n\n \n \n 0.8888888888888888, Color.fromString \"#fdca26\" \n \n\n \n \n 1.0, Color.fromString \"#f0f921\" \n \n\n \n \n ] \n \n\n \n \n ) \n \n\n \n \n ) \n \n\n \n \n \n \n\n \n \n TraceDomain.initTable ( \n \n\n \n \n TraceDomainStyle.Table( \n \n\n \n \n Cells = \n \n\n \n \n TableCells.init ( \n \n\n \n \n Fill = TableFill.init (Color = Color.fromHex \"#EBF0F8\"), \n \n\n \n \n Line = Line.init (Color = Color.fromKeyword White) \n \n\n \n \n ), \n \n\n \n \n Header = \n \n\n \n \n TableCells.init ( \n \n\n \n \n Fill = TableFill.init (Color = Color.fromHex \"#C8D4E3\"), \n \n\n \n \n Line = Line.init (Color = Color.fromKeyword White) \n \n\n \n \n ) \n \n\n \n \n ) \n \n\n \n \n ) \n \n\n \n \n ] \n \n\n \n \n \n \n\n \n \n Template.init (layoutTempplate, traceTemplates) |> Template.withColorWay ColorWays.plotly \n \n
\n \n\n","upvoteCount":1,"url":"https://github.com/plotly/Plotly.NET/discussions/421#discussioncomment-7078980"}}}
| route-pattern | /_view_fragments/Voltron::DiscussionsFragmentsController/show/:user_id/:repository/:discussion_number/discussion_layout(.:format) |
| route-controller | voltron_discussions_fragments |
| route-action | discussion_layout |
| fetch-nonce | v2:15ce27e0-06d0-1211-6a22-29eab0d906fe |
| current-catalog-service-hash | 9f0abe34da433c9b6db74bffa2466494a717b579a96b30a5d252e5090baea7be |
| request-id | A8AE:1D2919:2E541D:3F0DC4:698F4CD2 |
| html-safe-nonce | 8cd12434587fd7b40b256f33edb914f6f0928b8b68f2f30a9577d968a4025cb4 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBOEFFOjFEMjkxOToyRTU0MUQ6M0YwREM0OjY5OEY0Q0QyIiwidmlzaXRvcl9pZCI6IjcyMzY5MzQwOTQ5NjkzMjY4MDMiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | a56809acea51f936090068c718ddaa1d5753e1fe194721e2c951e14f0fce60b1 |
| hovercard-subject-tag | discussion:5655735 |
| github-keyboard-shortcuts | repository,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/Voltron::DiscussionsFragmentsController/show/plotly/Plotly.NET/421/discussion_layout |
| twitter:image | https://opengraph.githubassets.com/9a0b7f7888fdf3c4d68711609bfd4bd26c48afb9449d7865e69ad6d761ca21c8/plotly/Plotly.NET/discussions/421 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/9a0b7f7888fdf3c4d68711609bfd4bd26c48afb9449d7865e69ad6d761ca21c8/plotly/Plotly.NET/discussions/421 |
| og:image:alt | Hi, I am currently building an application where people can customise their template in json plotly standard (not sure if there is a standard, just the one used in javascript). { "data": [...], "la... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | 6102991c714c1a6a27d05fb4f96ea6ca87a6750b4f093b95cc57ed1b84b145a1 |
| turbo-cache-control | no-preview |
| go-import | github.com/plotly/Plotly.NET git https://github.com/plotly/Plotly.NET.git |
| octolytics-dimension-user_id | 5997976 |
| octolytics-dimension-user_login | plotly |
| octolytics-dimension-repository_id | 58708375 |
| octolytics-dimension-repository_nwo | plotly/Plotly.NET |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 58708375 |
| octolytics-dimension-repository_network_root_nwo | plotly/Plotly.NET |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 6a0e76b4dbdd86599b4b518abe0e57175194496e |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width