René's URL Explorer Experiment


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

direct link

Domain: patch-diff.githubusercontent.com


Hey, it has json ld scripts:
{"@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}
\n

Is 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.

\n

We 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.

\n

Your 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 \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 \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 \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 \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 \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 \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 \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 \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 \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 \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 \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 \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 \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 \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 \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 \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 \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 \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 \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 \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 \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 \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 \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 \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 \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 \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 \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 \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 \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 \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 \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 \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 \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 \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 \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 \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 \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 \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 \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 \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 \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 \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 \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 \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 \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 \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 \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 \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 \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 \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 \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 \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 \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 \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 \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 \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 \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 \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 \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 \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 \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 \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 \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 \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 \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 \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 \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 \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 \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 \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 \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 \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 \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 \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 \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 \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 \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 \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 \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 \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 \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 \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 \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 \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 \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 \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 \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 \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 \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
/// the default template, as used in the python lib by default.
let plotly =
// non-standard props, may change in the future
let annotationdefaults =
let tmp = DynamicObj()
tmp?arrowcolor <- \"#2a3f5f\"
tmp?arrowhead <- 0
tmp?arrowwidth <- 1
tmp
let shapedefaults =
let tmp = DynamicObj()
tmp?line <- Line.init (Color = Color.fromHex \"#2a3f5f\")
tmp
let layoutTempplate =
Layout.init (
AutoTypeNumbers = StyleParam.AutoTypeNumbers.Strict,
Colorscale =
DefaultColorScales.init (
Diverging =
StyleParam.Colorscale.Custom
[
0., Color.fromString \"#8e0152\"
0.1, Color.fromString \"#c51b7d\"
0.2, Color.fromString \"#de77ae\"
0.3, Color.fromString \"#f1b6da\"
0.4, Color.fromString \"#fde0ef\"
0.5, Color.fromString \"#f7f7f7\"
0.6, Color.fromString \"#e6f5d0\"
0.7, Color.fromString \"#b8e186\"
0.8, Color.fromString \"#7fbc41\"
0.9, Color.fromString \"#4d9221\"
1., Color.fromString \"#276419\"
],
Sequential =
StyleParam.Colorscale.Custom
[
0.0, Color.fromString \"#0d0887\"
0.1111111111111111, Color.fromString \"#46039f\"
0.2222222222222222, Color.fromString \"#7201a8\"
0.3333333333333333, Color.fromString \"#9c179e\"
0.4444444444444444, Color.fromString \"#bd3786\"
0.5555555555555556, Color.fromString \"#d8576b\"
0.6666666666666666, Color.fromString \"#ed7953\"
0.7777777777777778, Color.fromString \"#fb9f3a\"
0.8888888888888888, Color.fromString \"#fdca26\"
1.0, Color.fromString \"#f0f921\"
],
SequentialMinus =
StyleParam.Colorscale.Custom
[
0.0, Color.fromString \"#0d0887\"
0.1111111111111111, Color.fromString \"#46039f\"
0.2222222222222222, Color.fromString \"#7201a8\"
0.3333333333333333, Color.fromString \"#9c179e\"
0.4444444444444444, Color.fromString \"#bd3786\"
0.5555555555555556, Color.fromString \"#d8576b\"
0.6666666666666666, Color.fromString \"#ed7953\"
0.7777777777777778, Color.fromString \"#fb9f3a\"
0.8888888888888888, Color.fromString \"#fdca26\"
1.0, Color.fromString \"#f0f921\"
]
),
Font = Font.init (Color = Color.fromHex \"#2a3f5f\"),
Hoverlabel = Hoverlabel.init (Align = StyleParam.Align.Left),
HoverMode = StyleParam.HoverMode.Closest,
PaperBGColor = Color.fromKeyword White,
PlotBGColor = Color.fromHex \"#E5ECF6\",
Title = Title.init (X = 0.05)
)
//set axes/subplot templates (these are no direct Layout props in our model)
|> Layout.updateColorAxisById (
StyleParam.SubPlotId.ColorAxis 1,
ColorAxis.init (ColorBar = ColorBar.init (OutlineWidth = 0., Ticks = StyleParam.TickOptions.Empty))
)
|> Layout.updateGeoById (
StyleParam.SubPlotId.Geo 1,
Geo.init (
BgColor = Color.fromKeyword White,
LakeColor = Color.fromKeyword White,
LandColor = Color.fromHex \"#E5ECF6\",
ShowLakes = true,
ShowLand = true,
SubunitColor = Color.fromKeyword White
)
)
|> Layout.updateMapboxById (
StyleParam.SubPlotId.Mapbox 1,
Mapbox.init (Style = StyleParam.MapboxStyle.MapboxLight)
)
|> Layout.updatePolarById (
StyleParam.SubPlotId.Polar 1,
Polar.init (
AngularAxis =
AngularAxis.init (
GridColor = Color.fromKeyword White,
LineColor = Color.fromKeyword White,
Ticks = StyleParam.TickOptions.Empty
),
RadialAxis =
RadialAxis.init (
GridColor = Color.fromKeyword White,
LineColor = Color.fromKeyword White,
Ticks = StyleParam.TickOptions.Empty
),
BGColor = Color.fromHex \"#E5ECF6\"
)
)
|> Layout.updateSceneById (
StyleParam.SubPlotId.Scene 1,
Scene.init (
XAxis =
LinearAxis.init (
BackgroundColor = Color.fromHex \"#E5ECF6\",
GridColor = Color.fromKeyword White,
GridWidth = 2.,
LineColor = Color.fromKeyword White,
ShowBackground = true,
Ticks = StyleParam.TickOptions.Empty,
ZeroLineColor = Color.fromKeyword White
),
YAxis =
LinearAxis.init (
BackgroundColor = Color.fromHex \"#E5ECF6\",
GridColor = Color.fromKeyword White,
GridWidth = 2.,
LineColor = Color.fromKeyword White,
ShowBackground = true,
Ticks = StyleParam.TickOptions.Empty,
ZeroLineColor = Color.fromKeyword White
),
ZAxis =
LinearAxis.init (
BackgroundColor = Color.fromHex \"#E5ECF6\",
GridColor = Color.fromKeyword White,
GridWidth = 2.,
LineColor = Color.fromKeyword White,
ShowBackground = true,
Ticks = StyleParam.TickOptions.Empty,
ZeroLineColor = Color.fromKeyword White
)
)
)
|> Layout.updateTernaryById (
StyleParam.SubPlotId.Ternary 1,
Ternary.init (
AAxis =
LinearAxis.init (
GridColor = Color.fromKeyword White,
LineColor = Color.fromKeyword White,
Ticks = StyleParam.TickOptions.Empty
),
BAxis =
LinearAxis.init (
GridColor = Color.fromKeyword White,
LineColor = Color.fromKeyword White,
Ticks = StyleParam.TickOptions.Empty
),
CAxis =
LinearAxis.init (
GridColor = Color.fromKeyword White,
LineColor = Color.fromKeyword White,
Ticks = StyleParam.TickOptions.Empty
),
BGColor = Color.fromHex \"#E5ECF6\"
)
)
|> Layout.updateLinearAxisById (
StyleParam.SubPlotId.XAxis 1,
LinearAxis.init (
AutoMargin = StyleParam.TickAutoMargin.All,
GridColor = Color.fromKeyword White,
LineColor = Color.fromKeyword White,
Ticks = StyleParam.TickOptions.Empty,
Title = Title.init (Standoff = 15),
ZeroLineColor = Color.fromKeyword White,
ZeroLineWidth = 2.
)
)
|> Layout.updateLinearAxisById (
StyleParam.SubPlotId.YAxis 1,
LinearAxis.init (
AutoMargin = StyleParam.TickAutoMargin.All,
GridColor = Color.fromKeyword White,
LineColor = Color.fromKeyword White,
Ticks = StyleParam.TickOptions.Empty,
Title = Title.init (Standoff = 15),
ZeroLineColor = Color.fromKeyword White,
ZeroLineWidth = 2.
)
)
|> fun l ->
// set non-standard props
l?annotationdefaults <- annotationdefaults
l?shapedefaults <- shapedefaults
l
let traceTemplates: Trace list =
[
Trace2D.initBar (
Trace2DStyle.Bar(
XError = Error.init (Color = Color.fromHex \"#2a3f5f\"),
YError = Error.init (Color = Color.fromHex \"#2a3f5f\"),
Marker =
Marker.init (
Outline = Line.init (Color = Color.fromHex \"#E5ECF6\", Width = 0.5),
Pattern =
Pattern.init (
FillMode = StyleParam.PatternFillMode.Overlay,
Size = 10,
Solidity = 0.2
)
)
)
)
TracePolar.initBarPolar (
TracePolarStyle.BarPolar(
Marker =
Marker.init (
Outline = Line.init (Color = Color.fromHex \"#E5ECF6\", Width = 0.5),
Pattern =
Pattern.init (
FillMode = StyleParam.PatternFillMode.Overlay,
Size = 10,
Solidity = 0.2
)
)
)
)
TraceCarpet.initCarpet (
TraceCarpetStyle.Carpet(
AAxis =
LinearAxis.initCarpet (
EndLineColor = Color.fromHex \"#2a3f5f\",
GridColor = Color.fromKeyword White,
LineColor = Color.fromKeyword White,
MinorGridColor = Color.fromKeyword White,
StartLineColor = Color.fromHex \"#2a3f5f\"
),
BAxis =
LinearAxis.initCarpet (
EndLineColor = Color.fromHex \"#2a3f5f\",
GridColor = Color.fromKeyword White,
LineColor = Color.fromKeyword White,
MinorGridColor = Color.fromKeyword White,
StartLineColor = Color.fromHex \"#2a3f5f\"
)
)
)
TraceGeo.initChoroplethMap (
TraceGeoStyle.ChoroplethMap(
ColorBar = ColorBar.init (OutlineWidth = 0., Ticks = StyleParam.TickOptions.Empty),
ColorScale =
StyleParam.Colorscale.Custom
[
0.0, Color.fromString \"#0d0887\"
0.1111111111111111, Color.fromString \"#46039f\"
0.2222222222222222, Color.fromString \"#7201a8\"
0.3333333333333333, Color.fromString \"#9c179e\"
0.4444444444444444, Color.fromString \"#bd3786\"
0.5555555555555556, Color.fromString \"#d8576b\"
0.6666666666666666, Color.fromString \"#ed7953\"
0.7777777777777778, Color.fromString \"#fb9f3a\"
0.8888888888888888, Color.fromString \"#fdca26\"
1.0, Color.fromString \"#f0f921\"
]
)
)
Trace2D.initContour (
Trace2DStyle.Contour(
ColorBar = ColorBar.init (OutlineWidth = 0., Ticks = StyleParam.TickOptions.Empty),
ColorScale =
StyleParam.Colorscale.Custom
[
0.0, Color.fromString \"#0d0887\"
0.1111111111111111, Color.fromString \"#46039f\"
0.2222222222222222, Color.fromString \"#7201a8\"
0.3333333333333333, Color.fromString \"#9c179e\"
0.4444444444444444, Color.fromString \"#bd3786\"
0.5555555555555556, Color.fromString \"#d8576b\"
0.6666666666666666, Color.fromString \"#ed7953\"
0.7777777777777778, Color.fromString \"#fb9f3a\"
0.8888888888888888, Color.fromString \"#fdca26\"
1.0, Color.fromString \"#f0f921\"
]
)
)
TraceCarpet.initContourCarpet (
TraceCarpetStyle.ContourCarpet(
ColorBar = ColorBar.init (OutlineWidth = 0., Ticks = StyleParam.TickOptions.Empty)
)
)
Trace2D.initHeatmap (
Trace2DStyle.Heatmap(
ColorBar = ColorBar.init (OutlineWidth = 0., Ticks = StyleParam.TickOptions.Empty),
ColorScale =
StyleParam.Colorscale.Custom
[
0.0, Color.fromString \"#0d0887\"
0.1111111111111111, Color.fromString \"#46039f\"
0.2222222222222222, Color.fromString \"#7201a8\"
0.3333333333333333, Color.fromString \"#9c179e\"
0.4444444444444444, Color.fromString \"#bd3786\"
0.5555555555555556, Color.fromString \"#d8576b\"
0.6666666666666666, Color.fromString \"#ed7953\"
0.7777777777777778, Color.fromString \"#fb9f3a\"
0.8888888888888888, Color.fromString \"#fdca26\"
1.0, Color.fromString \"#f0f921\"
]
)
)
Trace2D.initHeatmapGL (
Trace2DStyle.Heatmap(
ColorBar = ColorBar.init (OutlineWidth = 0., Ticks = StyleParam.TickOptions.Empty),
ColorScale =
StyleParam.Colorscale.Custom
[
0.0, Color.fromString \"#0d0887\"
0.1111111111111111, Color.fromString \"#46039f\"
0.2222222222222222, Color.fromString \"#7201a8\"
0.3333333333333333, Color.fromString \"#9c179e\"
0.4444444444444444, Color.fromString \"#bd3786\"
0.5555555555555556, Color.fromString \"#d8576b\"
0.6666666666666666, Color.fromString \"#ed7953\"
0.7777777777777778, Color.fromString \"#fb9f3a\"
0.8888888888888888, Color.fromString \"#fdca26\"
1.0, Color.fromString \"#f0f921\"
]
)
)
Trace2D.initHistogram (
Trace2DStyle.Histogram(
Marker =
Marker.init (
Pattern =
Pattern.init (
FillMode = StyleParam.PatternFillMode.Overlay,
Size = 10,
Solidity = 0.2
)
)
)
)
Trace2D.initHistogram2D (
Trace2DStyle.Histogram2D(
ColorBar = ColorBar.init (OutlineWidth = 0., Ticks = StyleParam.TickOptions.Empty),
ColorScale =
StyleParam.Colorscale.Custom
[
0.0, Color.fromString \"#0d0887\"
0.1111111111111111, Color.fromString \"#46039f\"
0.2222222222222222, Color.fromString \"#7201a8\"
0.3333333333333333, Color.fromString \"#9c179e\"
0.4444444444444444, Color.fromString \"#bd3786\"
0.5555555555555556, Color.fromString \"#d8576b\"
0.6666666666666666, Color.fromString \"#ed7953\"
0.7777777777777778, Color.fromString \"#fb9f3a\"
0.8888888888888888, Color.fromString \"#fdca26\"
1.0, Color.fromString \"#f0f921\"
]
)
)
Trace2D.initHistogram2DContour (
Trace2DStyle.Histogram2DContour(
ColorBar = ColorBar.init (OutlineWidth = 0., Ticks = StyleParam.TickOptions.Empty),
ColorScale =
StyleParam.Colorscale.Custom
[
0.0, Color.fromString \"#0d0887\"
0.1111111111111111, Color.fromString \"#46039f\"
0.2222222222222222, Color.fromString \"#7201a8\"
0.3333333333333333, Color.fromString \"#9c179e\"
0.4444444444444444, Color.fromString \"#bd3786\"
0.5555555555555556, Color.fromString \"#d8576b\"
0.6666666666666666, Color.fromString \"#ed7953\"
0.7777777777777778, Color.fromString \"#fb9f3a\"
0.8888888888888888, Color.fromString \"#fdca26\"
1.0, Color.fromString \"#f0f921\"
]
)
)
Trace3D.initMesh3D (
Trace3DStyle.Mesh3D(
ColorBar = ColorBar.init (OutlineWidth = 0., Ticks = StyleParam.TickOptions.Empty)
)
)
TraceDomain.initParallelCoord (
TraceDomainStyle.ParallelCoord(
Line =
Line.init (
ColorBar = ColorBar.init (OutlineWidth = 0., Ticks = StyleParam.TickOptions.Empty)
)
)
)
TraceDomain.initPie (TraceDomainStyle.Pie(AutoMargin = true))
Trace2D.initScatter (
Trace2DStyle.Scatter(
Marker =
Marker.init (
ColorBar = ColorBar.init (OutlineWidth = 0., Ticks = StyleParam.TickOptions.Empty)
)
)
)
Trace3D.initScatter3D (
Trace3DStyle.Scatter3D(
Line =
Line.init (
ColorBar = ColorBar.init (OutlineWidth = 0., Ticks = StyleParam.TickOptions.Empty)
),
Marker =
Marker.init (
ColorBar = ColorBar.init (OutlineWidth = 0., Ticks = StyleParam.TickOptions.Empty)
)
)
)
TraceCarpet.initScatterCarpet (
TraceCarpetStyle.ScatterCarpet(
Marker =
Marker.init (
ColorBar = ColorBar.init (OutlineWidth = 0., Ticks = StyleParam.TickOptions.Empty)
)
)
)
TraceGeo.initScatterGeo (
TraceGeoStyle.ScatterGeo(
Marker =
Marker.init (
ColorBar = ColorBar.init (OutlineWidth = 0., Ticks = StyleParam.TickOptions.Empty)
)
)
)
Trace2D.initScatterGL (
Trace2DStyle.Scatter(
Marker =
Marker.init (
ColorBar = ColorBar.init (OutlineWidth = 0., Ticks = StyleParam.TickOptions.Empty)
)
)
)
TraceMapbox.initScatterMapbox (
TraceMapboxStyle.ScatterMapbox(
Marker =
Marker.init (
ColorBar = ColorBar.init (OutlineWidth = 0., Ticks = StyleParam.TickOptions.Empty)
)
)
)
TracePolar.initScatterPolar (
TracePolarStyle.ScatterPolar(
Marker =
Marker.init (
ColorBar = ColorBar.init (OutlineWidth = 0., Ticks = StyleParam.TickOptions.Empty)
)
)
)
TracePolar.initScatterPolarGL (
TracePolarStyle.ScatterPolar(
Marker =
Marker.init (
ColorBar = ColorBar.init (OutlineWidth = 0., Ticks = StyleParam.TickOptions.Empty)
)
)
)
TraceTernary.initScatterTernary (
TraceTernaryStyle.ScatterTernary(
Marker =
Marker.init (
ColorBar = ColorBar.init (OutlineWidth = 0., Ticks = StyleParam.TickOptions.Empty)
)
)
)
Trace3D.initSurface (
Trace3DStyle.Surface(
ColorBar = ColorBar.init (OutlineWidth = 0., Ticks = StyleParam.TickOptions.Empty),
ColorScale =
StyleParam.Colorscale.Custom
[
0.0, Color.fromString \"#0d0887\"
0.1111111111111111, Color.fromString \"#46039f\"
0.2222222222222222, Color.fromString \"#7201a8\"
0.3333333333333333, Color.fromString \"#9c179e\"
0.4444444444444444, Color.fromString \"#bd3786\"
0.5555555555555556, Color.fromString \"#d8576b\"
0.6666666666666666, Color.fromString \"#ed7953\"
0.7777777777777778, Color.fromString \"#fb9f3a\"
0.8888888888888888, Color.fromString \"#fdca26\"
1.0, Color.fromString \"#f0f921\"
]
)
)
TraceDomain.initTable (
TraceDomainStyle.Table(
Cells =
TableCells.init (
Fill = TableFill.init (Color = Color.fromHex \"#EBF0F8\"),
Line = Line.init (Color = Color.fromKeyword White)
),
Header =
TableCells.init (
Fill = TableFill.init (Color = Color.fromHex \"#C8D4E3\"),
Line = Line.init (Color = Color.fromKeyword White)
)
)
)
]
Template.init (layoutTempplate, traceTemplates) |> Template.withColorWay ColorWays.plotly
\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-controllervoltron_discussions_fragments
route-actiondiscussion_layout
fetch-noncev2:15ce27e0-06d0-1211-6a22-29eab0d906fe
current-catalog-service-hash9f0abe34da433c9b6db74bffa2466494a717b579a96b30a5d252e5090baea7be
request-idA8AE:1D2919:2E541D:3F0DC4:698F4CD2
html-safe-nonce8cd12434587fd7b40b256f33edb914f6f0928b8b68f2f30a9577d968a4025cb4
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBOEFFOjFEMjkxOToyRTU0MUQ6M0YwREM0OjY5OEY0Q0QyIiwidmlzaXRvcl9pZCI6IjcyMzY5MzQwOTQ5NjkzMjY4MDMiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmaca56809acea51f936090068c718ddaa1d5753e1fe194721e2c951e14f0fce60b1
hovercard-subject-tagdiscussion:5655735
github-keyboard-shortcutsrepository,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/discussions_fragments/discussion_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/Voltron::DiscussionsFragmentsController/show/plotly/Plotly.NET/421/discussion_layout
twitter:imagehttps://opengraph.githubassets.com/9a0b7f7888fdf3c4d68711609bfd4bd26c48afb9449d7865e69ad6d761ca21c8/plotly/Plotly.NET/discussions/421
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/9a0b7f7888fdf3c4d68711609bfd4bd26c48afb9449d7865e69ad6d761ca21c8/plotly/Plotly.NET/discussions/421
og:image:altHi, 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:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
None6102991c714c1a6a27d05fb4f96ea6ca87a6750b4f093b95cc57ed1b84b145a1
turbo-cache-controlno-preview
go-importgithub.com/plotly/Plotly.NET git https://github.com/plotly/Plotly.NET.git
octolytics-dimension-user_id5997976
octolytics-dimension-user_loginplotly
octolytics-dimension-repository_id58708375
octolytics-dimension-repository_nwoplotly/Plotly.NET
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id58708375
octolytics-dimension-repository_network_root_nwoplotly/Plotly.NET
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release6a0e76b4dbdd86599b4b518abe0e57175194496e
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://patch-diff.githubusercontent.com/plotly/Plotly.NET/discussions/421#start-of-content
https://patch-diff.githubusercontent.com/
Sign in https://patch-diff.githubusercontent.com/login?return_to=https%3A%2F%2Fgithub.com%2Fplotly%2FPlotly.NET%2Fdiscussions%2F421
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub SparkBuild and deploy intelligent appshttps://github.com/features/spark
GitHub ModelsManage and compare promptshttps://github.com/features/models
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
GitHub SponsorsFund open source developershttps://github.com/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/accelerator
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://github.com/security/advanced-security
Copilot for BusinessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://patch-diff.githubusercontent.com/login?return_to=https%3A%2F%2Fgithub.com%2Fplotly%2FPlotly.NET%2Fdiscussions%2F421
Sign up https://patch-diff.githubusercontent.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fdiscussions_fragments%2Fdiscussion_layout&source=header-repo&source_repo=plotly%2FPlotly.NET
Reloadhttps://patch-diff.githubusercontent.com/plotly/Plotly.NET/discussions/421
Reloadhttps://patch-diff.githubusercontent.com/plotly/Plotly.NET/discussions/421
Reloadhttps://patch-diff.githubusercontent.com/plotly/Plotly.NET/discussions/421
plotly https://patch-diff.githubusercontent.com/plotly
Plotly.NEThttps://patch-diff.githubusercontent.com/plotly/Plotly.NET
Notifications https://patch-diff.githubusercontent.com/login?return_to=%2Fplotly%2FPlotly.NET
Fork 101 https://patch-diff.githubusercontent.com/login?return_to=%2Fplotly%2FPlotly.NET
Star 834 https://patch-diff.githubusercontent.com/login?return_to=%2Fplotly%2FPlotly.NET
Code https://patch-diff.githubusercontent.com/plotly/Plotly.NET
Issues 43 https://patch-diff.githubusercontent.com/plotly/Plotly.NET/issues
Pull requests 3 https://patch-diff.githubusercontent.com/plotly/Plotly.NET/pulls
Discussions https://patch-diff.githubusercontent.com/plotly/Plotly.NET/discussions
Actions https://patch-diff.githubusercontent.com/plotly/Plotly.NET/actions
Projects 0 https://patch-diff.githubusercontent.com/plotly/Plotly.NET/projects
Security 0 https://patch-diff.githubusercontent.com/plotly/Plotly.NET/security
Insights https://patch-diff.githubusercontent.com/plotly/Plotly.NET/pulse
Code https://patch-diff.githubusercontent.com/plotly/Plotly.NET
Issues https://patch-diff.githubusercontent.com/plotly/Plotly.NET/issues
Pull requests https://patch-diff.githubusercontent.com/plotly/Plotly.NET/pulls
Discussions https://patch-diff.githubusercontent.com/plotly/Plotly.NET/discussions
Actions https://patch-diff.githubusercontent.com/plotly/Plotly.NET/actions
Projects https://patch-diff.githubusercontent.com/plotly/Plotly.NET/projects
Security https://patch-diff.githubusercontent.com/plotly/Plotly.NET/security
Insights https://patch-diff.githubusercontent.com/plotly/Plotly.NET/pulse
Answered https://patch-diff.githubusercontent.com/plotly/Plotly.NET/discussions/421#discussioncomment-7078980
kMutagenehttps://patch-diff.githubusercontent.com/kMutagene
uittorio https://patch-diff.githubusercontent.com/uittorio
Q&Ahttps://patch-diff.githubusercontent.com/plotly/Plotly.NET/discussions/categories/q-a
Create GenericChart from Json https://patch-diff.githubusercontent.com/plotly/Plotly.NET/discussions/421#top
uittorio https://patch-diff.githubusercontent.com/uittorio
Answered https://patch-diff.githubusercontent.com/plotly/Plotly.NET/discussions/421#discussioncomment-7078980
kMutagenehttps://patch-diff.githubusercontent.com/kMutagene
Return to tophttps://patch-diff.githubusercontent.com/plotly/Plotly.NET/discussions/421#top
Please reload this pagehttps://patch-diff.githubusercontent.com/plotly/Plotly.NET/discussions/421
https://patch-diff.githubusercontent.com/plotly/Plotly.NET/discussions/421
Please reload this pagehttps://patch-diff.githubusercontent.com/plotly/Plotly.NET/discussions/421
https://patch-diff.githubusercontent.com/plotly/Plotly.NET/discussions/421
uittorio https://patch-diff.githubusercontent.com/uittorio
Sep 21, 2023 https://patch-diff.githubusercontent.com/plotly/Plotly.NET/discussions/421#discussion-5655735
Give feedback.https://patch-diff.githubusercontent.com/plotly/Plotly.NET/discussions/421
kMutagene https://patch-diff.githubusercontent.com/kMutagene
Sep 22, 2023 https://github.com/plotly/Plotly.NET/discussions/421#discussioncomment-7078980
View full answer https://patch-diff.githubusercontent.com/plotly/Plotly.NET/discussions/421#discussioncomment-7078980
Oldest https://patch-diff.githubusercontent.com/plotly/Plotly.NET/discussions/421?sort=old
Newest https://patch-diff.githubusercontent.com/plotly/Plotly.NET/discussions/421?sort=new
Top https://patch-diff.githubusercontent.com/plotly/Plotly.NET/discussions/421?sort=top
Please reload this pagehttps://patch-diff.githubusercontent.com/plotly/Plotly.NET/discussions/421
https://patch-diff.githubusercontent.com/plotly/Plotly.NET/discussions/421
kMutagene https://patch-diff.githubusercontent.com/kMutagene
Sep 22, 2023 https://patch-diff.githubusercontent.com/plotly/Plotly.NET/discussions/421#discussioncomment-7078980
Plotly.NET/src/Plotly.NET/Templates/ChartTemplates.fshttps://github.com/plotly/Plotly.NET/blob/11456b42a8875d3ddc6142e2f02129de229e5320/src/Plotly.NET/Templates/ChartTemplates.fs#L168-L701
11456b4https://patch-diff.githubusercontent.com/plotly/Plotly.NET/commit/11456b42a8875d3ddc6142e2f02129de229e5320
Give feedback.https://patch-diff.githubusercontent.com/plotly/Plotly.NET/discussions/421
uittoriohttps://patch-diff.githubusercontent.com/uittorio
Please reload this pagehttps://patch-diff.githubusercontent.com/plotly/Plotly.NET/discussions/421
https://patch-diff.githubusercontent.com/plotly/Plotly.NET/discussions/421
Please reload this pagehttps://patch-diff.githubusercontent.com/plotly/Plotly.NET/discussions/421
https://patch-diff.githubusercontent.com/plotly/Plotly.NET/discussions/421
kMutagene https://patch-diff.githubusercontent.com/kMutagene
Sep 22, 2023 https://patch-diff.githubusercontent.com/plotly/Plotly.NET/discussions/421#discussioncomment-7079107
Give feedback.https://patch-diff.githubusercontent.com/plotly/Plotly.NET/discussions/421
https://patch-diff.githubusercontent.com/uittorio
Please reload this pagehttps://patch-diff.githubusercontent.com/plotly/Plotly.NET/discussions/421
https://patch-diff.githubusercontent.com/plotly/Plotly.NET/discussions/421
uittoriohttps://patch-diff.githubusercontent.com/uittorio
Sep 22, 2023 https://patch-diff.githubusercontent.com/plotly/Plotly.NET/discussions/421#discussioncomment-7083260
Give feedback.https://patch-diff.githubusercontent.com/plotly/Plotly.NET/discussions/421
Sign up for freehttps://patch-diff.githubusercontent.com/join?source=comment-repo
Sign in to commenthttps://patch-diff.githubusercontent.com/login?return_to=https%3A%2F%2Fgithub.com%2Fplotly%2FPlotly.NET%2Fdiscussions%2F421
🙏 Q&A https://patch-diff.githubusercontent.com/plotly/Plotly.NET/discussions/categories/q-a
https://patch-diff.githubusercontent.com/uittorio
https://patch-diff.githubusercontent.com/kMutagene
https://patch-diff.githubusercontent.com/plotly/Plotly.NET/discussions/421
https://patch-diff.githubusercontent.com/settings/replies?return_to=1
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.